diff --git a/Calorimeter/CaloCellCorrection/src/CaloCellPedestalCorr.cxx b/Calorimeter/CaloCellCorrection/src/CaloCellPedestalCorr.cxx index 0d6b1e993bb30144e233bbeab702c81f1f98965c..14bf9d2011096ca8726ff8d45e66e3f80ab62983 100755 --- a/Calorimeter/CaloCellCorrection/src/CaloCellPedestalCorr.cxx +++ b/Calorimeter/CaloCellCorrection/src/CaloCellPedestalCorr.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // **************************************************************************************** @@ -52,11 +52,9 @@ StatusCode CaloCellPedestalCorr::initialize() ATH_CHECK(detStore()->retrieve(m_cellId, "CaloCell_ID")); - if (m_lumi0<0 && !m_isMC) { - ATH_CHECK(m_lumiFolderName.initialize()); - } + ATH_CHECK(m_lumiFolderName.initialize(m_lumi0<0 && !m_isMC)); + ATH_CHECK(m_pedShiftFolder.initialize(!m_isMC)); if (!m_isMC) { - ATH_CHECK(m_pedShiftFolder.initialize()); ATH_CHECK(m_caloCoolIdTool.retrieve()); } diff --git a/Calorimeter/CaloClusterCorrection/CaloClusterCorrection/CaloClusterCorrection.h b/Calorimeter/CaloClusterCorrection/CaloClusterCorrection/CaloClusterCorrection.h index 3bc91e40a4071f3754fb293d64826bdd59486758..3f857fc8b2d919d15c62cb566ecb9d28756a41aa 100755 --- a/Calorimeter/CaloClusterCorrection/CaloClusterCorrection/CaloClusterCorrection.h +++ b/Calorimeter/CaloClusterCorrection/CaloClusterCorrection/CaloClusterCorrection.h @@ -1,7 +1,7 @@ // This file's extension implies that it's C, but it is really -*- C++ -*-. /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef CALOCLUSTERCORRECTION_CALOCLUSTERCORRECTION_H @@ -46,44 +46,13 @@ Updated: February, 2006 (DLelas) // INCLUDE HEADER FILES: #include "CaloRec/CaloClusterProcessor.h" -#include "CaloRec/ToolWithConstantsMixin.h" +#include "CaloUtils/ToolWithConstants.h" class CaloClusterCorrection - : public CaloClusterProcessor, - public CaloRec::ToolWithConstantsMixin + : public CaloUtils::ToolWithConstants<CaloClusterProcessor> { public: - // Destructor - virtual ~CaloClusterCorrection() override; - - - /** - * @brief Standard initialization method. - */ - virtual StatusCode initialize() override; - - - using CaloClusterProcessor::setProperty; - /** - * @brief Method to set a property value. - * @param propname The name of the property to set. - * @param value The value to which to set it. - * - * Defined here as required by @c ToolWithConstantsMixin. - */ - virtual StatusCode setProperty (const std::string& propname, - const std::string& value) override; - - /** - * @brief Method to set a property value. - * @param p The property name/value to set. - * - * Defined here as required by @c ToolWithConstantsMixin. - */ - virtual StatusCode setProperty (const Property& p) override; - - // modifying CaloCluster object virtual void setsample(xAOD::CaloCluster* cluster, CaloSampling::CaloSample sampling, @@ -96,7 +65,7 @@ class CaloClusterCorrection virtual void setenergy(xAOD::CaloCluster* cluster, float energy) const; // derived class implement the real correction. - virtual void makeCorrection(const EventContext& ctx, + virtual void makeCorrection(const Context& myctx, xAOD::CaloCluster*) const = 0; using CaloClusterProcessor::execute; @@ -104,19 +73,8 @@ class CaloClusterCorrection xAOD::CaloCluster* cluster) const override; protected: - /** - * @brief Constructor. - * @param type The type of this tool. - * @param name The name of this tool. - * @param parent The parent of this tool. - * @param toolcls Set this to override the class name for this tool - * that gets saved to the database. - */ - CaloClusterCorrection(const std::string& type, - const std::string& name, - const IInterface* parent, - const std::string& toolcls = ""); - + /// Delegate to base class constructor. + using base_class::base_class; }; #endif diff --git a/Calorimeter/CaloClusterCorrection/CaloClusterCorrection/CaloClusterCorrectionCommon.h b/Calorimeter/CaloClusterCorrection/CaloClusterCorrection/CaloClusterCorrectionCommon.h index 2eb1bf59e0cff6d4b3db33e25cfdcff80d36b73f..a898cf68386e8b37b8cb7e3e3e7d95fb26279c24 100755 --- a/Calorimeter/CaloClusterCorrection/CaloClusterCorrection/CaloClusterCorrectionCommon.h +++ b/Calorimeter/CaloClusterCorrection/CaloClusterCorrection/CaloClusterCorrectionCommon.h @@ -1,10 +1,7 @@ // This file's extension implies that it's C, but it's really -*- C++ -*-. - /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ - -// $Id: CaloClusterCorrectionCommon.h,v 1.7 2008-01-25 04:14:20 ssnyder Exp $ /* @file CaloClusterCorrectionCommon.h * @author scott snyder <snyder@bnl.gov> * @date December, 2004 @@ -45,43 +42,30 @@ class CaloClusterCorrectionCommon : public CaloClusterCorrection { public: - - /** - * @brief Constructor. - * @param type The type of the tool. - * @param name The name of the tool. - * @param parent The parent algorithm of the tool. - */ + /// Inherit constructor. + //using CaloClusterCorrection::CaloClusterCorrection; CaloClusterCorrectionCommon (const std::string& type, - const std::string& name, - const IInterface* parent); + const std::string& name, + const IInterface* parent); - /** - * @brief Destructor. - */ - virtual ~CaloClusterCorrectionCommon () override; - - - /** - * @brief Initialization. - */ - virtual StatusCode initialize() override; + /// Destructor. + virtual ~CaloClusterCorrectionCommon(); /** * @brief Perform the correction. Called by the tool - * @param ctx The event context. + * @param myctx ToolWithConstants context. * @param cluster The cluster to correct. * It is updated in place. */ - virtual void makeCorrection(const EventContext& ctx, - xAOD::CaloCluster* cluster) const override; + virtual void makeCorrection (const Context& myctx, + xAOD::CaloCluster* cluster) const override; /** * @brief Virtual function for the correction-specific code. - * @param ctx The event context. + * @param myctx ToolWithConstants context. * @param cluster The cluster to correct. * It is updated in place. * @param elt The detector description element corresponding @@ -101,7 +85,7 @@ public: * the calorimeter region and sampling encoded. * Otherwise, this is Unknown. */ - virtual void makeTheCorrection (const EventContext& ctx, + virtual void makeTheCorrection (const Context& myctx, xAOD::CaloCluster* cluster, const CaloDetDescrElement* elt, float eta, @@ -175,7 +159,8 @@ private: /// is intended. This should be one of the constants above. /// This affects the meaning of the @c eta and @c phi arguments /// passed to @c makeTheCorrection, as well as the @c samp argument. - int m_region; + Constant<int> m_region + { this, "region", "Calorimeter region" }; /// Helper for detector description lookup. CxxUtils::CachedUniquePtr<const CaloClusterCorr::DDHelper> m_ddhelper; diff --git a/Calorimeter/CaloClusterCorrection/CaloClusterCorrection/CaloFillRectangularCluster.h b/Calorimeter/CaloClusterCorrection/CaloClusterCorrection/CaloFillRectangularCluster.h index 68f600d640339a2e3ca0b9d44296ba35f5614796..0782537aa8f29d949d371d144f06227b46ae8bb5 100755 --- a/Calorimeter/CaloClusterCorrection/CaloClusterCorrection/CaloFillRectangularCluster.h +++ b/Calorimeter/CaloClusterCorrection/CaloClusterCorrection/CaloFillRectangularCluster.h @@ -78,11 +78,20 @@ public: /** * @brief CaloClusterCorrection virtual method - * @param ctx The event context. + * @param myctx ToolWithConstants context. * @param cluster The cluster on which to operate. */ - virtual void makeCorrection(const EventContext& ctx, - xAOD::CaloCluster* cluster) const override; + virtual void makeCorrection (const Context& myctx, + xAOD::CaloCluster* cluster) const override; + + + // Alternate version that takes an EventContext. + void makeCorrection (const EventContext& ctx, + xAOD::CaloCluster* cluster) const + { + return makeCorrection (context(ctx), cluster); + } + /* * @brief Return the seed position of a cluster. diff --git a/Calorimeter/CaloClusterCorrection/CaloClusterCorrection/CaloSwCalibHitsShowerDepth.h b/Calorimeter/CaloClusterCorrection/CaloClusterCorrection/CaloSwCalibHitsShowerDepth.h index 29eca2001c87960f9614df5be1d2a81909cc0ca6..175048e052751f2773a92f9edd42ebe5cac691e5 100644 --- a/Calorimeter/CaloClusterCorrection/CaloClusterCorrection/CaloSwCalibHitsShowerDepth.h +++ b/Calorimeter/CaloClusterCorrection/CaloClusterCorrection/CaloSwCalibHitsShowerDepth.h @@ -1,10 +1,7 @@ // This file's extension implies that it's C, but it's really -*- C++ -*-. - /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ - -// $Id$ /** * @file CaloClusterCorrection/CaloSwCalibHitsShowerDepth.h * @author scott snyder <snyder@bnl.gov> @@ -36,29 +33,24 @@ class CaloSwCalibHitsShowerDepth { public: /** - * @brief Constructor. - * @param sampling_depth Array of sampling depths per bin/sampling in the EC. + * @brief Calculate the depth of the cluster. + * @param aeta abs(eta) of the cluster. * @param start_crack Eta of the start of the crack. * @param end_crack Eta of the end of the crack. + * @param sampling_depth Array of sampling depths per bin/sampling in the EC. * @param etamax Maximum eta value in @a sampling_depth. + * @param cluster Cluster for which to calculate the depth. + * @param log Stream for debug messages. * * Note that the sampling depth is used only in the endcap. * Parameters for the barrel are hardcoded. (FIXME!) * Parameters are passed by reference to allow them to be changed. */ - CaloSwCalibHitsShowerDepth (const CaloRec::Array<2>& sampling_depth, - const float& start_crack, - const float& end_crack, - const float& etamax); - - - /** - * @brief Calculate the depth of the cluster. - * @param aeta abs(eta) of the cluster. - * @param cluster Cluster for which to calculate the depth. - * @param log Stream for debug messages. - */ - double depth (float aeta, + double depth (const float aeta, + const float start_crack, + const float end_crack, + const CaloRec::Array<2>& sampling_depth, + const float etamax, const xAOD::CaloCluster* cluster, MsgStream& log) const; @@ -69,28 +61,20 @@ private: * @param aeta abs(eta) of the cluster. * @param R[out] The set of coefficients per layer. */ - void barrelCoefs (float aeta, float R[4]) const; + void barrelCoefs (const float aeta, float R[4]) const; /** * @brief Calculate the sampling depth coefficients for the endcap. * @param aeta abs(eta) of the cluster. + * @param sampling_depth Array of sampling depths per bin/sampling in the EC. + * @param etamax Maximum eta value in @a sampling_depth. * @param R[out] The set of coefficients per layer. */ - bool endcapCoefs (float aeta, float R[4]) const; - - - /// Array of sampling depths per bin/sampling in the EC. - const CaloRec::Array<2>& m_sampling_depth; - - /// Eta of the start of the crack. - const float& m_start_crack; - - /// Eta of the end of the crack. - const float& m_end_crack; - - /// Maximum eta value in @a sampling_depth. - const float& m_etamax; + bool endcapCoefs (const float aeta, + const CaloRec::Array<2>& sampling_depth, + const float etamax, + float R[4]) const; }; diff --git a/Calorimeter/CaloClusterCorrection/python/CaloSwCorrections.py b/Calorimeter/CaloClusterCorrection/python/CaloSwCorrections.py index ca741bbc4496db65eff2fc7198d8a2c80b7e8e5e..189f170d9518b44543f0628e440e7770f3b83613 100755 --- a/Calorimeter/CaloClusterCorrection/python/CaloSwCorrections.py +++ b/Calorimeter/CaloClusterCorrection/python/CaloSwCorrections.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # # $Id: CaloSwCorrections.py,v 1.40 2009-04-30 20:29:53 ssnyder Exp $ diff --git a/Calorimeter/CaloClusterCorrection/python/CaloSwDeadOTX_back.py b/Calorimeter/CaloClusterCorrection/python/CaloSwDeadOTX_back.py index 4ff5bb36e6ff9ef290b076885c0d46024a1744b8..0a35839f1f0fe0b67e1d6dbbfb64efca96ab03a4 100755 --- a/Calorimeter/CaloClusterCorrection/python/CaloSwDeadOTX_back.py +++ b/Calorimeter/CaloClusterCorrection/python/CaloSwDeadOTX_back.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # # File: CaloClusterCorrection/python/CaloSwDeadOTX_back.py @@ -69,5 +69,5 @@ def make_CaloSwDeadOTX_back(name = None, source = source, confclass = confclass, corrclass = CALOCORR_SW, - affectedTool = theAffectedTool, + AffectedTool = theAffectedTool, **kw) diff --git a/Calorimeter/CaloClusterCorrection/python/CaloSwDeadOTX_ps.py b/Calorimeter/CaloClusterCorrection/python/CaloSwDeadOTX_ps.py index 2a29c68f2366fa3047188a398c6e325913f37cc3..57c226f9eab54603d53bb16b65e6e4e4c7689439 100755 --- a/Calorimeter/CaloClusterCorrection/python/CaloSwDeadOTX_ps.py +++ b/Calorimeter/CaloClusterCorrection/python/CaloSwDeadOTX_ps.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # # File: CaloClusterCorrection/python/CaloSwDeadOTX_PS.py @@ -69,5 +69,5 @@ def make_CaloSwDeadOTX_ps(name = None, source = source, confclass = confclass, corrclass = CALOCORR_SW, - affectedTool = theAffectedTool, + AffectedTool = theAffectedTool, **kw) diff --git a/Calorimeter/CaloClusterCorrection/python/MakeHierTags.py b/Calorimeter/CaloClusterCorrection/python/MakeHierTags.py index 13d8fe9838d36b61be4ebde0a87793d675b3c655..0d7c733bd9e02968b5c7949d25f747ae94d981eb 100644 --- a/Calorimeter/CaloClusterCorrection/python/MakeHierTags.py +++ b/Calorimeter/CaloClusterCorrection/python/MakeHierTags.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # # $Id: MakeHierTags.py,v 1.5 2009-04-30 20:29:53 ssnyder Exp $ @@ -94,7 +94,7 @@ class MakeHierTags: else: toolversion = '' - if not self.funcmap.has_key (toolfunc): + if not toolfunc in self.funcmap: print ("WARNING: skipping tagging for tool", toolfunc.__name__) continue folder = self.funcmap[toolfunc] @@ -118,7 +118,7 @@ class MakeHierTags: return for folder in self.folders: - if not self.tags.has_key ((folder, htag)): + if (folder, htag) not in self.tags: (dum1, dum2, corrclass, basename) = folder.split ('/') tag = corrclass + '.' + generation + basename + '-dummy' self.set_tag (folder, tag, htag) diff --git a/Calorimeter/CaloClusterCorrection/python/common.py b/Calorimeter/CaloClusterCorrection/python/common.py index 8d2d3e7f5f51e5d22cc335da62e1be1f46d84fc2..814e69783c5b61c70d1f172e5d3a2e387a054ed5 100755 --- a/Calorimeter/CaloClusterCorrection/python/common.py +++ b/Calorimeter/CaloClusterCorrection/python/common.py @@ -60,8 +60,7 @@ class MetatoolHelper: self.__dict__["clsname"] = confclass.__name__ self.__dict__["name"] = name self.__dict__["prefix"] = "" - self.__dict__["detStoreKey"] = None - self.__dict__["useCallback"] = None + self.__dict__["DBHandleKey"] = None self.__dict__["props"] = {} self.__dict__["_propdum"] = MetatoolPropDummy (self) return @@ -85,12 +84,12 @@ class MetatoolHelper: def corrspec (self): - if self.detStoreKey == None: + if self.DBHandleKey == None: location = '+' + self.clsname - elif not self.useCallback: - location = '@' + self.detStoreKey + elif self.DBHandleKey.find ('/') >= 0: + location = '@' + self.DBHandleKey else: - location = self.detStoreKey + location = self.DBHandleKey spec = [self.name, location, self.prefix] @@ -239,7 +238,7 @@ class CaloClusterCorrSetup: corrlist = None, cells_name = None, source = None, - use_metatool = True, + use_metatool = False, **kw): # Make a logger. @@ -263,6 +262,9 @@ class CaloClusterCorrSetup: datasource = globalflags.DataSource() (version, tryhier) = self.geom_match (datasource, geom) + #if version[0] == '@' and not use_metatool: + # raise CaloCorrectionConfigError ('COOL tag requested but not metatool.') + # Get the correction generation. generation = self.get_generation() @@ -764,7 +766,7 @@ def makecorr (versions, # the metatool, and the SG key doesn't get specified. # Otherwise, the tag name is the same as the SG key. if version.startswith ('@'): - assert use_metatool + #assert use_metatool sgkey = None if version == '@GLOBAL': fulltag = version @@ -849,13 +851,13 @@ def makecorr (versions, wherefrom = sel[0] break - elif s == CALOCORR_POOL: - sel = [x for x in avail if _is_pool_source (x)] - if len (sel) > 0 and _config_from_pool (corr, sel[0], sgkey): - if not use_metatool: - _mung_prefix (corr, key, valid_keys) - wherefrom = sel[0] - break + # elif s == CALOCORR_POOL: + # sel = [x for x in avail if _is_pool_source (x)] + # if len (sel) > 0 and _config_from_pool (corr, sel[0], sgkey): + # if not use_metatool: + # _mung_prefix (corr, key, valid_keys) + # wherefrom = sel[0] + # break elif s == CALOCORR_COOL: sel = [x for x in avail if _is_cool_source (x)] @@ -989,10 +991,7 @@ def _config_from_pool (corr, poolfile, sgkey): return False # Tell the tool to look in pool for this key. - corr.detStoreKey = sgkey - - # Don't try to register the callbacks. - corr.useCallback = False + corr.DBHandleKey = sgkey # If this is the first time we've seen this file, # add it to CondProxyProvider. @@ -1030,8 +1029,7 @@ def config_from_cool (corr, folder, tag): if not subdetname: subdetname = sndict.get (None) - corr.detStoreKey = folder - corr.useCallback = True + corr.DBHandleKey = folder # We can't use more than one tag from a folder. oldtag = _folders_used.get (folder) @@ -1042,10 +1040,10 @@ def config_from_cool (corr, folder, tag): if oldtag == None: if tag != '@GLOBAL': folder = folder + ' <tag>%s</tag>' % tag - if 'Ofl' in folder: - conddb.addFolder (subdetname+"_OFL", folder) - else: - conddb.addFolder (subdetname, folder) + sdsuffix = '_OFL' if 'Ofl' in folder else '' + conddb.addFolder (subdetname + sdsuffix, + folder, + className = 'CaloRec::ToolConstants') log = logging.getLogger ('CaloClusterCorrection') log.debug ("Adding cool folder `%s' for subdetector name %s" % (folder, subdetname)) diff --git a/Calorimeter/CaloClusterCorrection/share/DATABASE-UPDATE.HOWTO b/Calorimeter/CaloClusterCorrection/share/DATABASE-UPDATE.HOWTO index 30e1b7c359b0f4e5357cf799bcf79f214c96b173..bb9763428fa288df336e07c7bddf854b72e732ee 100644 --- a/Calorimeter/CaloClusterCorrection/share/DATABASE-UPDATE.HOWTO +++ b/Calorimeter/CaloClusterCorrection/share/DATABASE-UPDATE.HOWTO @@ -123,16 +123,16 @@ tt = AthenaROOTAccess.transientTree.makeTree(f) def dumpcl_list (tt, name): - print 'clus ' + name + print ('clus ' + name) ll = list (getattr (tt, name)) ll.sort (lambda a,b: cmp(b.pt(),a.pt())) for cl in ll: - print cl.e(), cl.eta(), cl.phi() + print (cl.e(), cl.eta(), cl.phi()) return for i in range(tt.GetEntries()): tt.GetEntry(i) - print 'ev', i + print ('ev', i) dumpcl_list (tt, 'HLT_CaloCl') dumpcl_list (tt, 'LArClusterEMFrwd') dumpcl_list (tt, 'egClusterCollection') diff --git a/Calorimeter/CaloClusterCorrection/share/makeSwHierTags.py b/Calorimeter/CaloClusterCorrection/share/makeSwHierTags.py index 2316212ea54480a87c94b1ad706c65ada6768abc..4240687bc94233cafb087edded2c336a03164be4 100755 --- a/Calorimeter/CaloClusterCorrection/share/makeSwHierTags.py +++ b/Calorimeter/CaloClusterCorrection/share/makeSwHierTags.py @@ -10,6 +10,7 @@ # Tags the generation string as an optional second argument. # +from __future__ import print_function from CaloClusterCorrection.CaloSwCorrections import CaloSwCorrections from CaloClusterCorrection.MakeHierTags import MakeHierTags import sys @@ -25,7 +26,7 @@ while sys.argv[1][0] == '-': nomagic = True del sys.argv[1] else: - print "Unknown switch", sys.arv[1] + print ("Unknown switch", sys.arv[1]) sys.exit(1) coolfile = sys.argv[1] diff --git a/Calorimeter/CaloClusterCorrection/share/makeTopoEMHierTags.py b/Calorimeter/CaloClusterCorrection/share/makeTopoEMHierTags.py index eb6d0c56ea552a92f86d9b2e675988372b8bd487..1a6cff291bd33ea85546e7002abc2b87fda678f0 100755 --- a/Calorimeter/CaloClusterCorrection/share/makeTopoEMHierTags.py +++ b/Calorimeter/CaloClusterCorrection/share/makeTopoEMHierTags.py @@ -10,6 +10,7 @@ # Tags the generation string as an optional second argument. # +from __future__ import print_function from CaloClusterCorrection.CaloTopoEMCorrections import CaloTopoEMCorrections from CaloClusterCorrection.MakeHierTags import MakeHierTags import sys @@ -25,7 +26,7 @@ while sys.argv[1][0] == '-': nomagic = True del sys.arg else: - print "Unknown switch", sys.arv[1] + print ("Unknown switch", sys.arv[1]) sys.exit(1) coolfile = sys.argv[1] diff --git a/Calorimeter/CaloClusterCorrection/src/CaloClusterBadChannelList.cxx b/Calorimeter/CaloClusterCorrection/src/CaloClusterBadChannelList.cxx index 4fefd4d089fb4b30a8cb161ba9c494e803b1e991..269cd403e36a13864ff73ecc6fdc7993b1ec2149 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloClusterBadChannelList.cxx +++ b/Calorimeter/CaloClusterCorrection/src/CaloClusterBadChannelList.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /******************************************************************** @@ -28,10 +28,6 @@ CaloClusterBadChannelList::CaloClusterBadChannelList(const std::string& type, declareProperty("badChannelTool",m_badChannelTool,"Tool handle for bad channel"); } -CaloClusterBadChannelList::~CaloClusterBadChannelList() -{ } - - StatusCode CaloClusterBadChannelList::initialize() { CHECK( m_badChannelTool.retrieve() ); @@ -39,8 +35,8 @@ StatusCode CaloClusterBadChannelList::initialize() } -void CaloClusterBadChannelList::makeCorrection(const EventContext& /*ctx*/, - CaloCluster* cluster) const +void CaloClusterBadChannelList::makeCorrection (const Context& /*myctx*/, + CaloCluster* cluster) const { xAOD::CaloClusterBadChannelList badChanList; diff --git a/Calorimeter/CaloClusterCorrection/src/CaloClusterBadChannelList.h b/Calorimeter/CaloClusterCorrection/src/CaloClusterBadChannelList.h index ea9911bd91d90a35b96d8535c7aa253442e642b6..f0e2f1d2402b2e1b364e797769f117a310f6a4e0 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloClusterBadChannelList.h +++ b/Calorimeter/CaloClusterCorrection/src/CaloClusterBadChannelList.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef CALOCLUSTERCORRECTION_CALOCLUSTERBADCHANNELLIST_H @@ -31,15 +31,13 @@ class CaloClusterBadChannelList : public CaloClusterCorrection CaloClusterBadChannelList(const std::string& type, const std::string& name, const IInterface* parent); - // destructor - virtual ~CaloClusterBadChannelList() override; // Standard initialize method. virtual StatusCode initialize() override; // virtual method in CaloClusterCorrection - virtual void makeCorrection(const EventContext& ctx, - xAOD::CaloCluster* cluster) const override; + virtual void makeCorrection (const Context& myctx, + xAOD::CaloCluster* cluster) const override; private: diff --git a/Calorimeter/CaloClusterCorrection/src/CaloClusterCorrection.cxx b/Calorimeter/CaloClusterCorrection/src/CaloClusterCorrection.cxx index d4b195121185158a27632cd2f0e21c91120cc056..8e106096f9b1b1257c3c8d056a944fd45d501f07 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloClusterCorrection.cxx +++ b/Calorimeter/CaloClusterCorrection/src/CaloClusterCorrection.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /******************************************************************** @@ -44,78 +44,10 @@ Updated: February, 2006 (DLelas) using xAOD::CaloCluster; -/** - * @brief Constructor. - * @param type The type of this tool. - * @param name The name of this tool. - * @param parent The parent of this tool. - * @param toolcls Set this to override the class name for this tool - * that gets saved to the database. - */ -CaloClusterCorrection::CaloClusterCorrection - (const std::string& type, - const std::string& name, - const IInterface* parent, - const std::string& toolcls /*=""*/) - : CaloClusterProcessor(type,name,parent) -{ - finish_ctor (toolcls); -} - -// ------------------------------------------------------------- -// Destructor -// ------------------------------------------------------------- -CaloClusterCorrection::~CaloClusterCorrection() -{ } - - -/** - * @brief Standard initialization method. - */ -StatusCode CaloClusterCorrection::initialize() -{ - CHECK( CaloClusterProcessor::initialize() ); - CHECK( CaloRec::ToolWithConstantsMixin::initialize() ); - return StatusCode::SUCCESS; -} - - -/** - * @brief Method to set a property value. - * @param propname The name of the property to set. - * @param value The value to which to set it. - * - * Defined here as required by @c ToolWithConstantsMixin. - */ -StatusCode -CaloClusterCorrection::setProperty (const std::string& propname, - const std::string& value) -{ - CHECK( CaloClusterProcessor::setProperty (propname, value) ); - CHECK( CaloRec::ToolWithConstantsMixin::setProperty (propname, value) ); - return StatusCode::SUCCESS; -} - - -/** - * @brief Method to set a property value. - * @param p The property name/value to set. - * - * Defined here as required by @c ToolWithConstantsMixin. - */ -StatusCode -CaloClusterCorrection::setProperty (const Property& p) -{ - CHECK( CaloClusterProcessor::setProperty (p) ); - CHECK( CaloRec::ToolWithConstantsMixin::setProperty (p) ); - return StatusCode::SUCCESS; -} - - -StatusCode CaloClusterCorrection::execute(const EventContext& ctx, - CaloCluster *cluster) const +StatusCode CaloClusterCorrection::execute (const EventContext& ctx, + CaloCluster *cluster) const { - this->makeCorrection(ctx, cluster); + this->makeCorrection (context(ctx), cluster); #if 0 ATH_MSG_DEBUG( " ...... e, et " << cluster->e() << " " << cluster->et() << endmsg); diff --git a/Calorimeter/CaloClusterCorrection/src/CaloClusterCorrectionCommon.cxx b/Calorimeter/CaloClusterCorrection/src/CaloClusterCorrectionCommon.cxx index bb1fa24d1b0c0abf2f5044e956fffe013f2f6b49..c65c6fad9d39c5158966e933953c65d4b192f1cb 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloClusterCorrectionCommon.cxx +++ b/Calorimeter/CaloClusterCorrection/src/CaloClusterCorrectionCommon.cxx @@ -1,8 +1,6 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ - -// $Id: CaloClusterCorrectionCommon.cxx,v 1.12 2008-08-30 05:43:22 ssnyder Exp $ /** * @file CaloClusterCorrectionCommon.cxx * @author scott snyder <snyder@bnl.gov> @@ -401,44 +399,27 @@ void DDHelper::make_dummy_elts() } // namespace CaloClusterCorr -/** - * @brief Constructor. - * @param type The type of the tool. - * @param name The name of the tool. - * @param parent The parent algorithm of the tool. - */ -CaloClusterCorrectionCommon::CaloClusterCorrectionCommon - (const std::string& type, - const std::string& name, - const IInterface* parent) - : CaloClusterCorrection (type, name, parent) +CaloClusterCorrectionCommon::CaloClusterCorrectionCommon (const std::string& type, + const std::string& name, + const IInterface* parent) + : CaloClusterCorrection (type, name, parent) { - // Fetch our calibration constants. - declareConstant ("region", m_region); } /** * @brief Destructor. + * + * Needs to be out-of-line due to m_ddhelper. */ -CaloClusterCorrectionCommon::~CaloClusterCorrectionCommon () -{ -} - - -/** - * @brief Initialize. - * Fetch the DD manager. - */ -StatusCode CaloClusterCorrectionCommon::initialize() +CaloClusterCorrectionCommon::~CaloClusterCorrectionCommon() { - return CaloClusterCorrection::initialize(); } /** * @brief Perform the correction. Called by the tool. - * @param ctx The event context. + * @param myctx ToolWithConstants context. * @param cluster The cluster to correct. * It is updated in place. * @@ -448,9 +429,11 @@ StatusCode CaloClusterCorrectionCommon::initialize() * - Computes quantities to pass to @c makeTheCorrection. * - Calls @c makeTheCorrection. */ -void CaloClusterCorrectionCommon::makeCorrection (const EventContext& ctx, +void CaloClusterCorrectionCommon::makeCorrection (const Context& myctx, CaloCluster* cluster) const { + int region = m_region (myctx); + // This causes a lot of overhead (mostly from the MsgStream ctor). // Comment out when not needed. //MsgStream log( msgSvc(), name() ); @@ -458,7 +441,7 @@ void CaloClusterCorrectionCommon::makeCorrection (const EventContext& ctx, //log << MSG::DEBUG << "e, eta, phi, etasize, phisize" << " " << cluster->e() << " " << cluster->eta() << " " << cluster->phi() // << " " << cluster->etasize(CaloSampling::EMB2) << " " << cluster->phisize(CaloSampling::EMB2) << endmsg; //log << MSG::DEBUG << "B / E " << cluster->inBarrel() << " " << cluster->inEndcap() << endmsg; - //log << MSG::DEBUG << "region " << m_region << endmsg; + //log << MSG::DEBUG << "region " << region << endmsg; float eta; float phi; @@ -466,20 +449,20 @@ void CaloClusterCorrectionCommon::makeCorrection (const EventContext& ctx, // Find the proper @f$\eta@f$ and @f$\phi@f$ measures of the cluster. // Also set up the sampling code @c samp. - switch (m_region) { + switch (region) { case EMB1: case EMB2: case EME1: case EME2: // Return immediately if we can tell we're in the wrong region. - if (barrel_p (m_region)) { + if (barrel_p (region)) { if (!cluster->inBarrel()) return; } else { if (!cluster->inEndcap()) return; } - switch (m_region) { + switch (region) { case EMB1: samp = CaloSampling::EMB1; break; @@ -522,7 +505,7 @@ void CaloClusterCorrectionCommon::makeCorrection (const EventContext& ctx, // Look up the DD element. // Give up if we can't find one. - const CaloDetDescrElement* elt = ddhelper().find_dd_elt (m_region, + const CaloDetDescrElement* elt = ddhelper().find_dd_elt (region, cluster, eta, phi); if (!elt) @@ -534,7 +517,7 @@ void CaloClusterCorrectionCommon::makeCorrection (const EventContext& ctx, float adj_phi = CaloPhiRange::fix (phi - elt->phi() + elt->phi_raw()); // Call the actual correction. - makeTheCorrection (ctx, cluster, elt, eta, adj_eta, phi, adj_phi, samp); + makeTheCorrection (myctx, cluster, elt, eta, adj_eta, phi, adj_phi, samp); } diff --git a/Calorimeter/CaloClusterCorrection/src/CaloClusterUpdate.cxx b/Calorimeter/CaloClusterCorrection/src/CaloClusterUpdate.cxx index cc7e1d7759c20dff5d19c6b699fac52e1069d776..0c8ea2299cbe8d173b41fbf8e8bb84df163dddcd 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloClusterUpdate.cxx +++ b/Calorimeter/CaloClusterCorrection/src/CaloClusterUpdate.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /******************************************************************** @@ -45,19 +45,8 @@ Updated: May 5, 2004 (Sven Menke) #include "CaloGeoHelpers/CaloPhiRange.h" using xAOD::CaloCluster; -CaloClusterUpdate::CaloClusterUpdate(const std::string& type, - const std::string& name, - const IInterface* parent) - : CaloClusterCorrection(type, name, parent) -{ - declareConstant ("update_energy", m_update_energy); -} - -CaloClusterUpdate::~CaloClusterUpdate() -{ } - -void CaloClusterUpdate::makeCorrection(const EventContext& /*ctx*/, - CaloCluster* cluster) const +void CaloClusterUpdate::makeCorrection (const Context& myctx, + CaloCluster* cluster) const { float energy=0; float eta=0; @@ -161,7 +150,7 @@ void CaloClusterUpdate::makeCorrection(const EventContext& /*ctx*/, cluster->setEta(eta); cluster->setPhi(phi2); - if (m_update_energy) + if (m_update_energy (myctx)) cluster->setE(energy); } diff --git a/Calorimeter/CaloClusterCorrection/src/CaloClusterUpdate.h b/Calorimeter/CaloClusterCorrection/src/CaloClusterUpdate.h index 43545d599f19c77a1fd9c59268da78c13cae9722..ae1a5d5614cadd874dbea9fffe64e8fcd9a7c73a 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloClusterUpdate.h +++ b/Calorimeter/CaloClusterCorrection/src/CaloClusterUpdate.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef CALOCLUSTERCORRECTION_CALOCLUSTER_UPDATE_H @@ -47,25 +47,18 @@ class CaloClusterUpdate : public CaloClusterCorrection { public: - - // constructor - CaloClusterUpdate(const std::string& type, - const std::string& name, - const IInterface* parent); - // destructor - virtual ~CaloClusterUpdate() override; + // constructor + using CaloClusterCorrection::CaloClusterCorrection; // virtual method in CaloClusterCorrection - virtual void makeCorrection(const EventContext& ctx, - xAOD::CaloCluster* cluster) const override; + virtual void makeCorrection (const Context& myctx, + xAOD::CaloCluster* cluster) const override; private: // If true, the total cluster energy is set to the sum of all layer energies. - bool m_update_energy; - - CaloClusterUpdate(); - + Constant<bool> m_update_energy + { this, "update_energy", "Should cluster total energy be updated?" }; }; diff --git a/Calorimeter/CaloClusterCorrection/src/CaloDummyCorrection.cxx b/Calorimeter/CaloClusterCorrection/src/CaloDummyCorrection.cxx index 969230f583ff2be36a21046357d05543ad4cd6af..17c8645704bf13cd2bde732d12a9e5e9b86ca721 100644 --- a/Calorimeter/CaloClusterCorrection/src/CaloDummyCorrection.cxx +++ b/Calorimeter/CaloClusterCorrection/src/CaloDummyCorrection.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // $Id: CaloDummyCorrection.cxx,v 1.1 2009-04-19 03:58:47 ssnyder Exp $ @@ -15,21 +15,6 @@ #include "AthenaKernel/errorcheck.h" -/** - * @brief Constructor. - * @param type The type of this tool. - * @param name The name of this tool. - * @param parent The parent of this tool. - */ -using xAOD::CaloCluster; -CaloDummyCorrection::CaloDummyCorrection(const std::string& type, - const std::string& name, - const IInterface* parent) - : CaloClusterCorrection (type, name, parent) -{ -} - - /** * @brief Standard initialization method. */ @@ -44,26 +29,7 @@ StatusCode CaloDummyCorrection::initialize() // derived class implement the real correction. // (Does nothing here.) -void CaloDummyCorrection::makeCorrection(const EventContext& /*ctx*/, - CaloCluster*) const -{ -} - - -/** - * @brief Method to set a property value. - * @param p The property name/value to set. - * - * Defined here as required by @c ToolWithConstantsMixin. - */ -StatusCode -CaloDummyCorrection::setProperty (const Property& p) +void CaloDummyCorrection::makeCorrection (const Context& /*myctx*/, + xAOD::CaloCluster*) const { - // Ignore non-existing properties. - std::string v; - if (getProperty (p.name(), v).isSuccess()) - CHECK( CaloClusterCorrection::setProperty (p) ); - return StatusCode::SUCCESS; } - - diff --git a/Calorimeter/CaloClusterCorrection/src/CaloDummyCorrection.h b/Calorimeter/CaloClusterCorrection/src/CaloDummyCorrection.h index 3c9312b91fd1dc33a6d75a7da9778d85c7aa69fe..87e871f30da636a8d32d0848fba65ed20bf9d0db 100644 --- a/Calorimeter/CaloClusterCorrection/src/CaloDummyCorrection.h +++ b/Calorimeter/CaloClusterCorrection/src/CaloDummyCorrection.h @@ -1,7 +1,7 @@ // This file's extension implies that it's C, but it is really -*- C++ -*-. /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // $Id: CaloDummyCorrection.h,v 1.1 2009-04-19 03:58:47 ssnyder Exp $ @@ -34,15 +34,8 @@ class CaloDummyCorrection : public CaloClusterCorrection { public: - /** - * @brief Constructor. - * @param type The type of this tool. - * @param name The name of this tool. - * @param parent The parent of this tool. - */ - CaloDummyCorrection(const std::string& type, - const std::string& name, - const IInterface* parent); + /// Inherit constructor + using CaloClusterCorrection::CaloClusterCorrection; /** @@ -53,13 +46,8 @@ public: // derived class implement the real correction. // (Does nothing here.) - virtual void makeCorrection(const EventContext& ctx, - xAOD::CaloCluster*) const override; - - - /// Ignore non-existing properties. - using CaloClusterCorrection::setProperty; - virtual StatusCode setProperty (const Property& p) override; + virtual void makeCorrection (const Context& myctx, + xAOD::CaloCluster*) const override; }; diff --git a/Calorimeter/CaloClusterCorrection/src/CaloFillRectangularCluster.cxx b/Calorimeter/CaloClusterCorrection/src/CaloFillRectangularCluster.cxx index 569c7c81479f428289ae7ec87ba443801311113b..08aa4507e61edb62472f37164b95e80275171d38 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloFillRectangularCluster.cxx +++ b/Calorimeter/CaloClusterCorrection/src/CaloFillRectangularCluster.cxx @@ -1067,11 +1067,11 @@ CaloFillRectangularCluster::makeCorrection2 (const EventContext& ctx, /** * @brief CaloClusterCorrection virtual method - * @param ctx The event context. + * @param myctx ToolWithConstants context. * @param cluster The cluster on which to operate. */ -void CaloFillRectangularCluster::makeCorrection(const EventContext& ctx, - CaloCluster* cluster) const +void CaloFillRectangularCluster::makeCorrection (const Context& myctx, + CaloCluster* cluster) const { ATH_MSG_DEBUG( "Executing CaloFillRectangularCluster" << endmsg) ; @@ -1099,7 +1099,7 @@ void CaloFillRectangularCluster::makeCorrection(const EventContext& ctx, //Leave the option to use a different cell container if (!m_cellsName.key().empty()) { - SG::ReadHandle<CaloCellContainer> cchand (m_cellsName, ctx); + SG::ReadHandle<CaloCellContainer> cchand (m_cellsName, myctx.ctx()); if (!cchand.isValid()) { REPORT_ERROR(StatusCode::FAILURE) << "Can't retrieve cell container " << m_cellsName.key(); @@ -1126,12 +1126,12 @@ void CaloFillRectangularCluster::makeCorrection(const EventContext& ctx, cluster, cell_list, cell_container); - makeCorrection2 (ctx,*calodetdescrmgr, helper); + makeCorrection2 (myctx.ctx(), *calodetdescrmgr, helper); } else { // We're recalculating a cluster using the existing cells. CaloClusterCorr::SamplingHelper_Cluster helper (*this, windows, cluster); - makeCorrection2 (ctx, *calodetdescrmgr,helper); + makeCorrection2 (myctx.ctx(), *calodetdescrmgr,helper); } } diff --git a/Calorimeter/CaloClusterCorrection/src/CaloLongWeights_v2.cxx b/Calorimeter/CaloClusterCorrection/src/CaloLongWeights_v2.cxx index b2f1611a9f3ef66afb858286903f689849031932..7adb12ea4e98548eb3348b6eee052d21bb52d576 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloLongWeights_v2.cxx +++ b/Calorimeter/CaloClusterCorrection/src/CaloLongWeights_v2.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /******************************************************************** @@ -20,38 +20,29 @@ PURPOSE: correction for the energy lost in the dead material using xAOD::CaloCluster; using CaloClusterCorr::interpolate; -CaloLongWeights_v2::CaloLongWeights_v2(const std::string& type, - const std::string& name, - const IInterface* parent) - : CaloClusterCorrectionCommon(type, name, parent) -{ - declareConstant("correction", m_correction); - declareConstant("energies", m_energies); - declareConstant("degree", m_degree); - declareConstant("EtaMax", m_etamax); - declareConstant("EtaBarrel", m_barrel_frontier); - declareConstant("EtaEndCap", m_endcap_frontier); -} - -void CaloLongWeights_v2::makeTheCorrection(const EventContext& /*ctx*/, - CaloCluster* cluster, - const CaloDetDescrElement* /*elt*/, - float eta, - float /*adj_eta*/, - float /*phi*/, - float /*phi*/, - CaloSampling::CaloSample /*samp*/) const -{ +void CaloLongWeights_v2::makeTheCorrection (const Context& myctx, + CaloCluster* cluster, + const CaloDetDescrElement* /*elt*/, + float eta, + float /*adj_eta*/, + float /*phi*/, + float /*phi*/, + CaloSampling::CaloSample /*samp*/) const +{ float the_eta = std::abs (eta); - if (the_eta >= m_etamax) return; + if (the_eta >= m_etamax (myctx)) return; bool inBarrel = false; - if (the_eta < m_barrel_frontier) + if (the_eta < m_barrel_frontier (myctx)) inBarrel= true; - else if (the_eta <= m_endcap_frontier) + else if (the_eta <= m_endcap_frontier (myctx)) return; + const CxxUtils::Array<3> correction = m_correction (myctx); + const CxxUtils::Array<1> energies = m_energies (myctx); + const int degree = m_degree (myctx); + //initial cluster energy float energy = cluster->e(); @@ -62,30 +53,30 @@ void CaloLongWeights_v2::makeTheCorrection(const EventContext& /*ctx*/, int etaIndex = (int) (the_eta * (1./0.025)); //samples - unsigned int n_samples = m_energies.size(); + unsigned int n_samples = energies.size(); unsigned int shape[] = {n_samples, 6}; CaloRec::WritableArrayData<2> vectParm (shape); - + for(unsigned int i=0;i<n_samples;i++) { - vectParm[i][0] = m_energies[i]; + vectParm[i][0] = energies[i]; for(unsigned int j=0;j<5;j++) { - vectParm[i][j+1] = m_correction[i][etaIndex][j+1]; + vectParm[i][j+1] = correction[i][etaIndex][j+1]; } } for(unsigned int k=0; k<5;k++) { - if(energy < m_energies[0]) + if(energy < energies[0]) coefs[k] = vectParm[0][k+1]; - else if(energy > m_energies[n_samples-1]) + else if(energy > energies[n_samples-1]) coefs[k] = vectParm[n_samples-1][k+1]; else - coefs[k] = interpolate (vectParm, energy, m_degree, k+1); + coefs[k] = interpolate (vectParm, energy, degree, k+1); } diff --git a/Calorimeter/CaloClusterCorrection/src/CaloLongWeights_v2.h b/Calorimeter/CaloClusterCorrection/src/CaloLongWeights_v2.h index 85035d237afe9870e1890c585777a4f0f21dc597..5fa16233ab364f349230c8fef109f54ccfff7e24 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloLongWeights_v2.h +++ b/Calorimeter/CaloClusterCorrection/src/CaloLongWeights_v2.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef CALOCLUSTERCORRECTION_CALOLONGWEIGHTS_V2_H @@ -25,13 +25,11 @@ PURPOSE: correction for the energy lost behind the calorimeter, class CaloLongWeights_v2 : public CaloClusterCorrectionCommon { public: - // constructor - CaloLongWeights_v2 (const std::string& type, - const std::string& name, - const IInterface* parent); + /// Inherit constructor. + using CaloClusterCorrectionCommon::CaloClusterCorrectionCommon; - virtual void makeTheCorrection (const EventContext& ctx, + virtual void makeTheCorrection (const Context& myctx, xAOD::CaloCluster* cluster, const CaloDetDescrElement* elt, float eta, @@ -44,12 +42,12 @@ public: private: - CaloRec::Array<3> m_correction; - CaloRec::Array<1> m_energies; - int m_degree; - float m_etamax; - float m_barrel_frontier; - float m_endcap_frontier; + Constant<CxxUtils::Array<3> > m_correction { this, "correction", "" }; + Constant<CxxUtils::Array<1> > m_energies { this, "energies", "" }; + Constant<int> m_degree { this, "degree", "" }; + Constant<float> m_etamax { this, "EtaMax", "" }; + Constant<float> m_barrel_frontier { this, "EtaBarrel", "" }; + Constant<float> m_endcap_frontier { this, "EtaEndCap", "" }; }; #endif diff --git a/Calorimeter/CaloClusterCorrection/src/CaloPhiParabola.cxx b/Calorimeter/CaloClusterCorrection/src/CaloPhiParabola.cxx index 7e5ebdd3541c0f64f5d13033e010de24fbc287dc..7a7e105f59460f291c78e8ab9216a21c0f6cb7c6 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloPhiParabola.cxx +++ b/Calorimeter/CaloClusterCorrection/src/CaloPhiParabola.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /******************************************************************** @@ -23,18 +23,7 @@ PURPOSE: corrects for the parabolic behavior in the E vs Phi curve using xAOD::CaloCluster; using CaloClusterCorr::interpolate; -CaloPhiParabola::CaloPhiParabola (const std::string& type, - const std::string& name, - const IInterface* parent) - : CaloClusterCorrectionCommon (type,name,parent) -{ - declareConstant ("correction", m_correction); - declareConstant("energies", m_energies); - declareConstant("degree", m_degree); -} - - -void CaloPhiParabola::makeTheCorrection (const EventContext& /*ctx*/, +void CaloPhiParabola::makeTheCorrection (const Context& myctx, CaloCluster* cluster, const CaloDetDescrElement* /*elt*/, float /*eta*/, @@ -44,11 +33,14 @@ void CaloPhiParabola::makeTheCorrection (const EventContext& /*ctx*/, CaloSampling::CaloSample /*samp*/) const { + const CxxUtils::Array<2> correction = m_correction (myctx); + const CxxUtils::Array<1> energies = m_energies (myctx); + const int degree = m_degree (myctx); // float coefs[3]; - unsigned int n_samples = m_energies.size(); + unsigned int n_samples = energies.size(); unsigned int shape[] = {n_samples, 4}; CaloRec::WritableArrayData<2> pol2Parm (shape); @@ -56,10 +48,10 @@ void CaloPhiParabola::makeTheCorrection (const EventContext& /*ctx*/, for(unsigned int i=0;i<n_samples;i++) { - pol2Parm[i][0] = m_energies[i]; + pol2Parm[i][0] = energies[i]; for(unsigned int j=0;j<3;j++) { - pol2Parm[i][j+1] = m_correction[i][j]; + pol2Parm[i][j+1] = correction[i][j]; } } @@ -67,12 +59,12 @@ void CaloPhiParabola::makeTheCorrection (const EventContext& /*ctx*/, float energy = cluster->e(); for(unsigned int k=0; k<3;k++) { - if(energy < m_energies[0]) + if(energy < energies[0]) coefs[k] = pol2Parm[0][k+1]; - else if(energy > m_energies[n_samples-1]) + else if(energy > energies[n_samples-1]) coefs[k] = pol2Parm[n_samples-1][k+1]; else - coefs[k] = interpolate (pol2Parm, energy, m_degree, k+1); + coefs[k] = interpolate (pol2Parm, energy, degree, k+1); } // diff --git a/Calorimeter/CaloClusterCorrection/src/CaloPhiParabola.h b/Calorimeter/CaloClusterCorrection/src/CaloPhiParabola.h index 9215186cad8a005fccb2e15827e6290b0c6f7f8d..82a74dcc5c4a9ddad4ea5edab12ce01bcdda0138 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloPhiParabola.h +++ b/Calorimeter/CaloClusterCorrection/src/CaloPhiParabola.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef CALOCLUSTERCORRECTION_CALOPHIPARABOLA_H @@ -24,12 +24,10 @@ class CaloPhiParabola : public CaloClusterCorrectionCommon { public: + /// Inherit constructor. + using CaloClusterCorrectionCommon::CaloClusterCorrectionCommon; - CaloPhiParabola(const std::string& type, - const std::string& name, - const IInterface* parent); - - virtual void makeTheCorrection (const EventContext& ctx, + virtual void makeTheCorrection (const Context& myctx, xAOD::CaloCluster* cluster, const CaloDetDescrElement* elt, float eta, @@ -39,10 +37,9 @@ public: CaloSampling::CaloSample samp) const override; private: - - CaloRec::Array<2> m_correction; - CaloRec::Array<1> m_energies; - int m_degree; + Constant<CxxUtils::Array<2> > m_correction { this, "correction", "" }; + Constant<CxxUtils::Array<1> > m_energies { this, "energies", "" }; + Constant<int> m_degree { this, "degree", "" }; }; diff --git a/Calorimeter/CaloClusterCorrection/src/CaloScaleCluster.cxx b/Calorimeter/CaloClusterCorrection/src/CaloScaleCluster.cxx index e34d81c0704b2a22e76312f9ad1d7db345a26b0e..cc8c4888fca7a5176562bf06fee99d79053d8494 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloScaleCluster.cxx +++ b/Calorimeter/CaloClusterCorrection/src/CaloScaleCluster.cxx @@ -1,8 +1,6 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ - -// $Id: CaloScaleCluster.cxx,v 1.1 2006-07-07 04:00:06 ssnyder Exp $ /** * @file CaloScaleCluster.cxx * @author scott snyder <snyder@bnl.gov> @@ -20,26 +18,9 @@ using xAOD::CaloCluster; using CaloClusterCorr::interpolate; -/** - * @brief Constructor. - * @param type The type of the tool. - * @param name The name of the tool. - * @param parent The parent algorithm of the tool. - */ -CaloScaleCluster::CaloScaleCluster (const std::string& type, - const std::string& name, - const IInterface* parent) - : CaloClusterCorrectionCommon(type, name, parent) -{ - declareConstant ("correction", m_correction); - declareConstant ("degree", m_degree); - declareConstant ("etamax", m_etamax); -} - - /** * @brief Virtual function for the correction-specific code. - * @param ctx The event context. + * @param myctx ToolWithConstants context. * @param cluster The cluster to correct. * It is updated in place. * @param elt The detector description element corresponding @@ -57,7 +38,7 @@ CaloScaleCluster::CaloScaleCluster (const std::string& type, * @c CaloSampling::CaloSample; i.e., it has both * the calorimeter region and sampling encoded. */ -void CaloScaleCluster::makeTheCorrection (const EventContext& /*ctx*/, +void CaloScaleCluster::makeTheCorrection (const Context& myctx, CaloCluster* cluster, const CaloDetDescrElement* /*elt*/, float /*eta*/, @@ -67,11 +48,13 @@ void CaloScaleCluster::makeTheCorrection (const EventContext& /*ctx*/, CaloSampling::CaloSample /*samp*/) const { + const CxxUtils::Array<2> correction = m_correction (myctx); + float adj_aeta = std::abs (adj_eta); float fac; - if (std::abs (adj_eta) > m_etamax) - fac = m_correction[m_correction.size()-1][1]; + if (std::abs (adj_eta) > m_etamax (myctx)) + fac = correction[correction.size()-1][1]; else - fac = interpolate (m_correction, adj_aeta, m_degree); + fac = interpolate (correction, adj_aeta, m_degree (myctx)); cluster->setE (cluster->e() / fac); } diff --git a/Calorimeter/CaloClusterCorrection/src/CaloScaleCluster.h b/Calorimeter/CaloClusterCorrection/src/CaloScaleCluster.h index 6f7b19d758264e682fc8fb84b9fdcd92ecb8744b..11738632d72efe95c94b9d8ba30d4f8aa173c2f5 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloScaleCluster.h +++ b/Calorimeter/CaloClusterCorrection/src/CaloScaleCluster.h @@ -1,10 +1,9 @@ // This file's extension implies that it's C, but it's really -*- C++ -*-. /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ -// $Id: CaloScaleCluster.h,v 1.1 2006-07-07 04:00:03 ssnyder Exp $ /** * @file CaloScaleCluster.h * @author scott snyder <snyder@bnl.gov> @@ -37,14 +36,13 @@ class CaloScaleCluster : public CaloClusterCorrectionCommon { public: - // constructor - CaloScaleCluster (const std::string& type, - const std::string& name, - const IInterface* parent); + /// Inherit constructor. + using CaloClusterCorrectionCommon::CaloClusterCorrectionCommon; + /** * @brief Virtual function for the correction-specific code. - * @param ctx The event context. + * @param myctx ToolWithConstants context. * @param cluster The cluster to correct. * It is updated in place. * @param elt The detector description element corresponding @@ -62,7 +60,7 @@ class CaloScaleCluster * @c CaloSampling::CaloSample; i.e., it has both * the calorimeter region and sampling encoded. */ - virtual void makeTheCorrection (const EventContext& ctx, + virtual void makeTheCorrection (const Context& myctx, xAOD::CaloCluster* cluster, const CaloDetDescrElement* elt, float eta, @@ -74,13 +72,16 @@ class CaloScaleCluster private: /// Calibration constant: tabulated arrays of function parameters. - CaloRec::Array<2> m_correction; + Constant<CxxUtils::Array<2> > m_correction + { this, "correction", "Arrays of function parameters" }; /// Calibration constant: degree of the polynomial interpolation. - int m_degree; + Constant<int> m_degree + { this, "degree", "Degree of the polynomial interpolation" }; /// Calibration constant: maximum eta for which this correction is defined. - float m_etamax; + Constant<float> m_etamax + { this, "etamax", "Maximum eta for which this correction is defined" }; }; diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwApplyWgts_g3.cxx b/Calorimeter/CaloClusterCorrection/src/CaloSwApplyWgts_g3.cxx index 35f8b66021e32e3bf9c20b65f8b9f45bc1cd6dd5..419db9746bffd657f40fa0412d2c73c52487992a 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwApplyWgts_g3.cxx +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwApplyWgts_g3.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /******************************************************************** @@ -149,24 +149,9 @@ const float CaloSwApplyWgts_g3::m_table_p[4][s_numEtaBins] = { } }; -// ------------------------------------------------------------- -// Constructor -// ------------------------------------------------------------- -CaloSwApplyWgts_g3::CaloSwApplyWgts_g3(const std::string& type, - const std::string& name, - const IInterface* parent) - : CaloClusterCorrection(type, name, parent) -{ } - -// ------------------------------------------------------------- -// Destructor -// ------------------------------------------------------------- -CaloSwApplyWgts_g3::~CaloSwApplyWgts_g3() -{ } - // make correction to one cluster -void CaloSwApplyWgts_g3::makeCorrection(const EventContext& /*ctx*/, - CaloCluster* cluster) const +void CaloSwApplyWgts_g3::makeCorrection (const Context& /*myctx*/, + CaloCluster* cluster) const { diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwApplyWgts_g3.h b/Calorimeter/CaloClusterCorrection/src/CaloSwApplyWgts_g3.h index cdc63a0a832736366932f771946c7ead605cfe1e..180d99ae8a06c8d11176fe793e1948945c66e8ea 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwApplyWgts_g3.h +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwApplyWgts_g3.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef CALOCLUSTERCORRECTION_CALOSWAPPLYWGTS_G3_H @@ -26,19 +26,13 @@ Updated: May 5, 2004 (Sven Menke) class CaloSwApplyWgts_g3 : public CaloClusterCorrection { +public: + /// Inherit constructor. + using CaloClusterCorrection::CaloClusterCorrection; - public: - - // constructor - CaloSwApplyWgts_g3(const std::string& type, - const std::string& name, - const IInterface* parent); - // destructor - virtual ~CaloSwApplyWgts_g3() override; - // virtual method in CaloClusterCorrection - virtual void makeCorrection(const EventContext& ctx, - xAOD::CaloCluster* cluster) const override; + virtual void makeCorrection (const Context& myctx, + xAOD::CaloCluster* cluster) const override; private: diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwCalibHitsCalibration.cxx b/Calorimeter/CaloClusterCorrection/src/CaloSwCalibHitsCalibration.cxx index 6c54605bd4369019a02b8ef92e9157843b6d1120..4a8ffab86031a4397b702b2b2588332ba2f61428 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwCalibHitsCalibration.cxx +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwCalibHitsCalibration.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /******************************************************************** @@ -30,37 +30,10 @@ Updated: January 17, 2008 (LC) using xAOD::CaloCluster; using CLHEP::TeV; -// ------------------------------------------------------------- -// Constructor -// ------------------------------------------------------------- - -CaloSwCalibHitsCalibration::CaloSwCalibHitsCalibration - (const std::string& type, - const std::string& name, - const IInterface* parent) - : CaloClusterCorrectionCommon(type, name, parent), - m_showerDepth (m_sampling_depth, - m_eta_start_crack, - m_eta_end_crack, - m_etamax) -{ - declareConstant("correction" , m_correction); - declareConstant("sampling_depth" , m_sampling_depth); - declareConstant("eta_start_crack" , m_eta_start_crack); - declareConstant("eta_end_crack" , m_eta_end_crack); - declareConstant("etamax" , m_etamax); - declareConstant("use_raw_eta" , m_use_raw_eta); - declareConstant("fix_v6_pathologies", m_fix_v6_pathologies, true); - declareConstant("update_sampling_energies", m_updateSamplingEnergies, true); - m_fix_v6_pathologies = true; - m_updateSamplingEnergies = false; - -} - /** * @brief Virtual function for the correction-specific code. - * @param ctx The event context. + * @param myctx ToolWithConstants context. * @param cluster The cluster to correct. * It is updated in place. * @param elt The detector description element corresponding @@ -81,7 +54,7 @@ CaloSwCalibHitsCalibration::CaloSwCalibHitsCalibration void CaloSwCalibHitsCalibration::makeTheCorrection -(const EventContext& /*ctx*/, +(const Context& myctx, CaloCluster* cluster, const CaloDetDescrElement* /*elt*/, float eta, @@ -94,23 +67,28 @@ void CaloSwCalibHitsCalibration::makeTheCorrection // and range checks. However, the v2 corrections were derived // using regular eta instead. float the_aeta; - if (m_use_raw_eta) + if (m_use_raw_eta (myctx)) the_aeta = std::abs (adj_eta); else the_aeta = std::abs (eta); - if (the_aeta >= m_etamax) return; + const float etamax = m_etamax (myctx); + if (the_aeta >= etamax) return; + const float eta_start_crack = m_eta_start_crack (myctx); + const float eta_end_crack = m_eta_end_crack (myctx); int si; - if (the_aeta < m_eta_start_crack) + if (the_aeta < eta_start_crack) si = 0; - else if (the_aeta > m_eta_end_crack) + else if (the_aeta > eta_end_crack) si = 1; else { // No corrections are applied for the crack region. return; } + const CxxUtils::Array<3> correction = m_correction (myctx); + // the_aeta = std::abs (cluster->eta() ); @@ -121,26 +99,26 @@ void CaloSwCalibHitsCalibration::makeTheCorrection unsigned int shape[] = {2}; CaloRec::WritableArrayData<1> interp_barriers (shape); - interp_barriers[0] = m_eta_start_crack; - interp_barriers[1] = m_eta_end_crack; + interp_barriers[0] = eta_start_crack; + interp_barriers[1] = eta_end_crack; - int ibin = (static_cast<int> (the_aeta / m_etamax * 100)) ; + int ibin = (static_cast<int> (the_aeta / etamax * 100)) ; int ibin_frontCorr = ibin; - if (m_fix_v6_pathologies) { - if (the_aeta>2.35) ibin_frontCorr = (static_cast<int> (2.35 / m_etamax * 100)) ; + if (m_fix_v6_pathologies (myctx)) { + if (the_aeta>2.35) ibin_frontCorr = (static_cast<int> (2.35 / etamax * 100)) ; } // ------------------------------------------------------------- // Load calibration coefficients // ------------------------------------------------------------- - CaloRec::Array<1> acc = m_correction[0][ibin]; - CaloRec::Array<1> ooc = m_correction[1][ibin]; - CaloRec::Array<1> lleak = m_correction[2][ibin]; - CaloRec::Array<1> froffset = m_correction[3][ibin_frontCorr]; - CaloRec::Array<1> frslope = m_correction[4][ibin_frontCorr]; - CaloRec::Array<1> sec = m_correction[5][ibin_frontCorr]; + CaloRec::Array<1> acc = correction[0][ibin]; + CaloRec::Array<1> ooc = correction[1][ibin]; + CaloRec::Array<1> lleak = correction[2][ibin]; + CaloRec::Array<1> froffset = correction[3][ibin_frontCorr]; + CaloRec::Array<1> frslope = correction[4][ibin_frontCorr]; + CaloRec::Array<1> sec = correction[5][ibin_frontCorr]; ATH_MSG_DEBUG( "Check etas -------------------------------------------------------------------"<< endmsg); ATH_MSG_DEBUG( "Eta --> " << the_aeta << " Bin --> " << ibin <<" Cluster eta = " << cluster->eta() << endmsg); @@ -173,7 +151,12 @@ void CaloSwCalibHitsCalibration::makeTheCorrection // Compute longitudinal barycenter: this is a very old and approximate // parametrization that needs to be updated. -double shower_lbary = m_showerDepth.depth (the_aeta, cluster, msg() ); + double shower_lbary = m_showerDepth.depth (the_aeta, + eta_start_crack, + eta_end_crack, + m_sampling_depth(myctx), + etamax, + cluster, msg() ); if (shower_lbary == 0) return; if (shower_lbary < 5. || shower_lbary > 25.) { @@ -219,10 +202,10 @@ double shower_lbary = m_showerDepth.depth (the_aeta, cluster, msg() ); acc[1] + acc[2] * shower_lbary + acc[3] * shower_lbary * shower_lbary ; double e_out_perc = 0; - if (the_aeta < m_eta_start_crack) { + if (the_aeta < eta_start_crack) { e_out_perc = ooc[1] + ooc[2] * shower_lbary + ooc[3] * shower_lbary * shower_lbary ; } - else if (the_aeta > m_eta_end_crack) { + else if (the_aeta > eta_end_crack) { e_out_perc = ooc[1] + ooc[2] * shower_lbary + ooc[3] / shower_lbary ; } @@ -234,9 +217,9 @@ double shower_lbary = m_showerDepth.depth (the_aeta, cluster, msg() ); double e_leak_perc = 0; /* - if (the_aeta < m_eta_start_crack) { + if (the_aeta < eta_start_crack) { e_leak_perc = lleak[1] + lleak[2] * shower_lbary + lleak[3] * exp(shower_lbary); - } else if (the_aeta > m_eta_end_crack) { + } else if (the_aeta > eta_end_crack) { e_leak_perc = lleak[1] * shower_lbary + lleak[2] * exp(shower_lbary); } */ @@ -261,7 +244,7 @@ double shower_lbary = m_showerDepth.depth (the_aeta, cluster, msg() ); } else if (the_aeta < 1.8) { - if (the_aeta < m_eta_start_crack) { + if (the_aeta < eta_start_crack) { double WpsOff = froffset[1] + froffset[2] * raw_energy + froffset[3] * raw_energy * raw_energy; double WpsSlo = frslope[1] * pow(log(raw_energy), @@ -348,7 +331,7 @@ double shower_lbary = m_showerDepth.depth (the_aeta, cluster, msg() ); Please note that E != E0+E1+E2+E3 ------------------------------------------------------------- */ - if (m_updateSamplingEnergies) + if (m_updateSamplingEnergies (myctx)) { // presampler diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwCalibHitsCalibration.h b/Calorimeter/CaloClusterCorrection/src/CaloSwCalibHitsCalibration.h index 0a056da5235932bfcec6d872f606e71de74a9257..ac997540eb1a6c5026daefac2728110980ef069b 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwCalibHitsCalibration.h +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwCalibHitsCalibration.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef CALOCLUSTERCORRECTION_CALOSWCALIBHITSCALIBRATION_H @@ -24,14 +24,13 @@ PURPOSE: Calibrate SW em clusters with coefficients extracted class CaloSwCalibHitsCalibration : public CaloClusterCorrectionCommon { public: - // constructor - CaloSwCalibHitsCalibration (const std::string& type, - const std::string& name, - const IInterface* parent); + /// Inherit constructor. + using CaloClusterCorrectionCommon::CaloClusterCorrectionCommon; + /** * @brief Virtual function for the correction-specific code. - * @param ctx The event context. + * @param myctx ToolWithConstants context. * @param cluster The cluster to correct. * It is updated in place. * @param elt The detector description element corresponding @@ -49,7 +48,7 @@ public: * @c CaloSampling::CaloSample; i.e., it has both * the calorimeter region and sampling encoded. */ - virtual void makeTheCorrection (const EventContext& ctx, + virtual void makeTheCorrection (const Context& myctx, xAOD::CaloCluster* cluster, const CaloDetDescrElement* elt, float eta, @@ -60,18 +59,14 @@ public: private: - - - CaloRec::Array<3> m_correction; - CaloRec::Array<2> m_sampling_depth; - float m_eta_start_crack; - float m_eta_end_crack; - float m_etamax; - //int m_degree; - bool m_use_raw_eta; - //bool m_preserve_offset; - bool m_fix_v6_pathologies; - bool m_updateSamplingEnergies; + Constant<CxxUtils::Array<3> > m_correction { this, "correction", "" }; + Constant<CxxUtils::Array<2> > m_sampling_depth{ this, "sampling_depth", "" }; + Constant<float> m_eta_start_crack { this, "eta_start_crack", "" }; + Constant<float> m_eta_end_crack { this, "eta_end_crack", "" }; + Constant<float> m_etamax { this, "etamax", "" }; + Constant<bool> m_use_raw_eta { this, "use_raw_eta", "" }; + Constant<bool> m_fix_v6_pathologies { this, "fix_v6_pathologies", "" }; + Constant<bool> m_updateSamplingEnergies { this, "update_sampling_energies", true, "" }; CaloClusterCorr::CaloSwCalibHitsShowerDepth m_showerDepth; }; diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwCalibHitsShowerDepth.cxx b/Calorimeter/CaloClusterCorrection/src/CaloSwCalibHitsShowerDepth.cxx index fdd0e9ef2669e0376c01433b5226e4551d185ebd..9470279db37d05a3d124ff02681bee0f4c043722 100644 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwCalibHitsShowerDepth.cxx +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwCalibHitsShowerDepth.cxx @@ -1,8 +1,6 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ - -// $Id$ /** * @file CaloClusterCorrection/src/CaloSwCalibHitsShowerDepth.cxx * @author scott snyder <snyder@bnl.gov> @@ -18,50 +16,40 @@ namespace CaloClusterCorr { -/** - * @brief Constructor. - * @param sampling_depth Array of sampling depths per bin/sampling in the EC. - * @param start_crack Eta of the start of the crack. - * @param end_crack Eta of the end of the crack. - * @param etamax Maximum eta value in @a sampling_depth. - * - * Note that the sampling depth is used only in the endcap. - * Parameters for the barrel are hardcoded. (FIXME!) - * Parameters are passed by reference to allow them to be changed. - */ using xAOD::CaloCluster; -CaloSwCalibHitsShowerDepth::CaloSwCalibHitsShowerDepth - (const CaloRec::Array<2>& sampling_depth, - const float& start_crack, - const float& end_crack, - const float& etamax) - : m_sampling_depth (sampling_depth), - m_start_crack (start_crack), - m_end_crack (end_crack), - m_etamax (etamax) -{ -} /** * @brief Calculate the depth of the cluster. * @param aeta abs(eta) of the cluster. + * @param start_crack Eta of the start of the crack. + * @param end_crack Eta of the end of the crack. + * @param sampling_depth Array of sampling depths per bin/sampling in the EC. + * @param etamax Maximum eta value in @a sampling_depth. * @param cluster Cluster for which to calculate the depth. * @param log Stream for debug messages. + * + * Note that the sampling depth is used only in the endcap. + * Parameters for the barrel are hardcoded. (FIXME!) + * Parameters are passed by reference to allow them to be changed. */ -double CaloSwCalibHitsShowerDepth::depth (float aeta, +double CaloSwCalibHitsShowerDepth::depth (const float aeta, + const float start_crack, + const float end_crack, + const CaloRec::Array<2>& sampling_depth, + const float etamax, const xAOD::CaloCluster* cluster, MsgStream& log) const { float R[4]; int si; - if (aeta < m_start_crack) { + if (aeta < start_crack) { barrelCoefs (aeta, R); si = 0; } - else if (aeta > m_end_crack) { - if (!endcapCoefs (aeta, R)) + else if (aeta > end_crack) { + if (!endcapCoefs (aeta, sampling_depth, etamax, R)) return 0; si = 1; } @@ -103,7 +91,8 @@ double CaloSwCalibHitsShowerDepth::depth (float aeta, * @param aeta abs(eta) of the cluster. * @param R[out] The set of coefficients per layer. */ -void CaloSwCalibHitsShowerDepth::barrelCoefs (float aeta, float R[4]) const +void CaloSwCalibHitsShowerDepth::barrelCoefs (const float aeta, + float R[4]) const { //---------------------------------------------------------------------- // APPROXIMATE Longitudinal segmentation of the EM Barrel @@ -172,16 +161,21 @@ void CaloSwCalibHitsShowerDepth::barrelCoefs (float aeta, float R[4]) const /** * @brief Calculate the sampling depth coefficients for the endcap. * @param aeta abs(eta) of the cluster. + * @param etamax Maximum eta value in @a sampling_depth. + * @param etamax Maximum eta value in @a sampling_depth. * @param R[out] The set of coefficients per layer. */ -bool CaloSwCalibHitsShowerDepth::endcapCoefs (float aeta, float R[4]) const +bool CaloSwCalibHitsShowerDepth::endcapCoefs (const float aeta, + const CaloRec::Array<2>& sampling_depth, + const float etamax, + float R[4]) const { - unsigned int ibin = (static_cast<unsigned int> (aeta / m_etamax * 100)) ; - if (ibin >= m_sampling_depth.size()) + unsigned int ibin = (static_cast<unsigned int> (aeta / etamax * 100)) ; + if (ibin >= sampling_depth.size()) return false; for (int i=0; i < 4; i++) - R[i] = m_sampling_depth[ibin][i+1]; + R[i] = sampling_depth[ibin][i+1]; return true; } diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwClcon_g3.cxx b/Calorimeter/CaloClusterCorrection/src/CaloSwClcon_g3.cxx index 5e52bb22946b8a19d20f3e936db85aa96ab74a3e..367a4df077086404e3c51687dfb0df0bda75010d 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwClcon_g3.cxx +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwClcon_g3.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /******************************************************************** @@ -39,40 +39,27 @@ Updated: June, 2004 (sss) #include "GaudiKernel/MsgStream.h" #include <cmath> -// ------------------------------------------------------------- -// Constructor -// ------------------------------------------------------------- -using xAOD::CaloCluster; -CaloSwClcon_g3::CaloSwClcon_g3(const std::string& type, - const std::string& name, - const IInterface* parent) - : CaloClusterCorrection(type, name, parent) -{ - declareConstant ("etamin", m_etamin); - declareConstant ("etamax", m_etamax); - declareConstant ("correction", m_correction); -} - -// ------------------------------------------------------------- -// Destructor -// ------------------------------------------------------------- -CaloSwClcon_g3::~CaloSwClcon_g3() -{ } +using xAOD::CaloCluster; // apply correction to one cluster. -void CaloSwClcon_g3::makeCorrection(const EventContext& /*ctx*/, - CaloCluster* cluster) const +void CaloSwClcon_g3::makeCorrection (const Context& myctx, + CaloCluster* cluster) const { + const float etamin = m_etamin (myctx); + const float etamax = m_etamax (myctx); + float eta = cluster->eta(); float aeta = fabs(eta); - if (aeta < m_etamin || aeta >= m_etamax) return; - if (m_correction.size() == 0) return; + if (aeta < etamin || aeta >= etamax) return; + + const CxxUtils::Array<1> correction = m_correction (myctx); + if (correction.size() == 0) return; // Determine the correction - double granularity = (m_etamax - m_etamin) / m_correction.size(); - int i = static_cast<int> ((aeta - m_etamin)/granularity); - float qclcon = m_correction[i]; + double granularity = (etamax - etamin) / correction.size(); + int i = static_cast<int> ((aeta - etamin)/granularity); + float qclcon = correction[i]; // Do the Correction setenergy(cluster, qclcon * cluster->e()); diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwClcon_g3.h b/Calorimeter/CaloClusterCorrection/src/CaloSwClcon_g3.h index eaa5848516cb091aafa49ecaae74f81e644e4ad6..a191c0744f85806d87b47cbabb5e4132f45ab2eb 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwClcon_g3.h +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwClcon_g3.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef CALOCLUSTERCORRECTION_CALOSWCLCON_G3_H @@ -41,20 +41,16 @@ class CaloSwClcon_g3 : public CaloClusterCorrection { public: + /// Inherit contructor. + using CaloClusterCorrection::CaloClusterCorrection; + - // constructor - CaloSwClcon_g3(const std::string& type, - const std::string& name, - const IInterface* parent); - // Destructor - virtual ~CaloSwClcon_g3() override; - // CaloClusterCorrection virtual method - virtual void makeCorrection(const EventContext& ctx, - xAOD::CaloCluster* cluster) const override; + virtual void makeCorrection (const Context& myctx, + xAOD::CaloCluster* cluster) const override; /// Currently at version==1. - virtual int version() const override; + virtual int version() const; private: @@ -63,9 +59,9 @@ class CaloSwClcon_g3 : public CaloClusterCorrection // constants : etamin and etamax are the eta range covered // by the fitted corrections => nothing to do with // DetectorDescription. - float m_etamin; - float m_etamax; - CaloRec::Array<1> m_correction; + Constant<float> m_etamin { this, "etamin", "" }; + Constant<float> m_etamax { this, "etamax", "" }; + Constant<CxxUtils::Array<1> > m_correction { this, "correction", "" }; }; diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwClcon_v2.cxx b/Calorimeter/CaloClusterCorrection/src/CaloSwClcon_v2.cxx index 4535f61c876c5c3bce1ffa91bd5b97698993240c..2fe205771ec84d2b480f36510573f7a64d0cd409 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwClcon_v2.cxx +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwClcon_v2.cxx @@ -1,8 +1,6 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ - -// $Id: CaloSwClcon_v2.cxx,v 1.3 2008-01-25 04:14:22 ssnyder Exp $ /** * @file CaloSwClcon_v2.cxx * @author scott snyder <snyder@bnl.gov> @@ -46,29 +44,9 @@ using xAOD::CaloCluster; using CaloClusterCorr::interpolate; -/** - * @brief Constructor. - * @param type The type of the tool. - * @param name The name of the tool. - * @param parent The parent algorithm of the tool. - */ -CaloSwClcon_v2::CaloSwClcon_v2 (const std::string& type, - const std::string& name, - const IInterface* parent) - : CaloClusterCorrectionCommon(type, name, parent) -{ - declareConstant ("etamax", m_etamax); - declareConstant ("degree", m_degree); - declareConstant ("correction", m_correction); - declareConstant ("energies", m_energies); - declareConstant ("energy_degree", m_energy_degree); - declareConstant ("use_raw_eta", m_use_raw_eta); -} - - /** * @brief Virtual function for the correction-specific code. - * @param ctx The event context. + * @param myctx ToolWithConstants context. * @param cluster The cluster to correct. * It is updated in place. * @param elt The detector description element corresponding @@ -86,7 +64,7 @@ CaloSwClcon_v2::CaloSwClcon_v2 (const std::string& type, * @c CaloSampling::CaloSample; i.e., it has both * the calorimeter region and sampling encoded. */ -void CaloSwClcon_v2::makeTheCorrection (const EventContext& /*ctx*/, +void CaloSwClcon_v2::makeTheCorrection (const Context& myctx, CaloCluster* cluster, const CaloDetDescrElement* /*elt*/, float eta, @@ -100,24 +78,27 @@ void CaloSwClcon_v2::makeTheCorrection (const EventContext& /*ctx*/, // and range checks. However, the v2 corrections were derived // using regular eta instead. float the_aeta; - if (m_use_raw_eta) + if (m_use_raw_eta (myctx)) the_aeta = std::abs (adj_eta); else the_aeta = std::abs (eta); - if (the_aeta >= m_etamax) + if (the_aeta >= m_etamax (myctx)) return; + const CxxUtils::Array<2> correction = m_correction (myctx); + const CxxUtils::Array<1> energies = m_energies (myctx); + // Calculate the correction for each energy. - unsigned int n_energies = m_energies.size(); + unsigned int n_energies = energies.size(); unsigned int shape[] = {n_energies, 2}; CaloRec::WritableArrayData<2> offstab (shape); for (unsigned int i=0; i<n_energies; i++) { - offstab[i][0] = m_energies[i]; - offstab[i][1] = interpolate (m_correction, + offstab[i][0] = energies[i]; + offstab[i][1] = interpolate (correction, the_aeta, - m_degree, + m_degree (myctx), i+1); } @@ -131,7 +112,7 @@ void CaloSwClcon_v2::makeTheCorrection (const EventContext& /*ctx*/, else if (energy >= offstab[n_energies-1][0]) corr = offstab[n_energies-1][1]; else - corr = interpolate (offstab, energy, m_energy_degree); + corr = interpolate (offstab, energy, m_energy_degree (myctx)); // Do the correction setenergy (cluster, corr * cluster->e()); diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwClcon_v2.h b/Calorimeter/CaloClusterCorrection/src/CaloSwClcon_v2.h index 75534da6268c7d181a513b3cee0c6d87b15d19dc..51c3361733add1b62bfe2ade4565fe288083fa95 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwClcon_v2.h +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwClcon_v2.h @@ -1,10 +1,7 @@ // This file's extension implies that it's C, but it's really -*- C++ -*-. - /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ - -// $Id: CaloSwClcon_v2.h,v 1.4 2008-01-25 04:14:20 ssnyder Exp $ /** * @file CaloSwClcon_v2.h * @author scott snyder <snyder@bnl.gov> @@ -72,14 +69,13 @@ class CaloSwClcon_v2 : public CaloClusterCorrectionCommon { public: - // constructor - CaloSwClcon_v2 (const std::string& type, - const std::string& name, - const IInterface* parent); + // Inherit constructor. + using CaloClusterCorrectionCommon::CaloClusterCorrectionCommon; + /** * @brief Virtual function for the correction-specific code. - * @param ctx The event context. + * @param myctx ToolWithConstants context. * @param cluster The cluster to correct. * It is updated in place. * @param elt The detector description element corresponding @@ -97,7 +93,7 @@ class CaloSwClcon_v2 : * @c CaloSampling::CaloSample; i.e., it has both * the calorimeter region and sampling encoded. */ - virtual void makeTheCorrection (const EventContext& ctx, + virtual void makeTheCorrection (const Context& myctx, xAOD::CaloCluster* cluster, const CaloDetDescrElement* elt, float eta, @@ -109,24 +105,30 @@ class CaloSwClcon_v2 : private: /// Calibration constant: maximum eta for which this correction is defined. - float m_etamax; + Constant<float> m_etamax + { this, "etamax", "Maximum eta for which this correction is defined." }; /// Calibration constant: degree of the polynomial interpolation. - int m_degree; + Constant<int> m_degree + { this, "degree", "Degree of the polynomial interpolation." }; /// Calibration constant: tabulated arrays of function parameters. - CaloRec::Array<2> m_correction; + Constant<CxxUtils::Array<2> > m_correction + { this, "correction", "Tabulated arrays of function parameters." }; /// Calibration constant: table of energies at which the correction /// was tabulated. - CaloRec::Array<1> m_energies; + Constant<CxxUtils::Array<1> > m_energies + { this, "energies", "Table of energies at which the correctionwas tabulated." }; /// Calibration constant: degree of the polynomial interpolation in energy. - int m_energy_degree; + Constant<int> m_energy_degree + { this, "energy_degree", "Degree of the polynomial interpolation in energy." }; /// Calibration constant: If true, tabulated values are in terms of /// raw (local) eta. - bool m_use_raw_eta; + Constant<bool> m_use_raw_eta + { this, "use_raw_eta", "If true, tabulated values are in terms of raw (local) eta." }; }; diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwDeadOTX_back.cxx b/Calorimeter/CaloClusterCorrection/src/CaloSwDeadOTX_back.cxx index 3b1650e85639734737abde34894255db001baa47..e9e63d6309df60dce371fca679aacdfbceac56eb 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwDeadOTX_back.cxx +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwDeadOTX_back.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /******************************************************************** @@ -25,23 +25,6 @@ PURPOSE: Apply specif calibration for the energy in the back using xAOD::CaloCluster; using CLHEP::TeV; -// ------------------------------------------------------------- -// Constructor -// ------------------------------------------------------------- - -CaloSwDeadOTX_back::CaloSwDeadOTX_back - (const std::string& type, - const std::string& name, - const IInterface* parent) - : CaloClusterCorrectionCommon(type, name, parent) -{ - declareConstant("correction" , m_correction); - declareConstant("sampling_depth" , m_sampling_depth); - declareConstant("eta_start_crack" , m_eta_start_crack); - declareConstant("eta_end_crack" , m_eta_end_crack); - declareConstant("etamax" , m_etamax); - declareConstant("use_raw_eta" , m_use_raw_eta); -} StatusCode CaloSwDeadOTX_back::initialize() { @@ -66,7 +49,7 @@ StatusCode CaloSwDeadOTX_back::initialize() } void CaloSwDeadOTX_back::makeTheCorrection - (const EventContext& ctx, + (const Context& myctx, CaloCluster* cluster, const CaloDetDescrElement* /*elt*/, float eta, @@ -75,36 +58,37 @@ void CaloSwDeadOTX_back::makeTheCorrection float /*adj_phi*/, CaloSampling::CaloSample /*samp*/) const { - // ??? In principle, we should use adj_eta for the interpolation // and range checks. However, the v2 corrections were derived // using regular eta instead. // //Get affected info for this event - SG::ReadCondHandle<CaloAffectedRegionInfoVec> affHdl{m_affKey,ctx}; + SG::ReadCondHandle<CaloAffectedRegionInfoVec> affHdl{m_affKey, myctx.ctx()}; const CaloAffectedRegionInfoVec* affCont=*affHdl; if(!affCont) { ATH_MSG_WARNING("Do not have affected regions info, is this expected ?"); } float the_aeta; - if (m_use_raw_eta) + if (m_use_raw_eta(myctx)) the_aeta = std::abs (adj_eta); else the_aeta = std::abs (eta); - if (the_aeta >= m_etamax) return; + const float etamax = m_etamax (myctx); + if (the_aeta >= etamax) return; int si; - if (the_aeta < m_eta_start_crack) + if (the_aeta < m_eta_start_crack(myctx)) si = 0; - else if (the_aeta > m_eta_end_crack) + else if (the_aeta > m_eta_end_crack(myctx)) si = 1; else { // No corrections are applied for the crack region. return; } + const CxxUtils::Array<3> correction = m_correction (myctx); ATH_MSG_DEBUG( "************************************************************************************************" << endmsg); ATH_MSG_DEBUG( " USING CALIBHITS CALIBRATION : apply correction for dead OTX in the back" << endmsg); @@ -153,10 +137,10 @@ void CaloSwDeadOTX_back::makeTheCorrection // ------------------------------------------------------------- // Determine the eta bin for the correction - int ibin = (static_cast<int> (the_aeta / m_etamax * 100)) ; + int ibin = (static_cast<int> (the_aeta / etamax * 100)) ; // Load the correction coefficients - CaloRec::Array<1> lleak = m_correction[0][ibin]; + CaloRec::Array<1> lleak = correction[0][ibin]; // ------------------------------------------------------------- // Compute longitudinal barycenter: this is a very old and approximate @@ -167,7 +151,7 @@ void CaloSwDeadOTX_back::makeTheCorrection double shower_lbary_raw =0; for (int nl = 0 ; nl< 4 ; nl++){ raw_energy += cluster->eSample (samps[si][nl]); - shower_lbary_raw += (m_sampling_depth[ibin][nl+1] * cluster->eSample (samps[si][nl])) ; + shower_lbary_raw += (m_sampling_depth(myctx)[ibin][nl+1] * cluster->eSample (samps[si][nl])) ; } if (raw_energy == 0) return; diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwDeadOTX_back.h b/Calorimeter/CaloClusterCorrection/src/CaloSwDeadOTX_back.h index 412f989651614c20880017c20552d99b8ea0b362..ed48d8b6a64e3dd60e84ea817e02d10754a731bd 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwDeadOTX_back.h +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwDeadOTX_back.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef CALOCLUSTERCORRECTION_CALOSWDEADOTX_BACK_H @@ -20,14 +20,13 @@ PACKAGE: offline/Calorimeter/CaloClusterCorrection class CaloSwDeadOTX_back : public CaloClusterCorrectionCommon { public: - // constructor - CaloSwDeadOTX_back (const std::string& type, - const std::string& name, - const IInterface* parent); + /// Inherit constructor. + using CaloClusterCorrectionCommon::CaloClusterCorrectionCommon; + /** * @brief Virtual function for the correction-specific code. - * @param ctx The event context. + * @param myctx ToolWithConstants context. * @param cluster The cluster to correct. * It is updated in place. * @param elt The detector description element corresponding @@ -45,7 +44,7 @@ public: * @c CaloSampling::CaloSample; i.e., it has both * the calorimeter region and sampling encoded. */ - virtual void makeTheCorrection (const EventContext& ctx, + virtual void makeTheCorrection (const Context& muctx, xAOD::CaloCluster* cluster, const CaloDetDescrElement* elt, float eta, @@ -63,14 +62,12 @@ public: ToolHandle<ICaloAffectedTool> m_affectedTool{this, "AffectedTool", "CaloAffectedTool", "affected tool instance"}; - CaloRec::Array<3> m_correction; - CaloRec::Array<2> m_sampling_depth; - float m_eta_start_crack; - float m_eta_end_crack; - float m_etamax; - bool m_use_raw_eta; - - + Constant<CxxUtils::Array<3> > m_correction { this, "correction", "" }; + Constant<CxxUtils::Array<2> > m_sampling_depth { this, "sampling_depth", ""}; + Constant<float> m_eta_start_crack { this, "eta_start_crack",""}; + Constant<float> m_eta_end_crack { this, "eta_end_crack", "" }; + Constant<float> m_etamax { this, "etamax", "" }; + Constant<bool> m_use_raw_eta { this, "use_raw_eta", "" }; }; #endif diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwDeadOTX_ps.cxx b/Calorimeter/CaloClusterCorrection/src/CaloSwDeadOTX_ps.cxx index 907e6cb861317ca3011ea82e84f71f3a6d15a9d4..4ce32e3a14baea650457ab85cd1eabebbca503dd 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwDeadOTX_ps.cxx +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwDeadOTX_ps.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /******************************************************************** @@ -24,23 +24,6 @@ PURPOSE: Apply specif calibration for the energy lost in front using xAOD::CaloCluster; using CLHEP::TeV; -// ------------------------------------------------------------- -// Constructor -// ------------------------------------------------------------- - -CaloSwDeadOTX_ps::CaloSwDeadOTX_ps - (const std::string& type, - const std::string& name, - const IInterface* parent) - : CaloClusterCorrectionCommon(type, name, parent) -{ - declareConstant("correction" , m_correction); - declareConstant("sampling_depth" , m_sampling_depth); - declareConstant("eta_start_crack" , m_eta_start_crack); - declareConstant("eta_end_crack" , m_eta_end_crack); - declareConstant("etamax" , m_etamax); - declareConstant("use_raw_eta" , m_use_raw_eta); -} StatusCode CaloSwDeadOTX_ps::initialize() { @@ -65,7 +48,7 @@ StatusCode CaloSwDeadOTX_ps::initialize() } void CaloSwDeadOTX_ps::makeTheCorrection - (const EventContext& ctx, + (const Context& myctx, CaloCluster* cluster, const CaloDetDescrElement* /*elt*/, float eta, @@ -74,36 +57,37 @@ void CaloSwDeadOTX_ps::makeTheCorrection float /*adj_phi*/, CaloSampling::CaloSample /*samp*/) const { - // ??? In principle, we should use adj_eta for the interpolation // and range checks. However, the v2 corrections were derived // using regular eta instead. //Get affected info for this event - SG::ReadCondHandle<CaloAffectedRegionInfoVec> affHdl{m_affKey,ctx}; + SG::ReadCondHandle<CaloAffectedRegionInfoVec> affHdl{m_affKey, myctx.ctx()}; const CaloAffectedRegionInfoVec* affCont=*affHdl; if(!affCont) { ATH_MSG_WARNING("Do not have affected regions info, is this expected ?"); } float the_aeta; - if (m_use_raw_eta) + if (m_use_raw_eta(myctx)) the_aeta = std::abs (adj_eta); else the_aeta = std::abs (eta); - if (the_aeta >= m_etamax) return; + const float etamax = m_etamax (myctx); + if (the_aeta >= etamax) return; int si; - if (the_aeta < m_eta_start_crack) + if (the_aeta < m_eta_start_crack(myctx)) si = 0; - else if (the_aeta > m_eta_end_crack) + else if (the_aeta > m_eta_end_crack(myctx)) si = 1; else { // No corrections are applied for the crack region. return; } + const CxxUtils::Array<3> correction = m_correction (myctx); ATH_MSG_DEBUG( "************************************************************************************************" << endmsg); ATH_MSG_DEBUG( " USING CALIBHITS CALIBRATION : apply correction for dead OTX in the presampler" << endmsg); @@ -153,12 +137,12 @@ void CaloSwDeadOTX_ps::makeTheCorrection // ------------------------------------------------------------- // Determine the eta bin for the correction - int ibin = (static_cast<int> (the_aeta / m_etamax * 100)) ; + int ibin = (static_cast<int> (the_aeta / etamax * 100)) ; // Load the correction coefficients - CaloRec::Array<1> froffset = m_correction[0][ibin]; - CaloRec::Array<1> frslope = m_correction[1][ibin]; - CaloRec::Array<1> sec = m_correction[2][ibin]; + CaloRec::Array<1> froffset = correction[0][ibin]; + CaloRec::Array<1> frslope = correction[1][ibin]; + CaloRec::Array<1> sec = correction[2][ibin]; // ------------------------------------------------------------- // Compute longitudinal barycenter: this is a very old and approximate @@ -169,7 +153,7 @@ void CaloSwDeadOTX_ps::makeTheCorrection double shower_lbary_raw =0; for (int nl = 0 ; nl< 4 ; nl++){ raw_energy += cluster->eSample (samps[si][nl]); - shower_lbary_raw += (m_sampling_depth[ibin][nl+1] * cluster->eSample (samps[si][nl])) ; + shower_lbary_raw += (m_sampling_depth(myctx)[ibin][nl+1] * cluster->eSample (samps[si][nl])) ; } if (raw_energy == 0) return; diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwDeadOTX_ps.h b/Calorimeter/CaloClusterCorrection/src/CaloSwDeadOTX_ps.h index fe5185fe7c859455f4d09cc11d862c2412125fa4..d3bd6ba7353e77125cde22b9b3e70034a1fc9356 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwDeadOTX_ps.h +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwDeadOTX_ps.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef CALOCLUSTERCORRECTION_CALOSWDEADOTX_PS_H @@ -20,14 +20,13 @@ PACKAGE: offline/Calorimeter/CaloClusterCorrection class CaloSwDeadOTX_ps : public CaloClusterCorrectionCommon { public: - // constructor - CaloSwDeadOTX_ps (const std::string& type, - const std::string& name, - const IInterface* parent); + // Inherit constructor + using CaloClusterCorrectionCommon::CaloClusterCorrectionCommon; + /** * @brief Virtual function for the correction-specific code. - * @param ctx The event context. + * @param myctx ToolWithConstants context. * @param cluster The cluster to correct. * It is updated in place. * @param elt The detector description element corresponding @@ -45,7 +44,7 @@ public: * @c CaloSampling::CaloSample; i.e., it has both * the calorimeter region and sampling encoded. */ - virtual void makeTheCorrection (const EventContext& /*ctx*/, + virtual void makeTheCorrection (const Context& myctx, xAOD::CaloCluster* cluster, const CaloDetDescrElement* elt, float eta, @@ -62,14 +61,13 @@ public: "LArAffectedRegionKey", "LArAffectedRegionInfo", "SG key for affected regions cond object"}; ToolHandle<ICaloAffectedTool> m_affectedTool{this, "AffectedTool", "CaloAffectedTool", "affected tool instance"}; - CaloRec::Array<3> m_correction; - CaloRec::Array<2> m_sampling_depth; - float m_eta_start_crack; - float m_eta_end_crack; - float m_etamax; - bool m_use_raw_eta; - + Constant<CxxUtils::Array<3> > m_correction { this, "correction", "" }; + Constant<CxxUtils::Array<2> > m_sampling_depth { this, "sampling_depth", ""}; + Constant<float> m_eta_start_crack { this, "eta_start_crack",""}; + Constant<float> m_eta_end_crack { this, "eta_end_crack", "" }; + Constant<float> m_etamax { this, "etamax", "" }; + Constant<bool> m_use_raw_eta { this, "use_raw_eta", "" }; }; #endif diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwECcrack_g3.cxx b/Calorimeter/CaloClusterCorrection/src/CaloSwECcrack_g3.cxx index 430b77d361d5a40172d43df1e4e8f4a66a837a3f..57a4debf402cad4bff790432b8725d523ba7d371 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwECcrack_g3.cxx +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwECcrack_g3.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /******************************************************************** @@ -36,17 +36,9 @@ const float CaloSwECcrack_g3::P0[3] = {116.8, 169.77, 62.224}; const float CaloSwECcrack_g3::P1[1] = {1.614}; const float CaloSwECcrack_g3::P2[3] = {188.1, 242.89, 78.836}; -CaloSwECcrack_g3::CaloSwECcrack_g3(const std::string& type, - const std::string& name, - const IInterface* parent) - : CaloClusterCorrection(type,name,parent) -{ } -CaloSwECcrack_g3::~CaloSwECcrack_g3() -{ } - -void CaloSwECcrack_g3::makeCorrection(const EventContext& /*ctx*/, - CaloCluster* cluster) const +void CaloSwECcrack_g3::makeCorrection (const Context& /*myctx*/, + CaloCluster* cluster) const { float eta = cluster->etaBE(2); // use second sampling diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwECcrack_g3.h b/Calorimeter/CaloClusterCorrection/src/CaloSwECcrack_g3.h index f826ce23ff4dcd2a755499b604d277078774e382..9cfa2a3fc5840ad26a4ae48ea0c19d3006b8dd9a 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwECcrack_g3.h +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwECcrack_g3.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef CALOCLUSTERCORRECTION_CALOSWECCRACK_G3_H @@ -40,16 +40,11 @@ class CaloSwECcrack_g3 : public CaloClusterCorrection { public: - - // constructor - CaloSwECcrack_g3(const std::string& type, - const std::string& name, - const IInterface* parent); - // destructor - virtual ~CaloSwECcrack_g3() override; + // Inherit constructor. + using CaloClusterCorrection::CaloClusterCorrection; - virtual void makeCorrection(const EventContext& ctx, - xAOD::CaloCluster* cluster) const override; + virtual void makeCorrection (const Context& myctx, + xAOD::CaloCluster* cluster) const override; private: diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwEta1b_g3.cxx b/Calorimeter/CaloClusterCorrection/src/CaloSwEta1b_g3.cxx index a1ffdcc4771df494583684a0eb4b999d677380e0..813a9a4b8c568097d70551eb1572e9e54ec53c2a 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwEta1b_g3.cxx +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwEta1b_g3.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /******************************************************************** @@ -41,39 +41,19 @@ using CaloClusterCorr::interpolate; const float CaloSwEta1b_g3::s_strip_granularity = 0.003125; // 0.025/8 -// ------------------------------------------------------------- -// Constructor -// ------------------------------------------------------------- -CaloSwEta1b_g3::CaloSwEta1b_g3(const std::string& type, - const std::string& name, - const IInterface* parent) - : CaloClusterCorrection(type, name, parent, - "CaloSwEta${LAYER}${BE}_g3") -{ - declareConstant ("correction", m_correction); - declareConstant ("correction_bins", m_correction_bins); - declareConstant ("correction_degree", m_correction_degree); - declareConstant ("interp_degree", m_interp_degree); - declareConstant ("correction_coef", m_correction_coef); - declareConstant ("region", m_region, true/*temp*/); -} - -// ------------------------------------------------------------- -// Destructor -// ------------------------------------------------------------- -CaloSwEta1b_g3::~CaloSwEta1b_g3() -{ } - // make correction to one cluster. -void CaloSwEta1b_g3::makeCorrection(const EventContext& /*ctx*/, - CaloCluster* lar_cluster) const +void CaloSwEta1b_g3::makeCorrection (const Context& myctx, + CaloCluster* lar_cluster) const { - assert (m_correction.size(1)-1 == m_correction_bins.size()); - // Only for barrel if (!lar_cluster->inBarrel()) return; + const CxxUtils::Array<2> correction = m_correction(myctx); + const CxxUtils::Array<1> correction_bins = m_correction_bins(myctx); + const int correction_degree = m_correction_degree(myctx); + assert (correction.size(1)-1 == correction_bins.size()); + float eta = lar_cluster->etaSample(CaloSampling::EMB1); if (eta == -999.) return; float aeta = fabs(eta); @@ -81,16 +61,16 @@ void CaloSwEta1b_g3::makeCorrection(const EventContext& /*ctx*/, // we evaluate the s-shape in each eta range - unsigned int shape[] = {m_correction_bins.size(), 2}; + unsigned int shape[] = {correction_bins.size(), 2}; CaloRec::WritableArrayData<2> w (shape); - for (unsigned int i=0; i<m_correction_bins.size(); i++) { - w[i][0] = m_correction_bins[i]; - w[i][1] = interpolate (m_correction, u1, m_correction_degree, i+1); + for (unsigned int i=0; i<correction_bins.size(); i++) { + w[i][0] = correction_bins[i]; + w[i][1] = interpolate (correction, u1, correction_degree, i+1); }; // finally we interpolate for the actual eta2 - float deta = m_correction_coef * interpolate (w, aeta, m_interp_degree); + float deta = m_correction_coef(myctx) * interpolate (w, aeta, m_interp_degree(myctx)); if (eta < 0) deta = -deta; diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwEta1b_g3.h b/Calorimeter/CaloClusterCorrection/src/CaloSwEta1b_g3.h index 7c920d24044de43acaec9d59035181f1bcf84127..9ccdd768fb88d8afcc8abf670fe8cfe7579155d2 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwEta1b_g3.h +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwEta1b_g3.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef CALOCLUSTERCORRECTION_CALOSWETA1B_G3_H @@ -41,27 +41,23 @@ class CaloSwEta1b_g3 : public CaloClusterCorrection { public: - // constructor - CaloSwEta1b_g3(const std::string& type, - const std::string& name, - const IInterface* parent); - // destructor - virtual ~CaloSwEta1b_g3() override; + // Inherit constructor. + using CaloClusterCorrection::CaloClusterCorrection; // virtual method in CaloClusterCorrection - virtual void makeCorrection(const EventContext& ctx, - xAOD::CaloCluster* cluster) const override; + virtual void makeCorrection (const Context& myctx, + xAOD::CaloCluster* cluster) const override; private: CaloSwEta1b_g3() = delete; // parameters - CaloRec::Array<2> m_correction; - CaloRec::Array<1> m_correction_bins; - int m_correction_degree; - int m_interp_degree; - float m_correction_coef; - int m_region; + Constant<CxxUtils::Array<2> > m_correction { this, "correction", "" }; + Constant<CxxUtils::Array<1> > m_correction_bins { this, "correction_bins",""}; + Constant<int> m_correction_degree {this, "correction_degree", ""}; + Constant<int> m_interp_degree { this, "interp_degree", "" }; + Constant<float> m_correction_coef { this, "correction_coef", "" }; + Constant<int> m_region { this, "region", "" }; static const float s_strip_granularity; diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwEta1e_g3.cxx b/Calorimeter/CaloClusterCorrection/src/CaloSwEta1e_g3.cxx index 73b45ea9ee6aa29705fd731c064cd8993c6860d4..1d59212f0fad7ec03d51a77cf5bac12443a61bec 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwEta1e_g3.cxx +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwEta1e_g3.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /******************************************************************** @@ -39,35 +39,18 @@ using CaloClusterCorr::interpolate; const float CaloSwEta1e_g3::s_middle_layer_granularity = 0.025; -// ------------------------------------------------------------- -// Constructor -// ------------------------------------------------------------- -CaloSwEta1e_g3::CaloSwEta1e_g3(const std::string& type, - const std::string& name, - const IInterface* parent) - : CaloClusterCorrection(type,name,parent, - "CaloSwEta${LAYER}${BE}_g3") -{ - declareConstant ("correction", m_correction); - declareConstant ("correction_coef", m_correction_coef); - declareConstant ("correction_degree", m_correction_degree); - declareConstant ("region", m_region, true/*temp*/); -} - -// ------------------------------------------------------------- -// Destructor -// ------------------------------------------------------------- -CaloSwEta1e_g3::~CaloSwEta1e_g3() -{ } - // make correction to one cluster -void CaloSwEta1e_g3::makeCorrection(const EventContext& /*ctx*/, - CaloCluster* cluster) const +void CaloSwEta1e_g3::makeCorrection (const Context& myctx, + CaloCluster* cluster) const { // Only for endcap if (!cluster->inEndcap()) return; + const CxxUtils::Array<3> correction = m_correction (myctx); + const float correction_coef = m_correction_coef (myctx); + const int correction_degree = m_correction_degree (myctx); + float eta = cluster->etaSample(CaloSampling::EME1); if (eta == -999.) return; float etamax = cluster->etamax(CaloSampling::EME1); @@ -99,9 +82,9 @@ void CaloSwEta1e_g3::makeCorrection(const EventContext& /*ctx*/, float u = fmod(eta-etamax, ufrac/2.); u += ufrac/2.; if (eta < 0.) u = ufrac-u; - float deta = m_correction_coef * interpolate (m_correction[corrndx], - u, - m_correction_degree); + float deta = correction_coef * interpolate (correction[corrndx], + u, + correction_degree); if (eta < 0) deta = -deta; diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwEta1e_g3.h b/Calorimeter/CaloClusterCorrection/src/CaloSwEta1e_g3.h index abd34f5a2f106d4025fa7b52b0c035560dc2e71f..68d5e478763a6237ba98cfb80ac70a1feaad2422 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwEta1e_g3.h +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwEta1e_g3.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef CALOCLUSTERCORRECTION_CALOSWETA1E_G3_H @@ -37,26 +37,21 @@ class CaloSwEta1e_g3 : public CaloClusterCorrection { public: - - //constructor - CaloSwEta1e_g3(const std::string& type, - const std::string& name, - const IInterface* parent); - // destructor - virtual ~CaloSwEta1e_g3() override; + // Inherit construtor. + using CaloClusterCorrection::CaloClusterCorrection; // virtual method of CaloClusterCorrection - virtual void makeCorrection(const EventContext& ctx, - xAOD::CaloCluster* cluster) const override; + virtual void makeCorrection (const Context& myctx, + xAOD::CaloCluster* cluster) const override; private: CaloSwEta1e_g3() = delete; - CaloRec::Array<3> m_correction; - float m_correction_coef; - int m_correction_degree; - int m_region; + Constant<CxxUtils::Array<3> > m_correction { this, "correction", "" }; + Constant<float> m_correction_coef { this, "correction_coef", "" }; + Constant<int> m_correction_degree { this, "correction_degree", "" }; + Constant<int> m_region { this, "region", "" }; static const float s_middle_layer_granularity; }; diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwEta2b_g3.cxx b/Calorimeter/CaloClusterCorrection/src/CaloSwEta2b_g3.cxx index b3c05fb2d6631c2b386aba391a146e09606590dc..9df1b45e0d3c65628ba2867d033faaa14ad91601 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwEta2b_g3.cxx +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwEta2b_g3.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /******************************************************************** @@ -43,39 +43,27 @@ using CaloClusterCorr::interpolate; // granularity of middle EM barrel layer - const float CaloSwEta2b_g3::s_middle_layer_granularity = 0.025; +const float CaloSwEta2b_g3::s_middle_layer_granularity = 0.025; -CaloSwEta2b_g3::CaloSwEta2b_g3(const std::string& type, - const std::string& name, - const IInterface* parent) - : CaloClusterCorrection(type,name,parent, - "CaloSwEta${LAYER}${BE}_g3") +void CaloSwEta2b_g3::makeCorrection (const Context& myctx, + CaloCluster* cluster) const { - declareConstant ("correction", m_correction); - declareConstant ("residuals", m_residuals); - declareConstant ("residual_bins", m_residual_bins); - declareConstant ("correction_degree", m_correction_degree); - declareConstant ("residual_eval_degree", m_residual_eval_degree); - declareConstant ("residual_degree", m_residual_degree); - declareConstant ("correction_coef", m_correction_coef); - declareConstant ("residual_coef", m_residual_coef); - declareConstant ("region", m_region, true/*temp*/); -} - -CaloSwEta2b_g3::~CaloSwEta2b_g3() -{ } - - -void CaloSwEta2b_g3::makeCorrection(const EventContext& /*ctx*/, - CaloCluster* cluster) const -{ - assert (m_residuals.size(1)-1 == m_residual_bins.size()); - // Only for barrel if (!cluster->inBarrel()) return; + const CxxUtils::Array<2> correction = m_correction (myctx); + const CxxUtils::Array<2> residuals = m_residuals (myctx); + const CxxUtils::Array<1> residual_bins = m_residual_bins (myctx); + const int correction_degree = m_correction_degree(myctx); + const int residual_eval_degree = m_residual_eval_degree(myctx); + const int residual_degree = m_residual_degree(myctx); + const float correction_coef = m_correction_coef(myctx); + const float residual_coef = m_residual_coef(myctx); + + assert (residuals.size(1)-1 == residual_bins.size()); + // eta of second sampling float eta = cluster->etaSample(CaloSampling::EMB2); if (eta == -999.) return; @@ -85,31 +73,31 @@ void CaloSwEta2b_g3::makeCorrection(const EventContext& /*ctx*/, float u2 = fmod(aeta,s_middle_layer_granularity) ; // First order (average) S-shape correction - float deta = m_correction_coef * interpolate (m_correction, - u2, - m_correction_degree); + float deta = correction_coef * interpolate (correction, + u2, + correction_degree); // Residual S-shape correction: six ranges in eta from 0 to 1.2 // Evaluated by 2nd order interpolation between 10 tabulated values // first we evaluate our residual in each eta range, given u2 - unsigned int shape[] = {m_residual_bins.size(), 2}; + unsigned int shape[] = {residual_bins.size(), 2}; CaloRec::WritableArrayData<2> w (shape); - for (unsigned int i=0; i < m_residual_bins.size(); i++) { - w[i][0] = m_residual_bins[i]; - w[i][1] = interpolate (m_residuals, + for (unsigned int i=0; i < residual_bins.size(); i++) { + w[i][0] = residual_bins[i]; + w[i][1] = interpolate (residuals, u2, - m_residual_eval_degree, + residual_eval_degree, i+1); } // finally we interpolate (2nd order) for the actual eta - deta += m_residual_coef * interpolate (w, - aeta, - m_residual_degree); + deta += residual_coef * interpolate (w, + aeta, + residual_degree); if (eta < 0) deta = -deta; diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwEta2b_g3.h b/Calorimeter/CaloClusterCorrection/src/CaloSwEta2b_g3.h index 86c3780d5cf8a94d087b847e7eee2d716bc862ed..1d235a21d5d9d03a7fba5deeaf2abbfb8a8f1387 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwEta2b_g3.h +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwEta2b_g3.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef CALOCLUSTERCORRECTION_CALOSWETA2B_G3_H @@ -39,32 +39,29 @@ Updated: June, 2004 (sss) class CaloSwEta2b_g3 : public CaloClusterCorrection { +public: + // Inherit constructor. + using CaloClusterCorrection::CaloClusterCorrection; - public: - - // Constructor - CaloSwEta2b_g3(const std::string& type, - const std::string& name, - const IInterface* parent); - // Destructor - virtual ~CaloSwEta2b_g3() override; // Virtual function in CaloClusterCorrection - virtual void makeCorrection(const EventContext& ctx, - xAOD::CaloCluster* cluster) const override; + virtual void makeCorrection (const Context& myctx, + xAOD::CaloCluster* cluster) const override; private: CaloSwEta2b_g3() = delete; - CaloRec::Array<2> m_correction; - CaloRec::Array<2> m_residuals; - CaloRec::Array<1> m_residual_bins; - int m_correction_degree; - int m_residual_eval_degree; - int m_residual_degree; - float m_correction_coef; - float m_residual_coef; - int m_region; + + Constant<CxxUtils::Array<2> > m_correction { this, "correction", "" }; + Constant<CxxUtils::Array<2> > m_residuals { this, "residuals", "" }; + Constant<CxxUtils::Array<1> > m_residual_bins { this, "residual_bins", "" }; + Constant<int> m_correction_degree { this, "correction_degree", "" }; + Constant<int> m_residual_eval_degree { this, "residual_eval_degree", ""}; + Constant<int> m_residual_degree { this, "residual_degree", "" }; + Constant<float> m_correction_coef { this, "correction_coef", "" }; + Constant<float> m_residual_coef { this, "residual_coef", "" }; + Constant<int> m_region { this, "region", "" }; + static const float s_middle_layer_granularity; }; diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwEta2e_g3.cxx b/Calorimeter/CaloClusterCorrection/src/CaloSwEta2e_g3.cxx index cfc671a74074f5b8392d5d98f28fb8e46d5eab23..51b4c7dbfd5cf64bcd9fbd2a29330e944b46856e 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwEta2e_g3.cxx +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwEta2e_g3.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /******************************************************************** @@ -39,29 +39,10 @@ using CaloClusterCorr::interpolate; const float CaloSwEta2e_g3::s_middle_layer_granularity = 0.025; -// ---------- -// Constructor -// ----------- -CaloSwEta2e_g3::CaloSwEta2e_g3(const std::string& type, - const std::string& name, - const IInterface* parent) - : CaloClusterCorrection(type,name,parent, - "CaloSwEta${LAYER}${BE}_g3") -{ - declareConstant ("correction", m_correction); - declareConstant ("correction_degree", m_correction_degree); - declareConstant ("region", m_region, true/*temp*/); -} - -// ---------- -// Destructor -// ----------- -CaloSwEta2e_g3::~CaloSwEta2e_g3() -{ } // make correction to one cluster -void CaloSwEta2e_g3::makeCorrection(const EventContext& /*ctx*/, - CaloCluster* cluster) const +void CaloSwEta2e_g3::makeCorrection (const Context& myctx, + CaloCluster* cluster) const { // Only for endcap if (!cluster->inEndcap()) @@ -79,7 +60,9 @@ void CaloSwEta2e_g3::makeCorrection(const EventContext& /*ctx*/, if (eta < 0.) u2 = s_middle_layer_granularity-u2; // First order (average) S-shape correction - float etc2 = aeta - interpolate (m_correction, u2, m_correction_degree); + float etc2 = aeta - interpolate (m_correction(myctx), + u2, + m_correction_degree(myctx)); if (eta < 0.) etc2 = -etc2; diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwEta2e_g3.h b/Calorimeter/CaloClusterCorrection/src/CaloSwEta2e_g3.h index 444c4b8364d2b6af352a81f62425907c12f6e3d0..6914317ed0264ab309e24025d9c742055335ad12 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwEta2e_g3.h +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwEta2e_g3.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef CALOCLUSTERCORRECTION_CALOSWETA2E_G3_H @@ -35,29 +35,23 @@ Updated: June, 2004 (sss) class CaloSwEta2e_g3 : public CaloClusterCorrection { +public: + /// Inherit constructor. + using CaloClusterCorrection::CaloClusterCorrection; - public: - - // constructor - CaloSwEta2e_g3(const std::string& type, - const std::string& name, - const IInterface* parent); - // destructor - virtual ~CaloSwEta2e_g3() override; // Virtual function in CaloClusterCorrection - virtual void makeCorrection(const EventContext& ctx, - xAOD::CaloCluster* cluster) const override; + virtual void makeCorrection (const Context& myctx, + xAOD::CaloCluster* cluster) const override; private: - CaloSwEta2e_g3() = delete; - CaloRec::Array<2> m_correction; - int m_correction_degree; - int m_region; - static const float s_middle_layer_granularity; + Constant<CxxUtils::Array<2> > m_correction { this, "correction", "" }; + Constant<int> m_correction_degree { this, "correction_degree", "" }; + Constant<int> m_region { this, "region", 1, "" }; + static const float s_middle_layer_granularity; }; diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwEtamod_g3.cxx b/Calorimeter/CaloClusterCorrection/src/CaloSwEtamod_g3.cxx index 75bf5a8b87c6178688e530164450812a0a7fc75a..28d3b7069e375f941487bed34ad1c8f0bd78aa90 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwEtamod_g3.cxx +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwEtamod_g3.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /******************************************************************** @@ -33,36 +33,21 @@ Updated: June, 2004 (sss) // include header files #include "CaloSwEtamod_g3.h" -// ------------------------------------------------------------- -// Constructor -// ------------------------------------------------------------- + using xAOD::CaloCluster; -CaloSwEtamod_g3::CaloSwEtamod_g3(const std::string& type, - const std::string& name, - const IInterface* parent) - : CaloClusterCorrection(type,name,parent), m_neta(5) -{ - declareConstant ("eta_size",m_neta); - declareConstant ("correction", m_correction); -} -// ------------------------------------------------------------- -// Destructor -// ------------------------------------------------------------- -CaloSwEtamod_g3::~CaloSwEtamod_g3() -{ } // make correction to one cluster -void CaloSwEtamod_g3::makeCorrection(const EventContext& /*ctx*/, - CaloCluster* cluster) const +void CaloSwEtamod_g3::makeCorrection (const Context& myctx, + CaloCluster* cluster) const { float aeta = fabs (cluster->etaBE(2)); if (aeta > 2.5) return; - int ieta = m_neta/2; + int ieta = m_neta(myctx)/2; if (ieta > 3) return; // something went wrong - CaloRec::Array<1> coef = m_correction[aeta < 1.5 ? 0 : 1][ieta-1]; + CaloRec::Array<1> coef = m_correction(myctx)[aeta < 1.5 ? 0 : 1][ieta-1]; float u = fmod (aeta, 0.025); float qetamod = coef[0] + coef[1]*u + coef[2]*u*u; diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwEtamod_g3.h b/Calorimeter/CaloClusterCorrection/src/CaloSwEtamod_g3.h index 5c4a0b2ee2fb30c4c13021c2c8b7c7fa83dda565..84aa3e5d8723f63e36aa1a7ed89f23d987b1d033 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwEtamod_g3.h +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwEtamod_g3.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef CALOCLUSTERCORRECTION_CALOSWETAMOD_G3_H @@ -38,25 +38,20 @@ Updated: June, 2004 (sss) class CaloSwEtamod_g3 : public CaloClusterCorrection { +public: + /// Inherit constructor. + using CaloClusterCorrection::CaloClusterCorrection; - public: - - // constructor - CaloSwEtamod_g3 (const std::string& type, - const std::string& name, - const IInterface* parent); - // destructor - virtual ~CaloSwEtamod_g3() override; // virtual method in CaloClusterCorrection - virtual void makeCorrection(const EventContext& ctx, - xAOD::CaloCluster* cluster) const override; + virtual void makeCorrection (const Context& myctx, + xAOD::CaloCluster* cluster) const override; private: - CaloSwEtamod_g3() = delete; - int m_neta; - CaloRec::Array<3> m_correction; + + Constant<int> m_neta { this, "eta_size", "" }; + Constant<CxxUtils::Array<3> > m_correction { this, "correction", "" }; }; #endif diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwEtamod_v2.cxx b/Calorimeter/CaloClusterCorrection/src/CaloSwEtamod_v2.cxx index a441b7aaf439337bc5ff8f079b2aa2fef75aa74d..26f05ebda681678efb3b74a1bc019c4ba911a9a1 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwEtamod_v2.cxx +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwEtamod_v2.cxx @@ -1,8 +1,6 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ - -// $Id: CaloSwEtamod_v2.cxx,v 1.4 2008-01-25 04:14:22 ssnyder Exp $ /** * @file CaloSwEtamod_v2.cxx * @author scott snyder <snyder@bnl.gov> @@ -44,28 +42,9 @@ using CaloClusterCorr::interpolate; using std::abs; -/** - * @brief Constructor. - * @param type The type of the tool. - * @param name The name of the tool. - * @param parent The parent algorithm of the tool. - */ -CaloSwEtamod_v2::CaloSwEtamod_v2 (const std::string& type, - const std::string& name, - const IInterface* parent) - : CaloClusterCorrectionCommon (type,name,parent) -{ - declareConstant ("correction", m_correction); - declareConstant ("rfac", m_rfac); - declareConstant ("rfac_degree", m_rfac_degree); - declareConstant ("energies", m_energies); - declareConstant ("energy_degree", m_energy_degree); -} - - /** * @brief Virtual function for the correction-specific code. - * @param ctx The event context. + * @param myctx ToolWithConstants context. * @param cluster The cluster to correct. * It is updated in place. * @param elt The detector description element corresponding @@ -83,7 +62,7 @@ CaloSwEtamod_v2::CaloSwEtamod_v2 (const std::string& type, * @c CaloSampling::CaloSample; i.e., it has both * the calorimeter region and sampling encoded. */ -void CaloSwEtamod_v2::makeTheCorrection (const EventContext& /*ctx*/, +void CaloSwEtamod_v2::makeTheCorrection (const Context& myctx, CaloCluster* cluster, const CaloDetDescrElement* elt, float eta, @@ -121,14 +100,14 @@ void CaloSwEtamod_v2::makeTheCorrection (const EventContext& /*ctx*/, // of the energy. This is needed since the corrections are tabulated // using the true cluster energies. float energy = cluster->e(); - float rfac = interpolate (m_rfac, adj_aeta, m_rfac_degree); + float rfac = interpolate (m_rfac(myctx), adj_aeta, m_rfac_degree(myctx)); energy /= rfac; // Calculate the correction. float corr = energy_interpolation (energy, - Builder (*this, etamod), - m_energies, - m_energy_degree); + Builder (m_correction(myctx), etamod), + m_energies(myctx), + m_energy_degree(myctx)); // set energy, and rescale each sampling setenergy (cluster, cluster->e() / corr); @@ -137,11 +116,12 @@ void CaloSwEtamod_v2::makeTheCorrection (const EventContext& /*ctx*/, /** * @brief Constructor for energy interpolation table helper class. - * @param corr The parent correction object. + * @param correction The array of correction parameters. * @param etamod The eta offset within the cell. */ -CaloSwEtamod_v2::Builder::Builder (const CaloSwEtamod_v2& corr, float etamod) - : m_corr (corr), +CaloSwEtamod_v2::Builder::Builder (const CxxUtils::Array<2>& correction, + float etamod) + : m_correction (correction), m_etamod (etamod) { } @@ -156,7 +136,7 @@ CaloSwEtamod_v2::Builder::Builder (const CaloSwEtamod_v2& corr, float etamod) float CaloSwEtamod_v2::Builder::calculate (int energy_ndx, bool& good) const { good = true; - return m_corr.m_correction[energy_ndx][0] - + m_etamod*m_corr.m_correction[energy_ndx][1] - + m_etamod*m_etamod*m_corr.m_correction[energy_ndx][2]; + return m_correction[energy_ndx][0] + + m_etamod*m_correction[energy_ndx][1] + + m_etamod*m_etamod*m_correction[energy_ndx][2]; } diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwEtamod_v2.h b/Calorimeter/CaloClusterCorrection/src/CaloSwEtamod_v2.h index 6acfb93099a32ce4189ad9d654b33e16ec67019d..be4cdcb98da6de2d18a0088e9e304f1a223b21e6 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwEtamod_v2.h +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwEtamod_v2.h @@ -1,10 +1,7 @@ // This file's extension implies that it's C, but it's really -*- C++ -*-. - /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ - -// $Id: CaloSwEtamod_v2.h,v 1.5 2008-01-25 04:14:21 ssnyder Exp $ /** * @file CaloSwEtamod_v2.h * @author scott snyder <snyder@bnl.gov> @@ -82,21 +79,13 @@ class CaloSwEtamod_v2 : public CaloClusterCorrectionCommon { public: - - /** - * @brief Constructor. - * @param type The type of the tool. - * @param name The name of the tool. - * @param parent The parent algorithm of the tool. - */ - CaloSwEtamod_v2 (const std::string& type, - const std::string& name, - const IInterface* parent); + /// Inherit constructor. + using CaloClusterCorrectionCommon::CaloClusterCorrectionCommon; /** * @brief Virtual function for the correction-specific code. - * @param ctx The event context. + * @param myctx ToolWithConstants context. * @param cluster The cluster to correct. * It is updated in place. * @param elt The detector description element corresponding @@ -114,7 +103,7 @@ public: * @c CaloSampling::CaloSample; i.e., it has both * the calorimeter region and sampling encoded. */ - virtual void makeTheCorrection (const EventContext& ctx, + virtual void makeTheCorrection (const Context& myctx, xAOD::CaloCluster* cluster, const CaloDetDescrElement* elt, float eta, @@ -133,39 +122,43 @@ private: : public TableBuilder { public: - /// Constructor. Gets the parent correction object, + /// Constructor. Gets the correction array /// and the eta offset within the cell. - Builder (const CaloSwEtamod_v2& corr, float etamod); + Builder (const CxxUtils::Array<2>& corr, float etamod); /// Calculate the correction for tabulated energy ENERGY_NDX. virtual float calculate (int energy_ndx, bool& good) const; private: - /// The parent correction object. - const CaloSwEtamod_v2& m_corr; + /// Correction parameters. + const CxxUtils::Array<2> m_correction; /// The eta offset within the cell. float m_etamod; }; - friend class Builder; /// Calibration constant: tabulated arrays of function parameters. - CaloRec::Array<2> m_correction; + Constant<CxxUtils::Array<2> > m_correction + { this, "correction", "Tabulated arrays of function parameters." }; // Calibration constant: Correction factors for crude containment // correction used internally for the energy interpolation. - CaloRec::Array<2> m_rfac; + Constant<CxxUtils::Array<2> > m_rfac + { this, "rfac", "Correction factors for crude containment correction used internally for the energy interpolation." }; // Calibration constant: Interpolation degree for crude containment // correction used internally for the energy interpolation. - int m_rfac_degree; + Constant<int> m_rfac_degree + { this, "rfac_degree", "Interpolation degree for crude containment correction used internally for the energy interpolation." }; /// Calibration constant: table of energies at which the correction /// was tabulated. - CaloRec::Array<1> m_energies; + Constant<CxxUtils::Array<1> > m_energies + { this, "energies", "Table of energies at which the correction was tabulated." }; /// Calibration constant: degree of the polynomial interpolation in energy. - int m_energy_degree; + Constant<int> m_energy_degree + { this, "energy_degree", "Degree of the polynomial interpolation in energy." }; }; diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwEtaoff_v2.cxx b/Calorimeter/CaloClusterCorrection/src/CaloSwEtaoff_v2.cxx index 6a7f2098f740b1dee0ba56818313ee85e759162b..9f991d0d279abc6de7260e88b6b7251ee2b7f243 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwEtaoff_v2.cxx +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwEtaoff_v2.cxx @@ -1,10 +1,7 @@ // This file's extension implies that it's C, but it's really -*- C++ -*-. - /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ - -// $Id: CaloSwEtaoff_v2.cxx,v 1.2 2005-11-30 20:39:00 ssnyder Exp $ /** * @file CaloSwEtaoff_v2.h * @author scott snyder <snyder@bnl.gov> @@ -25,28 +22,9 @@ using xAOD::CaloCluster; using CaloClusterCorr::interpolate; -/** - * @brief Constructor. - * @param type The type of the tool. - * @param name The name of the tool. - * @param parent The parent algorithm of the tool. - */ -CaloSwEtaoff_v2::CaloSwEtaoff_v2 (const std::string& type, - const std::string& name, - const IInterface* parent) - : CaloClusterCorrectionCommon (type, name, parent) -{ - declareConstant ("correction", m_correction); - declareConstant ("degree", m_degree); - declareConstant ("interp_barriers", m_interp_barriers); - declareConstant ("energies", m_energies); - declareConstant ("energy_degree", m_energy_degree); -} - - /** * @brief Virtual function for the correction-specific code. - * @param ctx The event context. + * @param myctx ToolWithConstants context. * @param cluster The cluster to correct. * It is updated in place. * @param elt The detector description element corresponding @@ -64,7 +42,7 @@ CaloSwEtaoff_v2::CaloSwEtaoff_v2 (const std::string& type, * @c CaloSampling::CaloSample; i.e., it has both * the calorimeter region and sampling encoded. */ -void CaloSwEtaoff_v2::makeTheCorrection (const EventContext& /*ctx*/, +void CaloSwEtaoff_v2::makeTheCorrection (const Context& myctx, CaloCluster* cluster, const CaloDetDescrElement* elt, float eta, @@ -73,6 +51,12 @@ void CaloSwEtaoff_v2::makeTheCorrection (const EventContext& /*ctx*/, float /*adj_phi*/, CaloSampling::CaloSample samp) const { + const CxxUtils::Array<3> correction = m_correction (myctx); + const CxxUtils::Array<1> interp_barriers = m_interp_barriers (myctx); + const CxxUtils::Array<1> energies = m_energies (myctx); + const int degree = m_degree (myctx); + const int energy_degree = m_energy_degree (myctx); + // Find u, the normalized displacement of the cluster within the cell. // In the range -1...1, with 0 at the center. float u = (eta - elt->eta()) / elt->deta() * 2; @@ -90,7 +74,7 @@ void CaloSwEtaoff_v2::makeTheCorrection (const EventContext& /*ctx*/, // because we're interpolating the fit parameters, not the overall // correction. This should probably be done differently in the // next version. - unsigned int n_energies = m_energies.size(); + unsigned int n_energies = energies.size(); unsigned int shape[] = {n_energies, 4}; CaloRec::WritableArrayData<2> partab (shape); @@ -100,19 +84,19 @@ void CaloSwEtaoff_v2::makeTheCorrection (const EventContext& /*ctx*/, int beg = 0; int end = n_energies; float energy = cluster->e(); - if (energy <= m_energies[0]) + if (energy <= energies[0]) end = 1; - else if (energy >= m_energies[n_energies-1]) + else if (energy >= energies[n_energies-1]) beg = n_energies-1; for (int i=beg; i<end; i++) { - partab[i][0] = m_energies[i]; + partab[i][0] = energies[i]; for (int j=0; j < 3; j++) - partab[i][j+1] = interpolate (m_correction[i], + partab[i][j+1] = interpolate (correction[i], std::abs (adj_eta), - m_degree, + degree, j+1, - m_interp_barriers); + interp_barriers); } // Now interpolate in energy. @@ -121,7 +105,7 @@ void CaloSwEtaoff_v2::makeTheCorrection (const EventContext& /*ctx*/, float par[3]; for (int i=0; i < 3; i++) { if (end-beg > 1) - par[i] = interpolate (partab, energy, m_energy_degree, i+1); + par[i] = interpolate (partab, energy, energy_degree, i+1); else par[i] = partab[beg][i+1]; } diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwEtaoff_v2.h b/Calorimeter/CaloClusterCorrection/src/CaloSwEtaoff_v2.h index 03e252b04cee42e62c931f2b81f47b0a61a1fa6c..127c5d4f8042fabf04365cf5b10d7bfb66ba7452 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwEtaoff_v2.h +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwEtaoff_v2.h @@ -1,10 +1,7 @@ // This file's extension implies that it's C, but it's really -*- C++ -*-. - /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ - -// $Id: CaloSwEtaoff_v2.h,v 1.3 2006-03-27 21:05:38 wlampl Exp $ /** * @file CaloSwEtaoff_v2.h * @author scott snyder <snyder@bnl.gov> @@ -74,21 +71,13 @@ class CaloSwEtaoff_v2 : public CaloClusterCorrectionCommon { public: - - /** - * @brief Constructor. - * @param type The type of the tool. - * @param name The name of the tool. - * @param parent The parent algorithm of the tool. - */ - CaloSwEtaoff_v2 (const std::string& type, - const std::string& name, - const IInterface* parent); + /// Inherit constructor. + using CaloClusterCorrectionCommon::CaloClusterCorrectionCommon; /** * @brief Virtual function for the correction-specific code. - * @param ctx The event context. + * @param myctx ToolWithConstants context. * @param cluster The cluster to correct. * It is updated in place. * @param elt The detector description element corresponding @@ -106,7 +95,7 @@ public: * @c CaloSampling::CaloSample; i.e., it has both * the calorimeter region and sampling encoded. */ - virtual void makeTheCorrection (const EventContext& ctx, + virtual void makeTheCorrection (const Context& myctx, xAOD::CaloCluster* cluster, const CaloDetDescrElement* elt, float eta, @@ -117,21 +106,26 @@ public: private: /// Calibration constant: tabulated arrays of function parameters. - CaloRec::Array<3> m_correction; + Constant<CxxUtils::Array<3> > m_correction + { this, "correction", "Tabulated arrays of function parameters." }; /// Calibration constant: allow breaking up the interpolation into /// independent regions. - CaloRec::Array<1> m_interp_barriers; + Constant<CxxUtils::Array<1> > m_interp_barriers + { this, "interp_barriers", "Allow breaking up the interpolation into independent regions." }; /// Calibration constant: degree of the polynomial interpolation. - int m_degree; + Constant<int> m_degree + { this, "degree", "Degree of the polynomial interpolation." }; /// Calibration constant: table of energies at which the correction /// was tabulated. - CaloRec::Array<1> m_energies; + Constant<CxxUtils::Array<1> > m_energies + { this, "energies", "Table of energies at which the correction was tabulated." }; /// Calibration constant: degree of the polynomial interpolation in energy. - int m_energy_degree; + Constant<int> m_energy_degree + { this, "energy_degree", "Degree of the polynomial interpolation in energy." }; }; diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwEtaoff_v3.cxx b/Calorimeter/CaloClusterCorrection/src/CaloSwEtaoff_v3.cxx index c7dde54b141e44ed2f234ff2b890851855105415..7b8e84587c06cd0cc00ab6f24c0bd47d4f76f4f7 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwEtaoff_v3.cxx +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwEtaoff_v3.cxx @@ -1,10 +1,7 @@ // This file's extension implies that it's C, but it's really -*- C++ -*-. - /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ - -// $Id: CaloSwEtaoff_v3.cxx,v 1.4 2008-01-25 04:14:22 ssnyder Exp $ /** * @file CaloSwEtaoff_v3.cxx * @author scott snyder <snyder@bnl.gov> @@ -19,29 +16,9 @@ #include <cassert> -/** - * @brief Constructor. - * @param type The type of the tool. - * @param name The name of the tool. - * @param parent The parent algorithm of the tool. - */ -using xAOD::CaloCluster; -CaloSwEtaoff_v3::CaloSwEtaoff_v3 (const std::string& type, - const std::string& name, - const IInterface* parent) - : CaloClusterCorrectionCommon (type, name, parent) -{ - declareConstant ("correction", m_correction); - declareConstant ("regions", m_regions); - declareConstant ("energies", m_energies); - declareConstant ("energy_degree", m_energy_degree); - declareConstant ("forms", m_forms, true); -} - - /** * @brief Virtual function for the correction-specific code. - * @param ctx The event context. + * @param myctx ToolWithConstants context. * @param cluster The cluster to correct. * It is updated in place. * @param elt The detector description element corresponding @@ -59,8 +36,8 @@ CaloSwEtaoff_v3::CaloSwEtaoff_v3 (const std::string& type, * @c CaloSampling::CaloSample; i.e., it has both * the calorimeter region and sampling encoded. */ -void CaloSwEtaoff_v3::makeTheCorrection (const EventContext& /*ctx*/, - CaloCluster* cluster, +void CaloSwEtaoff_v3::makeTheCorrection (const Context& myctx, + xAOD::CaloCluster* cluster, const CaloDetDescrElement* elt, float eta, float adj_eta, @@ -68,8 +45,6 @@ void CaloSwEtaoff_v3::makeTheCorrection (const EventContext& /*ctx*/, float /*adj_phi*/, CaloSampling::CaloSample samp) const { - assert (m_regions.size(1) == REG_ENTRIES); - // Find u, the normalized displacement of the cluster within the cell. // In the range -1...1, with 0 at the center. float u = (eta - elt->eta()) / elt->deta() * 2; @@ -82,28 +57,36 @@ void CaloSwEtaoff_v3::makeTheCorrection (const EventContext& /*ctx*/, else if (u < -1) u = -1; + const CxxUtils::Array<2> regions = m_regions (myctx); + assert (regions.size(1) == REG_ENTRIES); + // Look up the region for this correction. Give up if we're outsize // the range of the table. float adj_aeta = std::abs (adj_eta); - int region_ndx = find_region (adj_aeta); + int region_ndx = find_region (regions, adj_aeta); if (region_ndx < 0) return; + const CxxUtils::Array<4> correction = m_correction (myctx); + const CxxUtils::Array<2> forms = m_forms (myctx); + // In a few regions, the fit was done using a cell size different // from what we actually have. Need to recalculate u in this case. - if (std::abs (m_regions[region_ndx][REG_CELLSIZE] - elt->deta()) > 1e-3) { - float cellsize = m_regions[region_ndx][REG_CELLSIZE]; + if (std::abs (regions[region_ndx][REG_CELLSIZE] - elt->deta()) > 1e-3) { + float cellsize = regions[region_ndx][REG_CELLSIZE]; u = fmod (adj_aeta, cellsize) / cellsize * 2 - 1; } // Calculate the correction for each energy. float offs = energy_interpolation (cluster->e(), - Builder (*this, + Builder (correction, + regions, + forms, adj_aeta, u, region_ndx), - m_energies, - m_energy_degree); + m_energies(myctx), + m_energy_degree(myctx)); // Apply the offset correction to the cluster. if (adj_eta < 0) @@ -117,14 +100,15 @@ void CaloSwEtaoff_v3::makeTheCorrection (const EventContext& /*ctx*/, * @param aeta The @f$|\eta|@f$ value to find. * @returns The region index, or -1 if @c aeta is outside the table range. */ -int CaloSwEtaoff_v3::find_region (float aeta) const +int CaloSwEtaoff_v3::find_region (const CxxUtils::Array<2>& regions, + float aeta) const { // ??? Would a binary search be better here? // The table shouldn't be very large, so I'll leave it like // this for now. - unsigned int nreg = m_regions.size(); + unsigned int nreg = regions.size(); for (unsigned int i=0; i < nreg; i++) { - if (aeta >= m_regions[i][REG_LO] && aeta < m_regions[i][REG_HI]) + if (aeta >= regions[i][REG_LO] && aeta < regions[i][REG_HI]) return i; } return -1; @@ -133,22 +117,28 @@ int CaloSwEtaoff_v3::find_region (float aeta) const /** * @brief Constructor for energy interpolation table helper class. - * @param corr The parent correction object. + * @param correction Tabulated arrays of function parameters. + * @param regions Table of regions. + * @param forms Functional form per region. * @param aeta The absolute value of @f$\eta@f$ at which the correction * is being evaluated (in cal-local coordinates). * @param u The fractional offset of the cluster within the cell. * @param region_ndx The index of the region within which the * correction is being evaluated. */ -CaloSwEtaoff_v3::Builder::Builder (const CaloSwEtaoff_v3& corr, +CaloSwEtaoff_v3::Builder::Builder (const CxxUtils::Array<4>& correction, + const CxxUtils::Array<2>& regions, + const CxxUtils::Array<2>& forms, float aeta, float u, int region_ndx) - : m_corr (corr), + : m_correction (correction), + m_regions (regions), + m_forms (forms), m_region_ndx (region_ndx), m_aeta (aeta), m_u (u), - m_form (m_corr.m_regions[region_ndx][REG_FORM]) + m_form (regions[region_ndx][REG_FORM]) { } @@ -162,7 +152,7 @@ CaloSwEtaoff_v3::Builder::Builder (const CaloSwEtaoff_v3& corr, float CaloSwEtaoff_v3::Builder::calculate (int energy_ndx, bool& good) const { // Find the proper array of coefficients. - CaloRec::Array<2> coef = m_corr.m_correction[energy_ndx][m_region_ndx]; + CaloRec::Array<2> coef = m_correction[energy_ndx][m_region_ndx]; // If we don't have coefficients for this energy/region, skip it. if (coef[0].end()[-1] == 0) { @@ -172,8 +162,8 @@ float CaloSwEtaoff_v3::Builder::calculate (int energy_ndx, bool& good) const // Which functional form to use? int form; - if (m_corr.m_forms.size() != 0 && m_corr.m_forms.size(1) != 0) - form = m_corr.m_forms[m_region_ndx][energy_ndx]; + if (m_forms.size() != 0 && m_forms.size(1) != 0) + form = m_forms[m_region_ndx][energy_ndx]; else form = m_form; @@ -184,7 +174,7 @@ float CaloSwEtaoff_v3::Builder::calculate (int energy_ndx, bool& good) const // Required just for case 13 float xlo=0 ; float xhi=0 ; - unsigned int reg_n = m_corr.m_regions.size(); + unsigned int reg_n = m_regions.size(); switch (form) { case 0: @@ -208,10 +198,10 @@ float CaloSwEtaoff_v3::Builder::calculate (int energy_ndx, bool& good) const case 13: for (unsigned int i=0; i < reg_n; i++) { - if (m_aeta >= m_corr.m_regions[i][REG_LO] && m_aeta < m_corr.m_regions[i][REG_HI]) + if (m_aeta >= m_regions[i][REG_LO] && m_aeta < m_regions[i][REG_HI]) { - xlo = m_corr.m_regions[i][REG_LO] ; - xhi = m_corr.m_regions[i][REG_HI] ; + xlo = m_regions[i][REG_LO] ; + xhi = m_regions[i][REG_HI] ; } } diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwEtaoff_v3.h b/Calorimeter/CaloClusterCorrection/src/CaloSwEtaoff_v3.h index ac81e11f7925ecce8fff07e61d3a5d97b514e401..1a2462192d31ec5eaaa01c60973801c39bd26d3f 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwEtaoff_v3.h +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwEtaoff_v3.h @@ -1,10 +1,7 @@ // This file's extension implies that it's C, but it's really -*- C++ -*-. - /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ - -// $Id: CaloSwEtaoff_v3.h,v 1.4 2008-01-25 04:14:21 ssnyder Exp $ /** * @file CaloSwEtaoff_v3.h * @author scott snyder <snyder@bnl.gov> @@ -134,21 +131,13 @@ class CaloSwEtaoff_v3 : public CaloClusterCorrectionCommon { public: - - /** - * @brief Constructor. - * @param type The type of the tool. - * @param name The name of the tool. - * @param parent The parent algorithm of the tool. - */ - CaloSwEtaoff_v3 (const std::string& type, - const std::string& name, - const IInterface* parent); + /// Inherit constructor. + using CaloClusterCorrectionCommon::CaloClusterCorrectionCommon; /** * @brief Virtual function for the correction-specific code. - * @param ctx The event context. + * @param myctx ToolWithConstants context. * @param cluster The cluster to correct. * It is updated in place. * @param elt The detector description element corresponding @@ -166,7 +155,7 @@ public: * @c CaloSampling::CaloSample; i.e., it has both * the calorimeter region and sampling encoded. */ - virtual void makeTheCorrection (const EventContext& ctx, + virtual void makeTheCorrection (const Context& myctx, xAOD::CaloCluster* cluster, const CaloDetDescrElement* elt, float eta, @@ -184,12 +173,14 @@ private: : public TableBuilder { public: - /// Constructor. Gets the parent correction object, + /// Constructor. Gets correction information, /// the abs(eta) at which the correction is being /// evaluated (in cal-local coordinates), the fractional /// cell offset u, and the index of the region for this /// correction. - Builder (const CaloSwEtaoff_v3& corr, + Builder (const CxxUtils::Array<4>& correction, + const CxxUtils::Array<2>& regions, + const CxxUtils::Array<2>& forms, float aeta, float u, int region_ndx); @@ -219,8 +210,14 @@ private: /// Evaluate the function Form 13. float calc13 (float aeta, float u, const CaloRec::Array<2>& coef, float xlo, float xhi) const; - /// The parent correction object. - const CaloSwEtaoff_v3& m_corr; + // Tabulated arrays of function parameters. + const CxxUtils::Array<4>& m_correction; + + /// Table of regions. + const CxxUtils::Array<2>& m_regions; + + /// Functional form per region. + const CxxUtils::Array<2>& m_forms; /// The index of the region in which we're evaluating the correction. int m_region_ndx; @@ -238,7 +235,8 @@ private: friend class Builder; /// Find the index of the region containing a given @f$\eta@f$ value. - int find_region (float aeta) const; + int find_region (const CxxUtils::Array<2>& regions, + float aeta) const; /// Calibration constant: tabulated arrays of function parameters. /// Index 0: energy @@ -250,7 +248,8 @@ private: /// is exactly 0, for any e and r, then this energy/region is skipped. /// (This is usually because insufficient statistics were available /// to get a good fit.) - CaloRec::Array<4> m_correction; + Constant<CxxUtils::Array<4> > m_correction + { this, "correction", "Tabulated arrays of function parameters." }; /// Calibration constant: table of regions. For each region, we have: /// - Lower @f$|\eta|@f$ for the region. @@ -262,7 +261,9 @@ private: /// /// If the forms variable is provided, then the functional form is /// taken from there instead of from here. - CaloRec::Array<2> m_regions; + Constant<CxxUtils::Array<2> > m_regions + { this, "regions", "Table of regions." }; + enum { REG_LO = 0, REG_HI = 1, @@ -274,15 +275,18 @@ private: /// Calibration constant: table of energies at which the correction /// was tabulated. - CaloRec::Array<1> m_energies; + Constant<CxxUtils::Array<1> > m_energies + { this, "energies", "Table of energies at which the correction was tabulated." }; /// Calibration constant: degree of the polynomial interpolation in energy. - int m_energy_degree; + Constant<int> m_energy_degree + { this, "energy_degree", "Degree of the polynomial interpolation in energy." }; /// Calibration constant: Functional form to use per region per energy. /// If this is empty, the form is taken instead from the region table /// (and is thus same for all energies). - CaloRec::Array<2> m_forms; + Constant<CxxUtils::Array<2> > m_forms + { this, "forms", "Functional form to use per region per energy." }; }; diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwGap_g3.cxx b/Calorimeter/CaloClusterCorrection/src/CaloSwGap_g3.cxx index 19610f99c82ff6f1bbe6109d5b191b7c00b149af..f1a058261983b9a980c85736ef3f1a11d1d3b2af 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwGap_g3.cxx +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwGap_g3.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /******************************************************************** @@ -48,23 +48,6 @@ const double dphi = twopi / 64. ; } -CaloSwGap_g3::CaloSwGap_g3(const std::string& type, - const std::string& name, - const IInterface* parent) - : CaloClusterCorrection(type, name, parent) -{ - declareConstant ("etamin_crack", m_etamin_crack); - declareConstant ("etamax_crack", m_etamax_crack); - declareConstant ("scint_weight", m_scint_weight); - declareConstant ("correction", m_correction); - - declareProperty ("cells_name", m_cells_name = "AllCalo"); -} - -CaloSwGap_g3::~CaloSwGap_g3() -{ } - - /** * @brief Standard Gaudi initialize method. */ @@ -76,21 +59,25 @@ StatusCode CaloSwGap_g3::initialize() } -void CaloSwGap_g3::makeCorrection(const EventContext& ctx, - CaloCluster* cluster) const +void CaloSwGap_g3::makeCorrection (const Context& myctx, + CaloCluster* cluster) const { - assert (m_scint_weight.size() == m_correction.size()); - if (m_correction.size() == 0) return; - float eta = cluster->eta(); float phi = cluster->phi(); float aeta = fabs(eta); - if (aeta < m_etamin_crack || aeta > m_etamax_crack) + const float etamin_crack = m_etamin_crack (myctx); + const float etamax_crack = m_etamax_crack (myctx); + if (aeta < etamin_crack || aeta > etamax_crack) return; // no correction required - SG::ReadHandle<CaloCellContainer> cc (m_cells_name, ctx); + const CxxUtils::Array<1> scint_weight = m_scint_weight (myctx); + const CxxUtils::Array<1> correction = m_correction (myctx); + assert (scint_weight.size() == correction.size()); + if (correction.size() == 0) return; + + SG::ReadHandle<CaloCellContainer> cc (m_cells_name, myctx.ctx()); double eh_scint = 0; if(cc.isValid()) @@ -121,18 +108,18 @@ void CaloSwGap_g3::makeCorrection(const EventContext& ctx, } // make the correction - double granularity = (m_etamax_crack - m_etamin_crack)/m_correction.size(); - int ind = static_cast<int> ((aeta - m_etamin_crack)/granularity); + double granularity = (etamax_crack - etamin_crack)/correction.size(); + int ind = static_cast<int> ((aeta - etamin_crack)/granularity); // Scintillator energy calibration - eh_scint = eh_scint * m_scint_weight[ind]; + eh_scint = eh_scint * scint_weight[ind]; //Correct for normalization factor total cluster energy and samplings energies - double energy = (cluster->e())*m_correction[ind]; + double energy = (cluster->e())*correction[ind]; setenergy(cluster,energy); // Add the scintillator energy to the cluster and correct the total energy - energy += eh_scint * m_correction[ind]; + energy += eh_scint * correction[ind]; cluster->setE(energy); } diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwGap_g3.h b/Calorimeter/CaloClusterCorrection/src/CaloSwGap_g3.h index c2247bad45d833d4fd074716520910c71b017b7e..30abf1c84caf4bf1925dba36f9bd2a6d624d4356 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwGap_g3.h +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwGap_g3.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef CALOCLUSTERCORRECTION_CALOSWGAP_G3_H @@ -34,23 +34,17 @@ Updated: June, 2004 (sss) class CaloSwGap_g3 : public CaloClusterCorrection, public ISetCaloCellContainerName { - - public: +public: + /// Inherit constructor + using CaloClusterCorrection::CaloClusterCorrection; - // constructor - CaloSwGap_g3(const std::string& type, - const std::string& name, - const IInterface* parent); - // destructor - virtual ~CaloSwGap_g3() override; - /** * @brief Standard Gaudi initialize method. */ virtual StatusCode initialize() override; - virtual void makeCorrection(const EventContext& ctx, - xAOD::CaloCluster* cluster) const override; + virtual void makeCorrection (const Context& myctx, + xAOD::CaloCluster* cluster) const override; /** @@ -61,15 +55,15 @@ class CaloSwGap_g3 : public CaloClusterCorrection, private: - CaloSwGap_g3() = delete; - float m_etamin_crack; - float m_etamax_crack; - CaloRec::Array<1> m_scint_weight; - CaloRec::Array<1> m_correction; + Constant<float> m_etamin_crack { this, "etamin_crack", "" }; + Constant<float> m_etamax_crack { this, "etamax_crack", "" }; + Constant<CxxUtils::Array<1> > m_scint_weight { this, "scint_weight", "" }; + Constant<CxxUtils::Array<1> > m_correction { this, "correction", "" }; /// Property: The name of the container in which to look to find tile cells. - SG::ReadHandleKey<CaloCellContainer> m_cells_name; + SG::ReadHandleKey<CaloCellContainer> m_cells_name + { this, "cells_name", "AllCalo", "" }; }; #endif diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwGap_v2.cxx b/Calorimeter/CaloClusterCorrection/src/CaloSwGap_v2.cxx index 9fb5cc76108655c1ceae22ec86cf57813d5b4877..9154015b5174cae76dd233ee9533bb69d8749c88 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwGap_v2.cxx +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwGap_v2.cxx @@ -1,8 +1,6 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ - -// $Id: CaloSwGap_v2.cxx,v 1.5 2009-04-25 17:57:01 ssnyder Exp $ /** * @file CaloSwGap_v2.cxx * @author scott snyder <snyder@bnl.gov> @@ -59,27 +57,6 @@ const double dphi = twopi / 64. ; } // anonymous namespace -/** - * @brief Constructor. - * @param type The type of the tool. - * @param name The name of the tool. - * @param parent The parent algorithm of the tool. - */ -CaloSwGap_v2::CaloSwGap_v2 (const std::string& type, - const std::string& name, - const IInterface* parent) - : CaloClusterCorrectionCommon(type, name, parent) -{ - declareConstant ("etamin_crack", m_etamin_crack); - declareConstant ("etamax_crack", m_etamax_crack); - declareConstant ("degree", m_degree); - declareConstant ("correction", m_correction); - declareConstant ("use_raw_eta", m_use_raw_eta); - - declareProperty ("cells_name", m_cells_name = "AllCalo"); -} - - /** * @brief Standard Gaudi initialize method. */ @@ -93,7 +70,7 @@ StatusCode CaloSwGap_v2::initialize() /** * @brief Virtual function for the correction-specific code. - * @param ctx The event context. + * @param myctx ToolWithConstants context. * @param cluster The cluster to correct. * It is updated in place. * @param elt The detector description element corresponding @@ -111,7 +88,7 @@ StatusCode CaloSwGap_v2::initialize() * @c CaloSampling::CaloSample; i.e., it has both * the calorimeter region and sampling encoded. */ -void CaloSwGap_v2::makeTheCorrection (const EventContext& ctx, +void CaloSwGap_v2::makeTheCorrection (const Context& myctx, CaloCluster* cluster, const CaloDetDescrElement*/*elt*/, float eta, @@ -124,15 +101,15 @@ void CaloSwGap_v2::makeTheCorrection (const EventContext& ctx, // and range checks. However, the v2 corrections were derived // using regular eta instead. float the_aeta; - if (m_use_raw_eta) + if (m_use_raw_eta(myctx)) the_aeta = std::abs (adj_eta); else the_aeta = std::abs (eta); - if (the_aeta < m_etamin_crack || the_aeta > m_etamax_crack) + if (the_aeta < m_etamin_crack(myctx) || the_aeta > m_etamax_crack(myctx)) return; // no correction required - SG::ReadHandle<CaloCellContainer> cc (m_cells_name, ctx); + SG::ReadHandle<CaloCellContainer> cc (m_cells_name, myctx.ctx()); // Add up the tile scintillator energy in the region around the cluster. double eh_scint = 0; @@ -161,10 +138,13 @@ void CaloSwGap_v2::makeTheCorrection (const EventContext& ctx, } } + const int degree = m_degree (myctx); + const CxxUtils::Array<2> correction = m_correction (myctx); + // Find the correction weights. - float a = interpolate (m_correction, the_aeta, m_degree, 1); - float alpha = interpolate (m_correction, the_aeta, m_degree, 2); - float offset = interpolate (m_correction, the_aeta, m_degree, 3); + float a = interpolate (correction, the_aeta, degree, 1); + float alpha = interpolate (correction, the_aeta, degree, 2); + float offset = interpolate (correction, the_aeta, degree, 3); // The correction is a weighted sum of calorimeter and scintillator energies. float ec = cluster->e(); diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwGap_v2.h b/Calorimeter/CaloClusterCorrection/src/CaloSwGap_v2.h index d3c4d2a7075b2b599cb12d72e39202e91c9bb41c..00f8bc5e1737feca0545a40c26cf038a33ddcaf5 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwGap_v2.h +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwGap_v2.h @@ -1,10 +1,7 @@ // This file's extension implies that it's C, but it's really -*- C++ -*-. - /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ - -// $Id: CaloSwGap_v2.h,v 1.6 2009-04-25 17:57:00 ssnyder Exp $ /** * @file CaloSwGap_v2.h * @author scott snyder <snyder@bnl.gov> @@ -76,17 +73,9 @@ class CaloSwGap_v2 public ISetCaloCellContainerName { public: + /// Inherit constructor. + using CaloClusterCorrectionCommon::CaloClusterCorrectionCommon; - /** - * @brief Constructor. - * @param type The type of the tool. - * @param name The name of the tool. - * @param parent The parent algorithm of the tool. - */ - CaloSwGap_v2(const std::string& type, - const std::string& name, - const IInterface* parent); - /** * @brief Standard Gaudi initialize method. @@ -96,7 +85,7 @@ public: /** * @brief Virtual function for the correction-specific code. - * @param ctx The event context. + * @param myctx ToolWithConstants context. * @param cluster The cluster to correct. * It is updated in place. * @param elt The detector description element corresponding @@ -114,7 +103,7 @@ public: * @c CaloSampling::CaloSample; i.e., it has both * the calorimeter region and sampling encoded. */ - virtual void makeTheCorrection (const EventContext& ctx, + virtual void makeTheCorrection (const Context& myctx, xAOD::CaloCluster* cluster, const CaloDetDescrElement* elt, float eta, @@ -134,22 +123,28 @@ public: private: /// Calibration constants: The range over which this correction is defined. - float m_etamin_crack; - float m_etamax_crack; + Constant<float> m_etamin_crack + { this, "etamin_crack", "Lower end of range over which this correction is defined." }; + Constant<float> m_etamax_crack + { this, "etamax_crack", "Upper end of range over which this correction is defined." }; /// Calibration constant: The interpolation degree. - int m_degree; + Constant<int> m_degree + { this, "degree", "Interpolation degree." }; /// Calibration constant: The tabulated array of correction weights, /// A and alpha. - CaloRec::Array<2> m_correction; + Constant<CxxUtils::Array<2> > m_correction + { this, "correction", "The tabulated array of correction weights, A and alpha." }; /// Calibration constant: If true, tabulated values are in terms of /// raw (local) eta. - bool m_use_raw_eta; + Constant<bool> m_use_raw_eta + { this, "use_raw_eta", "If true, tabulated values are in terms of raw (local) eta." }; /// Property: The name of the container in which to look to find tile cells. - SG::ReadHandleKey<CaloCellContainer> m_cells_name; + SG::ReadHandleKey<CaloCellContainer> m_cells_name + { this, "cells_name", "AllCalo", "The name of the container in which to look to find tile cells." }; }; diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwGap_v3.cxx b/Calorimeter/CaloClusterCorrection/src/CaloSwGap_v3.cxx index d543165741a0221452f11cf7764c8f9e9ceb140a..d48fb9c730e0f92a0e3fc2cd86df0373cb0bcd38 100644 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwGap_v3.cxx +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwGap_v3.cxx @@ -1,8 +1,6 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ - -// $Id$ /** * @file CaloSwGap_v3.cxx * Gap corrections using rel17 single particle MC @@ -39,29 +37,6 @@ const double dphi = twopi / 64. ; } // anonymous namespace -/** - * @brief Constructor. - * @param type The type of the tool. - * @param name The name of the tool. - * @param parent The parent algorithm of the tool. - */ -CaloSwGap_v3::CaloSwGap_v3 (const std::string& type, - const std::string& name, - const IInterface* parent) - : CaloClusterCorrectionCommon(type, name, parent) -{ - declareConstant ("etamin_crack", m_etamin_crack); - declareConstant ("etamax_crack", m_etamax_crack); - declareConstant ("degree", m_degree); - declareConstant ("correctionGoodPhi", m_correctionGoodPhi); - declareConstant ("correctionBadPhi", m_correctionBadPhi); - declareConstant ("use_raw_eta", m_use_raw_eta); - declareConstant ("use_raw_eta_boundaries", m_use_raw_eta_boundaries); - - declareProperty ("cells_name", m_cells_name = "AllCalo"); -} - - /** * @brief Standard Gaudi initialize method. */ @@ -75,7 +50,7 @@ StatusCode CaloSwGap_v3::initialize() /** * @brief Virtual function for the correction-specific code. - * @param ctx The event context. + * @param myctx ToolWithConstants context. * @param cluster The cluster to correct. * It is updated in place. * @param elt The detector description element corresponding @@ -93,7 +68,7 @@ StatusCode CaloSwGap_v3::initialize() * @c CaloSampling::CaloSample; i.e., it has both * the calorimeter region and sampling encoded. */ -void CaloSwGap_v3::makeTheCorrection (const EventContext& ctx, +void CaloSwGap_v3::makeTheCorrection (const Context& myctx, CaloCluster* cluster, const CaloDetDescrElement*/*elt*/, float eta, @@ -114,19 +89,22 @@ void CaloSwGap_v3::makeTheCorrection (const EventContext& ctx, } #endif float the_aeta_boundaries; - if (m_use_raw_eta_boundaries) + if (m_use_raw_eta_boundaries(myctx)) the_aeta_boundaries = std::abs (adj_eta); else the_aeta_boundaries = std::abs (eta); - if (the_aeta_boundaries < m_etamin_crack || the_aeta_boundaries > m_etamax_crack) + if (the_aeta_boundaries < m_etamin_crack(myctx) || + the_aeta_boundaries > m_etamax_crack(myctx)) + { return; // no correction required + } // use cluster positions from now on float eta_clus = cluster->eta(); float phi_clus = cluster->phi(); - SG::ReadHandle<CaloCellContainer> cc (m_cells_name, ctx); + SG::ReadHandle<CaloCellContainer> cc (m_cells_name, myctx.ctx()); // Add up the tile scintillator energy in the region around the cluster. double eh_scint = 0; @@ -164,14 +142,18 @@ void CaloSwGap_v3::makeTheCorrection (const EventContext& ctx, float offset = 0.; if(isGoodPhi(eta_clus,phi_clus)){ - a = interpolate (m_correctionGoodPhi, fabs(eta_clus), m_degree, 1); - alpha = interpolate (m_correctionGoodPhi, fabs(eta_clus), m_degree, 2); - offset = interpolate (m_correctionGoodPhi, fabs(eta_clus), m_degree, 3); + const int degree = m_degree (myctx); + const CxxUtils::Array<2> correctionGoodPhi = m_correctionGoodPhi(myctx); + a = interpolate (correctionGoodPhi, fabs(eta_clus), degree, 1); + alpha = interpolate (correctionGoodPhi, fabs(eta_clus), degree, 2); + offset = interpolate (correctionGoodPhi, fabs(eta_clus), degree, 3); } else{ - a = interpolate (m_correctionBadPhi, fabs(eta_clus), m_degree, 1); - alpha = interpolate (m_correctionBadPhi, fabs(eta_clus), m_degree, 2); - offset = interpolate (m_correctionBadPhi, fabs(eta_clus), m_degree, 3); + const int degree = m_degree (myctx); + const CxxUtils::Array<2> correctionBadPhi = m_correctionBadPhi(myctx); + a = interpolate (correctionBadPhi, fabs(eta_clus), degree, 1); + alpha = interpolate (correctionBadPhi, fabs(eta_clus), degree, 2); + offset = interpolate (correctionBadPhi, fabs(eta_clus), degree, 3); } diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwGap_v3.h b/Calorimeter/CaloClusterCorrection/src/CaloSwGap_v3.h index 5c494596ced5003e2f779d815dbd111432cf4cfa..c66f0df9f52770ad1ee1e76205588fd2f949898f 100644 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwGap_v3.h +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwGap_v3.h @@ -1,10 +1,7 @@ // This file's extension implies that it's C, but it's really -*- C++ -*-. - /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ - -// $Id$ /** * @file CaloSwGap_v3.h * Sandrine should document this @@ -56,16 +53,8 @@ class CaloSwGap_v3 public ISetCaloCellContainerName { public: - - /** - * @brief Constructor. - * @param type The type of the tool. - * @param name The name of the tool. - * @param parent The parent algorithm of the tool. - */ - CaloSwGap_v3(const std::string& type, - const std::string& name, - const IInterface* parent); + /// Inherit constructor. + using CaloClusterCorrectionCommon::CaloClusterCorrectionCommon; /** @@ -76,6 +65,7 @@ public: /** * @brief Virtual function for the correction-specific code. + * @param myctx ToolWithConstants context. * @param ctx The event context. * @param cluster The cluster to correct. * It is updated in place. @@ -94,7 +84,7 @@ public: * @c CaloSampling::CaloSample; i.e., it has both * the calorimeter region and sampling encoded. */ - virtual void makeTheCorrection (const EventContext& ctx, + virtual void makeTheCorrection (const Context& myctx, xAOD::CaloCluster* cluster, const CaloDetDescrElement* elt, float eta, @@ -115,24 +105,32 @@ public: private: /// Calibration constants: The range over which this correction is defined. - float m_etamin_crack; - float m_etamax_crack; + Constant<float> m_etamin_crack + { this, "etamin_crack", "Lower end of range over which this correction is defined." }; + Constant<float> m_etamax_crack + { this, "etamax_crack", "Upper end of range over which this correction is defined." }; /// Calibration constant: The interpolation degree. - int m_degree; + Constant<int> m_degree + { this, "degree", "Interpolation degree." }; /// Calibration constant: The tabulated array of correction weights, /// A and alpha. - CaloRec::Array<2> m_correctionGoodPhi; - CaloRec::Array<2> m_correctionBadPhi; + Constant<CxxUtils::Array<2> > m_correctionGoodPhi + { this, "correctionGoodPhi", "" }; + Constant<CxxUtils::Array<2> > m_correctionBadPhi + { this, "correctionBadPhi", "" }; /// Calibration constant: If true, tabulated values are in terms of /// raw (local) eta. - bool m_use_raw_eta; - bool m_use_raw_eta_boundaries; + Constant<bool> m_use_raw_eta + { this, "use_raw_eta", "If true, tabulated values are in terms of raw (local) eta." }; + Constant<bool> m_use_raw_eta_boundaries + { this, "use_raw_eta_boundaries", "" }; /// Property: The name of the container in which to look to find tile cells. - SG::ReadHandleKey<CaloCellContainer> m_cells_name; + SG::ReadHandleKey<CaloCellContainer> m_cells_name + { this, "cells_name", "AllCalo", "The name of the container in which to look to find tile cells." }; }; diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwLongWeights.cxx b/Calorimeter/CaloClusterCorrection/src/CaloSwLongWeights.cxx index 2247e7c75caf56f2d96abfc38141b058fc6ccbe3..9de0d197b0d0109168d1c8849fa61cd0c34e4a9e 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwLongWeights.cxx +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwLongWeights.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /******************************************************************** @@ -27,26 +27,9 @@ using xAOD::CaloCluster; using CaloClusterCorr::interpolate; - // ------------------------------------------------------------- - // Constructor - // ------------------------------------------------------------- -CaloSwLongWeights::CaloSwLongWeights(const std::string& type, - const std::string& name, - const IInterface* parent) - : CaloClusterCorrectionCommon(type, name, parent) -{ - declareConstant("correction", m_correction); - declareConstant("eta_start_crack", m_eta_start_crack); - declareConstant("eta_end_crack", m_eta_end_crack); - declareConstant("etamax", m_etamax); - declareConstant("degree", m_degree); - declareConstant("use_raw_eta", m_use_raw_eta); - declareConstant("preserve_offset", m_preserve_offset); -} - /** * @brief Virtual function for the correction-specific code. - * @param ctx The event context. + * @param myctx ToolWithConstants context. * @param cluster The cluster to correct. * It is updated in place. * @param elt The detector description element corresponding @@ -65,7 +48,7 @@ CaloSwLongWeights::CaloSwLongWeights(const std::string& type, * the calorimeter region and sampling encoded. */ void CaloSwLongWeights::makeTheCorrection - (const EventContext& /*ctx*/, + (const Context& myctx, CaloCluster* cluster, const CaloDetDescrElement* /*elt*/, float eta, @@ -73,41 +56,48 @@ void CaloSwLongWeights::makeTheCorrection float /*phi*/, float /*adj_phi*/, CaloSampling::CaloSample /*samp*/) const -{ +{ + const float eta_start_crack = m_eta_start_crack (myctx); + const float eta_end_crack = m_eta_end_crack (myctx); + // ??? In principle, we should use adj_eta for the interpolation // and range checks. However, the v2 corrections were derived // using regular eta instead. float the_aeta; - if (m_use_raw_eta) + if (m_use_raw_eta(myctx)) the_aeta = std::abs (adj_eta); else the_aeta = std::abs (eta); - if (the_aeta >= m_etamax) return; + const float etamax = m_etamax (myctx); + if (the_aeta >= etamax) return; int si; - if (the_aeta < m_eta_start_crack) + if (the_aeta < eta_start_crack) si = 0; - else if (the_aeta > m_eta_end_crack) + else if (the_aeta > eta_end_crack) si = 1; else { // No corrections are applied for the crack region. return; } + const CxxUtils::Array<2> correction = m_correction (myctx); + const int degree = m_degree (myctx); + unsigned int shape[] = {2}; CaloRec::WritableArrayData<1> interp_barriers (shape); - interp_barriers[0] = m_eta_start_crack; - interp_barriers[1] = m_eta_end_crack; + interp_barriers[0] = eta_start_crack; + interp_barriers[1] = eta_end_crack; float pars[4]; - int ibin = static_cast<int> (the_aeta / m_etamax * m_correction.size()); - pars[0] = m_correction[ibin][1]; - pars[1] = m_correction[ibin][2]; + int ibin = static_cast<int> (the_aeta / etamax * correction.size()); + pars[0] = correction[ibin][1]; + pars[1] = correction[ibin][2]; for (int i=2; i<4; i++) - pars[i] = interpolate (m_correction, + pars[i] = interpolate (correction, the_aeta, - m_degree, + degree, i+1, interp_barriers); @@ -124,7 +114,7 @@ void CaloSwLongWeights::makeTheCorrection }; float e_offset = 0; - if (m_preserve_offset) { + if (m_preserve_offset(myctx)) { double total0 = 0; for (int sampling=0; sampling<4; ++sampling) total0 += cluster->eSample (samps[si][sampling]); diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwLongWeights.h b/Calorimeter/CaloClusterCorrection/src/CaloSwLongWeights.h index 47a7487dcfcc284922d1b727d52aba607204483b..253c1fca52a134234fcf3d8fa421fce167207aa9 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwLongWeights.h +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwLongWeights.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef CALOCLUSTERCORRECTION_CALOSWLONGWEIGHTS_H @@ -24,14 +24,13 @@ PURPOSE: Longitudinal weight corrections applied to calo clusters class CaloSwLongWeights : public CaloClusterCorrectionCommon { public: - // constructor - CaloSwLongWeights (const std::string& type, - const std::string& name, - const IInterface* parent); + /// Inherit constructor. + using CaloClusterCorrectionCommon::CaloClusterCorrectionCommon; + /** * @brief Virtual function for the correction-specific code. - * @param ctx The event context. + * @param myctx ToolWithConstants context. * @param cluster The cluster to correct. * It is updated in place. * @param elt The detector description element corresponding @@ -49,7 +48,7 @@ public: * @c CaloSampling::CaloSample; i.e., it has both * the calorimeter region and sampling encoded. */ - virtual void makeTheCorrection (const EventContext& ctx, + virtual void makeTheCorrection (const Context& myctx, xAOD::CaloCluster* cluster, const CaloDetDescrElement* elt, float eta, @@ -62,14 +61,13 @@ public: private: - CaloRec::Array<2> m_correction; - float m_eta_start_crack; - float m_eta_end_crack; - float m_etamax; - int m_degree; - bool m_use_raw_eta; - bool m_preserve_offset; - + Constant<CxxUtils::Array<2> > m_correction { this, "correction", "" }; + Constant<float> m_eta_start_crack { this, "eta_start_crack", "" }; + Constant<float> m_eta_end_crack { this, "eta_end_crack", "" }; + Constant<float> m_etamax { this, "etamax", "" }; + Constant<int> m_degree { this, "degree", "" }; + Constant<bool> m_use_raw_eta { this, "use_raw_eta", "" }; + Constant<bool> m_preserve_offset { this, "preserve_offset", "" }; }; #endif diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwPhimod_g3.cxx b/Calorimeter/CaloClusterCorrection/src/CaloSwPhimod_g3.cxx index d878a5a07c4a6254788bfc58a1dc04d9ac9c3d10..ece336a0e2db749a6de5cbc7e99fa0061514c46c 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwPhimod_g3.cxx +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwPhimod_g3.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /******************************************************************** @@ -34,27 +34,9 @@ Updated: June, 2004 (sss) -// ------------------------------------------------------------- -// Constructor -// ------------------------------------------------------------- -using xAOD::CaloCluster; -CaloSwPhimod_g3::CaloSwPhimod_g3(const std::string& type, - const std::string& name, - const IInterface* parent) - : CaloClusterCorrection(type,name,parent) -{ - declareConstant ("correction", m_correction); -} - -// ------------------------------------------------------------- -// Destructor -// ------------------------------------------------------------- -CaloSwPhimod_g3::~CaloSwPhimod_g3() -{ } - // make correction to one cluster -void CaloSwPhimod_g3::makeCorrection(const EventContext& /*ctx*/, - CaloCluster* cluster) const +void CaloSwPhimod_g3::makeCorrection (const Context& myctx, + xAOD::CaloCluster* cluster) const { float eta2 = cluster->etaBE(2); // use second sampling @@ -71,7 +53,7 @@ void CaloSwPhimod_g3::makeCorrection(const EventContext& /*ctx*/, else nabs = 256.; - std::vector<float> tab = qphmop (aeta2); + std::vector<float> tab = qphmop (myctx, aeta2); assert (tab.size() == 5); float qphimod = tab[0] + @@ -86,21 +68,24 @@ void CaloSwPhimod_g3::makeCorrection(const EventContext& /*ctx*/, } -std::vector<float> CaloSwPhimod_g3::qphmop (float aeta) const +std::vector<float> CaloSwPhimod_g3::qphmop (const Context& myctx, + float aeta) const { - std::vector<float> coef (m_correction.size(1)-1); + const CxxUtils::Array<2> correction = m_correction (myctx); + + std::vector<float> coef (correction.size(1)-1); int i1 = 0; int i2 = 0; - if (aeta < m_correction[0][0]) { - for (unsigned int j = 1; j < m_correction.size(1); j++) - coef[j-1] = m_correction[0][j]; + if (aeta < correction[0][0]) { + for (unsigned int j = 1; j < correction.size(1); j++) + coef[j-1] = correction[0][j]; return coef; } - else if (aeta >= m_correction[0][0]) { - for (unsigned int i = 0; i < m_correction.size()-1; i++) { - if (aeta >= m_correction[i][0] && aeta < m_correction[i+1][0]) { + else if (aeta >= correction[0][0]) { + for (unsigned int i = 0; i < correction.size()-1; i++) { + if (aeta >= correction[i][0] && aeta < correction[i+1][0]) { i1 = i; i2 = i+1; break; @@ -108,18 +93,18 @@ std::vector<float> CaloSwPhimod_g3::qphmop (float aeta) const } } if (i1 == i2) { - i2 = m_correction.size()-1; + i2 = correction.size()-1; i1 = i2-1; } - float deta = m_correction[i2][0] - m_correction[i1][0]; + float deta = correction[i2][0] - correction[i1][0]; if (deta == 0) deta = 1; - float m = (aeta - m_correction[i1][0]) / deta; - for (unsigned int j = 1; j < m_correction.size(1); j++) { - float dy = m_correction[i2][j] - m_correction[i1][j]; - coef[j-1] = (m_correction[i1][j] + dy * m); + float m = (aeta - correction[i1][0]) / deta; + for (unsigned int j = 1; j < correction.size(1); j++) { + float dy = correction[i2][j] - correction[i1][j]; + coef[j-1] = (correction[i1][j] + dy * m); } return coef; diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwPhimod_g3.h b/Calorimeter/CaloClusterCorrection/src/CaloSwPhimod_g3.h index 4b8f32045c80768a3276c6bbd35aeebe91b3d37a..6b5354115e41a65489cb44e1ae3e364e82e5d291 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwPhimod_g3.h +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwPhimod_g3.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef CALOCLUSTERCORRECTION_CALOSWPHIMOD_G3_H @@ -40,25 +40,20 @@ Updated: June, 2004 (sss) class CaloSwPhimod_g3 : public CaloClusterCorrection { - - public: - - // constructor - CaloSwPhimod_g3 (const std::string& type, - const std::string& name, - const IInterface* parent); - // destructor - virtual ~CaloSwPhimod_g3() override; +public: + /// Inherit constructor. + using CaloClusterCorrection::CaloClusterCorrection; // virtual method in CaloClusterCorrection - virtual void makeCorrection(const EventContext& ctx, - xAOD::CaloCluster* cluster) const override; + virtual void makeCorrection (const Context& myctx, + xAOD::CaloCluster* cluster) const override; private: - CaloSwPhimod_g3() = delete; - std::vector<float> qphmop(float eta) const; - CaloRec::Array<2> m_correction; + std::vector<float> qphmop (const Context& myctx, + float eta) const; + + Constant<CxxUtils::Array<2> > m_correction { this, "correction", "" }; }; #endif diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwPhimod_v2.cxx b/Calorimeter/CaloClusterCorrection/src/CaloSwPhimod_v2.cxx index 667bac31d429b80b20492b07796ad4130effec65..1f4e919af2aa38d95fd6114f1a2534c9054033c1 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwPhimod_v2.cxx +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwPhimod_v2.cxx @@ -1,8 +1,6 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ - -// $Id: CaloSwPhimod_v2.cxx,v 1.4 2008-01-25 04:14:22 ssnyder Exp $ /** * @file CaloSwPhimod_v2.cxx * @author scott snyder <snyder@bnl.gov> @@ -48,29 +46,6 @@ using std::cos; -/** - * @brief Constructor. - * @param type The type of the tool. - * @param name The name of the tool. - * @param parent The parent algorithm of the tool. - */ -CaloSwPhimod_v2::CaloSwPhimod_v2 (const std::string& type, - const std::string& name, - const IInterface* parent) - : CaloClusterCorrectionCommon (type,name,parent) -{ - declareConstant ("correction", m_correction); - declareConstant ("correction_coef", m_correction_coef); - declareConstant ("interp_barriers", m_interp_barriers); - declareConstant ("degree", m_degree); - declareConstant ("rfac", m_rfac); - declareConstant ("rfac_degree", m_rfac_degree); - declareConstant ("energies", m_energies); - declareConstant ("energy_degree", m_energy_degree); - declareConstant ("use_raw_eta", m_use_raw_eta); -} - - /** * @brief Virtual function for the correction-specific code. * @param ctx The event context. @@ -91,7 +66,7 @@ CaloSwPhimod_v2::CaloSwPhimod_v2 (const std::string& type, * @c CaloSampling::CaloSample; i.e., it has both * the calorimeter region and sampling encoded. */ -void CaloSwPhimod_v2::makeTheCorrection (const EventContext& /*ctx*/, +void CaloSwPhimod_v2::makeTheCorrection (const Context& myctx, CaloCluster* cluster, const CaloDetDescrElement* /*elt*/, float eta, @@ -105,7 +80,7 @@ void CaloSwPhimod_v2::makeTheCorrection (const EventContext& /*ctx*/, // and range checks. However, the v2 corrections were derived // using regular eta instead. float the_aeta; - if (m_use_raw_eta) { + if (m_use_raw_eta(myctx)) { the_aeta = std::abs (adj_eta); if (adj_eta < 0) adj_phi = -adj_phi; @@ -131,13 +106,17 @@ void CaloSwPhimod_v2::makeTheCorrection (const EventContext& /*ctx*/, // of the energy. This is needed since the corrections are tabulated // using the true cluster energies. float energy = cluster->e(); - float rfac = interpolate (m_rfac, the_aeta, m_rfac_degree); + float rfac = interpolate (m_rfac(myctx), the_aeta, m_rfac_degree(myctx)); energy /= rfac; float corr = energy_interpolation (energy, - Builder (*this, the_aeta, adj_phi, nabs), - m_energies, - m_energy_degree); + Builder (m_correction (myctx), + m_interp_barriers (myctx), + m_degree (myctx), + m_correction_coef (myctx), + the_aeta, adj_phi, nabs), + m_energies(myctx), + m_energy_degree(myctx)); // set energy, and rescale each sampling setenergy (cluster, cluster->e() / corr); @@ -146,18 +125,27 @@ void CaloSwPhimod_v2::makeTheCorrection (const EventContext& /*ctx*/, /** * @brief Constructor for energy interpolation table helper class. - * @param corr The parent correction object. + * @param correction The correction table. + * @param interp_barriers Allow breaking up the interpolation into independent regions. + * @param degree Interpolation degree. + * @param correction_coef Coefficient by which to scale the entire correction. * @param aeta The absolute value of @f$\eta@f$ at which the correction * is being evaluated (in cal-local coordinates). * @param phi The @f$\phi@f$ at which the correction * is being evaluated (in cal-local coordinates). * @param nabs Number of absorbers in @f$2\pi@f$. */ -CaloSwPhimod_v2::Builder::Builder (const CaloSwPhimod_v2& corr, +CaloSwPhimod_v2::Builder::Builder (const CxxUtils::Array<3>& correction, + const CxxUtils::Array<1>& interp_barriers, + int degree, + float correction_coef, float aeta, float phi, int nabs) - : m_corr (corr), + : m_correction (correction), + m_interp_barriers (interp_barriers), + m_degree (degree), + m_correction_coef (correction_coef), m_aeta (aeta), m_phi (phi), m_nabs (nabs) @@ -176,14 +164,14 @@ float CaloSwPhimod_v2::Builder::calculate (int energy_ndx, bool& good) const good = true; float par[4]; for (int j=0; j<4; j++) { - par[j] = interpolate (m_corr.m_correction[energy_ndx], + par[j] = interpolate (m_correction[energy_ndx], m_aeta, - m_corr.m_degree, + m_degree, j+1, - m_corr.m_interp_barriers); + m_interp_barriers); } double a = atan (par[2])*(1./pi) + 0.5; - return 1 + m_corr.m_correction_coef * abs (par[0]) * + return 1 + m_correction_coef * abs (par[0]) * (a*cos(m_nabs*m_phi + par[1]) + (1-a)*cos (2*m_nabs*m_phi + par[3])); } diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwPhimod_v2.h b/Calorimeter/CaloClusterCorrection/src/CaloSwPhimod_v2.h index 4ba32b4bace094793ce47da440d9910e2ad786ee..7f3a23abeb7b4ce43ee25d535bc091f5b14c9731 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwPhimod_v2.h +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwPhimod_v2.h @@ -1,10 +1,7 @@ // This file's extension implies that it's C, but it's really -*- C++ -*-. - /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ - -// $Id: CaloSwPhimod_v2.h,v 1.5 2008-01-25 04:14:21 ssnyder Exp $ /** * @file CaloSwPhimod_v2.h * @author scott snyder <snyder@bnl.gov> @@ -92,20 +89,12 @@ class CaloSwPhimod_v2 : public CaloClusterCorrectionCommon { public: - - /** - * @brief Constructor. - * @param type The type of the tool. - * @param name The name of the tool. - * @param parent The parent algorithm of the tool. - */ - CaloSwPhimod_v2(const std::string& type, - const std::string& name, - const IInterface* parent); + /// Inherit constructor. + using CaloClusterCorrectionCommon::CaloClusterCorrectionCommon; /** * @brief Virtual function for the correction-specific code. - * @param ctx The event context. + * @param myctx ToolWithConstants context. * @param cluster The cluster to correct. * It is updated in place. * @param elt The detector description element corresponding @@ -123,7 +112,7 @@ public: * @c CaloSampling::CaloSample; i.e., it has both * the calorimeter region and sampling encoded. */ - virtual void makeTheCorrection (const EventContext& ctx, + virtual void makeTheCorrection (const Context& myctx, xAOD::CaloCluster* cluster, const CaloDetDescrElement* elt, float eta, @@ -142,18 +131,31 @@ private: : public TableBuilder { public: - /// Constructor. Gets the parent correction object, + /// Constructor. Gets the correction information, /// the abs(eta) and phi at which the correction is being /// evaluated (in cal-local coordinates), and the number /// of absorbers. - Builder (const CaloSwPhimod_v2& corr, float aeta, float phi, int nabs); + Builder (const CxxUtils::Array<3>& correction, + const CxxUtils::Array<1>& interp_barriers, + int degree, + float correction_coef, + float aeta, float phi, int nabs); /// Calculate the correction for tabulated energy ENERGY_NDX. virtual float calculate (int energy_ndx, bool& good) const; private: - /// The parent correction object. - const CaloSwPhimod_v2& m_corr; + /// The correction table. + const CxxUtils::Array<3> m_correction; + + /// Allow breaking up the interpolation into independent regions. + const CxxUtils::Array<1> m_interp_barriers; + + /// Interpolation degree. + int m_degree; + + /// Coefficient by which to scale the entire correction. + float m_correction_coef; /// The abs(eta) at which the correction is being /// evaluated (in cal-local coordinates). @@ -165,40 +167,48 @@ private: /// Number of absorbers in @f$2\pi@f$. int m_nabs; }; - friend class Builder; /// Calibration constant: tabulated arrays of function parameters. - CaloRec::Array<3> m_correction; + Constant<CxxUtils::Array<3> > m_correction + { this, "correction", "Tabulated arrays of function parameters." }; /// Calibration constant: allow breaking up the interpolation into /// independent regions. - CaloRec::Array<1> m_interp_barriers; + Constant<CxxUtils::Array<1> > m_interp_barriers + { this, "interp_barriers", "Allow breaking up the interpolation into independent regions." }; /// Calibration constant: degree of the polynomial interpolation. - int m_degree; + Constant<int> m_degree + { this, "degree", "Degree of the polynomial interpolation." }; /// Calibration constant: coefficient by which to scale the /// entire correction. - float m_correction_coef; + Constant<float> m_correction_coef + { this, "correction_coef", "Coefficient by which to scale the entire correction." }; // Calibration constant: Correction factors for crude containment // correction used internally for the energy interpolation. - CaloRec::Array<2> m_rfac; + Constant<CxxUtils::Array<2> > m_rfac + { this, "rfac", "Correction factors for crude containment correction used internally for the energy interpolation." }; // Calibration constant: Interpolation degree for crude containment // correction used internally for the energy interpolation. - int m_rfac_degree; + Constant<int> m_rfac_degree + { this, "rfac_degree", "Interpolation degree for crude containment correction used internally for the energy interpolation." }; /// Calibration constant: table of energies at which the correction /// was tabulated. - CaloRec::Array<1> m_energies; + Constant<CxxUtils::Array<1> > m_energies + { this, "energies", "Table of energies at which the correction was tabulated." }; /// Calibration constant: degree of the polynomial interpolation in energy. - int m_energy_degree; + Constant<int> m_energy_degree + { this, "energy_degree", "Degree of the polynomial interpolation in energy." }; /// Calibration constant: If true, tabulated values are in terms of /// raw (local) eta. - bool m_use_raw_eta; + Constant<bool> m_use_raw_eta + { this, "use_raw_eta", "If true, tabulated values are in terms of raw (local) eta." }; }; diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwPhioff_v2.cxx b/Calorimeter/CaloClusterCorrection/src/CaloSwPhioff_v2.cxx index c88afd11875c788bf6ffd66788a0bc8c2fdf3ce2..88378d3c14c4ca9f3f9609622efbd23ee6bf0d39 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwPhioff_v2.cxx +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwPhioff_v2.cxx @@ -1,8 +1,6 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ - -// $Id: CaloSwPhioff_v2.cxx,v 1.4 2008-01-25 04:14:22 ssnyder Exp $ /** * @file CaloSwPhioff_v2.cxx * @author scott snyder <snyder@bnl.gov> @@ -51,30 +49,9 @@ using xAOD::CaloCluster; using CaloClusterCorr::interpolate; -/** - * @brief Constructor. - * @param type The type of the tool. - * @param name The name of the tool. - * @param parent The parent algorithm of the tool. - */ -CaloSwPhioff_v2::CaloSwPhioff_v2 (const std::string& type, - const std::string& name, - const IInterface* parent) - : CaloClusterCorrectionCommon (type, name, parent) -{ - declareConstant ("interp_barriers", m_interp_barriers); - declareConstant ("degree", m_degree); - declareConstant ("correction", m_correction); - declareConstant ("correction_coef", m_correction_coef); - declareConstant ("flip_phi", m_flip_phi); - declareConstant ("energies", m_energies); - declareConstant ("energy_degree", m_energy_degree); -} - - /** * @brief Virtual function for the correction-specific code. - * @param ctx The event context. + * @param myctx ToolWithConstants context. * @param cluster The cluster to correct. * It is updated in place. * @param elt The detector description element corresponding @@ -92,7 +69,7 @@ CaloSwPhioff_v2::CaloSwPhioff_v2 (const std::string& type, * @c CaloSampling::CaloSample; i.e., it has both * the calorimeter region and sampling encoded. */ -void CaloSwPhioff_v2::makeTheCorrection (const EventContext& /*ctx*/, +void CaloSwPhioff_v2::makeTheCorrection (const Context& myctx, CaloCluster* cluster, const CaloDetDescrElement* elt, float /*eta*/, @@ -102,14 +79,17 @@ void CaloSwPhioff_v2::makeTheCorrection (const EventContext& /*ctx*/, CaloSampling::CaloSample samp) const { // Calculate the correction. - float offs = m_correction_coef * energy_interpolation + float offs = m_correction_coef(myctx) * energy_interpolation (cluster->e(), - Builder (*this, std::abs (adj_eta)), - m_energies, - m_energy_degree); + Builder (m_correction (myctx), + m_interp_barriers (myctx), + m_degree (myctx), + std::abs (adj_eta)), + m_energies(myctx), + m_energy_degree(myctx)); // Flip the sign, if needed. - if (m_flip_phi && elt->eta_raw() < 0) + if (m_flip_phi(myctx) && elt->eta_raw() < 0) offs = -offs; // Apply the correction. @@ -119,12 +99,19 @@ void CaloSwPhioff_v2::makeTheCorrection (const EventContext& /*ctx*/, /** * @brief Constructor for energy interpolation table helper class. - * @param corr The parent correction object. + * @param correction Tabulated arrays of function parameters. + * @param interp_barriers Allow breaking up the interpolation into independent regions. + * @param degree Degree of the polynomial interpolation. * @param aeta The absolute value of @f$\eta@f$ at which the correction * is being evaluated (in cal-local coordinates). */ -CaloSwPhioff_v2::Builder::Builder (const CaloSwPhioff_v2& corr, float aeta) - : m_corr (corr), +CaloSwPhioff_v2::Builder::Builder (const CxxUtils::Array<3>& correction, + const CxxUtils::Array<1>& interp_barriers, + int degree, + float aeta) + : m_correction (correction), + m_interp_barriers (interp_barriers), + m_degree (degree), m_aeta (aeta) { } @@ -139,9 +126,9 @@ CaloSwPhioff_v2::Builder::Builder (const CaloSwPhioff_v2& corr, float aeta) float CaloSwPhioff_v2::Builder::calculate (int energy_ndx, bool& good) const { good = true; - return interpolate (m_corr.m_correction[energy_ndx], + return interpolate (m_correction[energy_ndx], m_aeta, - m_corr.m_degree, + m_degree, 1, - m_corr.m_interp_barriers); + m_interp_barriers); } diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwPhioff_v2.h b/Calorimeter/CaloClusterCorrection/src/CaloSwPhioff_v2.h index fd5234661a28d8d533131ccb643d83700487aa54..0ca81f74f4b4188d4603711a7cd30ab21f921a06 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwPhioff_v2.h +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwPhioff_v2.h @@ -1,10 +1,7 @@ // This file's extension implies that it's C, but it's really -*- C++ -*-. - /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ - -// $Id: CaloSwPhioff_v2.h,v 1.5 2008-01-25 04:14:21 ssnyder Exp $ /** * @file CaloSwPhioff_v2.h * @author scott snyder <snyder@bnl.gov> @@ -57,22 +54,14 @@ class CaloSwPhioff_v2 : public CaloClusterCorrectionCommon { - public: +public: + /// Inherit constructor. + using CaloClusterCorrectionCommon::CaloClusterCorrectionCommon; - /** - * @brief Constructor. - * @param type The type of the tool. - * @param name The name of the tool. - * @param parent The parent algorithm of the tool. - */ - CaloSwPhioff_v2 (const std::string& type, - const std::string& name, - const IInterface* parent); - /** * @brief Virtual function for the correction-specific code. - * @param ctx The event context. + * @param myctx ToolWithConstants context. * @param cluster The cluster to correct. * It is updated in place. * @param elt The detector description element corresponding @@ -90,7 +79,7 @@ class CaloSwPhioff_v2 * @c CaloSampling::CaloSample; i.e., it has both * the calorimeter region and sampling encoded. */ - virtual void makeTheCorrection (const EventContext& ctx, + virtual void makeTheCorrection (const Context& myctx, xAOD::CaloCluster* cluster, const CaloDetDescrElement* elt, float eta, @@ -109,48 +98,63 @@ private: : public TableBuilder { public: - /// Constructor. Gets the parent correction object, + /// Constructor. Gets the correction information, /// and the abs(eta) at which the correction is being /// evaluated (in cal-local coordinates). - Builder (const CaloSwPhioff_v2& corr, float aeta); + Builder (const CxxUtils::Array<3>& correction, + const CxxUtils::Array<1>& interp_barriers, + int degree, + float aeta); /// Calculate the correction for tabulated energy ENERGY_NDX. virtual float calculate (int energy_ndx, bool& good) const; private: - /// The parent correction object. - const CaloSwPhioff_v2& m_corr; + /// Tabulated arrays of function parameters. + const CxxUtils::Array<3> m_correction; + + /// Allow breaking up the interpolation into independent regions. + const CxxUtils::Array<1> m_interp_barriers; + + /// Degree of the polynomial interpolation. + int m_degree; /// The abs(eta) at which the correction is being /// evaluated (in cal-local coordinates). float m_aeta; }; - friend class Builder; /// Calibration constant: tabulated arrays of function parameters. - CaloRec::Array<3> m_correction; + Constant<CaloRec::Array<3> > m_correction + { this, "correction", "Tabulated arrays of function parameters." }; /// Calibration constant: allow breaking up the interpolation into /// independent regions. - CaloRec::Array<1> m_interp_barriers; + Constant<CxxUtils::Array<1> > m_interp_barriers + { this, "interp_barriers", "Allow breaking up the interpolation into independent regions." }; /// Calibration constant: degree of the polynomial interpolation. - int m_degree; + Constant<int> m_degree + { this, "degree", "Degree of the polynomial interpolation." }; /// Calibration constant: coefficient by which to scale the /// entire correction. - float m_correction_coef; + Constant<float> m_correction_coef + { this, "correction_coef", "Coefficient by which to scale the entire correction." }; /// Calibration constant: if true, the correction gets an opposite /// sign if eta < 0. - bool m_flip_phi; + Constant<bool> m_flip_phi + { this, "flip_phi", "If true, the correction gets an opposite sign if eta < 0." }; /// Calibration constant: table of energies at which the correction /// was tabulated. - CaloRec::Array<1> m_energies; + Constant<CxxUtils::Array<1> > m_energies + { this, "energies", "Table of energies at which the correction was tabulated." }; /// Calibration constant: degree of the polynomial interpolation in energy. - int m_energy_degree; + Constant<int> m_energy_degree + { this, "energy_degree", "Degree of the polynomial interpolation in energy." }; }; diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwTime.cxx b/Calorimeter/CaloClusterCorrection/src/CaloSwTime.cxx index 1987889f91325a17a8639badfb435d89162278d7..9631c63a8bea4332aed9f65a3c94a0821d7cde96 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwTime.cxx +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwTime.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /******************************************************************** @@ -16,35 +16,18 @@ PURPOSE: Refined time estimate from SW EM clusters #include "CaloSwTime.h" #include "CaloEvent/CaloCell.h" -//#include "CaloGeoHelpers/CaloSampling.h" -//#include "GaudiKernel/MsgStream.h" -// ------------------------------------------------------------- -// Constructor -// ------------------------------------------------------------- -using xAOD::CaloCluster; -CaloSwTime::CaloSwTime - (const std::string& type, - const std::string& name, - const IInterface* parent) - : CaloClusterCorrection(type, name, parent) -{ -} - -CaloSwTime::~CaloSwTime() {} - - -void CaloSwTime::makeCorrection(const EventContext& /*ctx*/, - CaloCluster* cluster) const +void CaloSwTime::makeCorrection (const Context& /*myctx*/, + xAOD::CaloCluster* cluster) const { double emax=-9999.; double time=0.; - CaloCluster::cell_iterator cellIter = cluster->cell_begin(); - CaloCluster::cell_iterator cellIterEnd = cluster->cell_end(); + xAOD::CaloCluster::cell_iterator cellIter = cluster->cell_begin(); + xAOD::CaloCluster::cell_iterator cellIterEnd = cluster->cell_end(); for (;cellIter!=cellIterEnd;cellIter++) { const CaloCell* cell = (*cellIter); CaloCell_ID::CaloSample sampling = cell->caloDDE()->getSampling(); diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwTime.h b/Calorimeter/CaloClusterCorrection/src/CaloSwTime.h index 933435fe166c4c0103443e5e85ad82a729213b21..abc01b3525e2a758e1737e3401de33ae23722473 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwTime.h +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwTime.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef CALOCLUSTERCORRECTION_CALOSWTIME_H @@ -22,14 +22,10 @@ PURPOSE: Compute time of SW clusters class CaloSwTime : public CaloClusterCorrection { public: - // constructor - CaloSwTime (const std::string& type, - const std::string& name, - const IInterface* parent); + /// Inherit constructor. + using CaloClusterCorrection::CaloClusterCorrection; - virtual ~CaloSwTime() override; - - virtual void makeCorrection (const EventContext& ctx, + virtual void makeCorrection (const Context& myctx, xAOD::CaloCluster* cluster) const override; diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwTransitionRegionsCorr.cxx b/Calorimeter/CaloClusterCorrection/src/CaloSwTransitionRegionsCorr.cxx index 060e93dcea1ce83beb72b7cac35d8d8554fa7f14..28321b8e202f5c5768acf2db7f955e50426ede01 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwTransitionRegionsCorr.cxx +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwTransitionRegionsCorr.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ @@ -23,35 +23,11 @@ PURPOSE: Effective corrections for transition regions like eta=0 #include "StoreGate/StoreGate.h" #include "GaudiKernel/MsgStream.h" #include <iostream> -//#include <math.h> - -// ------------------------------------------------------------- -// Constructor -// ------------------------------------------------------------- -/** - * @brief Constructor. - * @param type The type of the tool. - * @param name The name of the tool. - * @param parent The parent algorithm of the tool. - */ -using xAOD::CaloCluster; -CaloSwTransitionRegionsCorr::CaloSwTransitionRegionsCorr (const std::string& type, - const std::string& name, - const IInterface* parent) - : CaloClusterCorrectionCommon(type, name, parent) -{ - declareConstant ("correction" , m_correction); - declareConstant ("etamin_TR00" , m_etamin_TR00); - declareConstant ("etamax_TR00" , m_etamax_TR00); - declareConstant ("etamax_TR08" , m_etamax_TR08); - declareConstant ("etamin_TR08" , m_etamin_TR08); - declareConstant ("use_raw_eta" , m_use_raw_eta); -} /** * @brief Virtual function for the correction-specific code. - * @param ctx The event context. + * @param myctx ToolWithConstants context. * @param cluster The cluster to correct. * It is updated in place. * @param elt The detector description element corresponding @@ -70,8 +46,8 @@ CaloSwTransitionRegionsCorr::CaloSwTransitionRegionsCorr (const std::string& typ * the calorimeter region and sampling encoded. */ -void CaloSwTransitionRegionsCorr::makeTheCorrection (const EventContext&/*ctx*/, - CaloCluster* cluster, +void CaloSwTransitionRegionsCorr::makeTheCorrection (const Context& myctx, + xAOD::CaloCluster* cluster, const CaloDetDescrElement*/*elt*/, float eta, float adj_eta, @@ -79,12 +55,18 @@ void CaloSwTransitionRegionsCorr::makeTheCorrection (const EventContext&/*ctx*/, float /*adj_phi*/, CaloSampling::CaloSample /*samp*/) const { + const CxxUtils::Array<2> correction = m_correction (myctx); + const float etamin_TR00 = m_etamin_TR00 (myctx); + const float etamax_TR00 = m_etamax_TR00 (myctx); + const float etamin_TR08 = m_etamin_TR08 (myctx); + const float etamax_TR08 = m_etamax_TR08 (myctx); + // ??? In principle, we should use adj_eta for the interpolation // and range checks. However, the v2 corrections were derived // using regular eta instead. float the_aeta; - if (m_use_raw_eta) + if (m_use_raw_eta (myctx)) the_aeta = std::abs (adj_eta); else the_aeta = std::abs (eta); @@ -93,8 +75,8 @@ void CaloSwTransitionRegionsCorr::makeTheCorrection (const EventContext&/*ctx*/, // Load calibration coefficients // ------------------------------------------------------------- - CaloRec::Array<1> tr00 = m_correction[0]; - CaloRec::Array<1> tr08 = m_correction[1]; + CaloRec::Array<1> tr00 = correction[0]; + CaloRec::Array<1> tr08 = correction[1]; static const CaloSampling::CaloSample samps[2][4] = { { CaloSampling::PreSamplerB, @@ -117,7 +99,7 @@ void CaloSwTransitionRegionsCorr::makeTheCorrection (const EventContext&/*ctx*/, // Compute correction for eta = 0 // ------------------------------------------------------------- - if (the_aeta < m_etamax_TR00 && the_aeta > m_etamin_TR00 ) { + if (the_aeta < etamax_TR00 && the_aeta > etamin_TR00 ) { ATH_MSG_DEBUG( " -------------------------- " << "Applying correction for eta = 0 (loose) " << endmsg); ATH_MSG_DEBUG( tr00[0] << " " << tr00[1] << " " @@ -133,7 +115,7 @@ void CaloSwTransitionRegionsCorr::makeTheCorrection (const EventContext&/*ctx*/, exp( tr00[3]*( the_aeta + tr00[4]))-tr00[5])); */ } - else if ( the_aeta < m_etamin_TR00 ) { + else if ( the_aeta < etamin_TR00 ) { corr = tr00[6]; ATH_MSG_DEBUG( " -------------------------- " << "Applying correction for eta = 0 (tight) " << endmsg); @@ -143,7 +125,7 @@ void CaloSwTransitionRegionsCorr::makeTheCorrection (const EventContext&/*ctx*/, // Compute correction for eta = 0.8 // ------------------------------------------------------------- - if ( the_aeta < m_etamax_TR08 && the_aeta > m_etamin_TR08 ) { + if ( the_aeta < etamax_TR08 && the_aeta > etamin_TR08 ) { ATH_MSG_DEBUG( " -------------------------- " << "Applying correction for eta =0.8 " << endmsg); ATH_MSG_DEBUG( tr08[0] << " " << tr08[1] << " " diff --git a/Calorimeter/CaloClusterCorrection/src/CaloSwTransitionRegionsCorr.h b/Calorimeter/CaloClusterCorrection/src/CaloSwTransitionRegionsCorr.h index e0de2f7e093ade3f21206326660727077a05a23f..993965c7c862573ac71da2749146789c9938cc42 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloSwTransitionRegionsCorr.h +++ b/Calorimeter/CaloClusterCorrection/src/CaloSwTransitionRegionsCorr.h @@ -1,10 +1,7 @@ // This file's extension implies that it's C, but it's really -*- C++ -*-. - /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ - -// $Id: CaloSwTransitionRegionsCorr.h,v 1.2 2008-01-25 04:14:21 ssnyder Exp $ /** * @file CaloClusterCorrection/CalOSwTransitionRegionsCorr.h * @author L. Carminati @@ -23,21 +20,14 @@ class CaloSwTransitionRegionsCorr : public CaloClusterCorrectionCommon { public: + /// Inherit constructor. + using CaloClusterCorrectionCommon::CaloClusterCorrectionCommon; - /** - * @brief Constructor. - * @param type The type of the tool. - * @param name The name of the tool. - * @param parent The parent algorithm of the tool. - */ - CaloSwTransitionRegionsCorr(const std::string& type, - const std::string& name, - const IInterface* parent); /** * @brief Virtual function for the correction-specific code. - * @param ctx The event context. + * @param myctx ToolWithConstants context. * @param cluster The cluster to correct. * It is updated in place. * @param elt The detector description element corresponding @@ -45,6 +35,7 @@ public: * @param eta The @f$\eta@f$ coordinate of the cluster, in this sampling. * @param adj_eta The @f$\eta@f$ adjusted for * any shift between the actual and nominal coordinates. + * (This is shifted back to the nominal coordinate system.) * @param phi The @f$\phi@f$ coordinate of the cluster, in this sampling. * @param adj_phi The @f$\phi@f$ adjusted for @@ -55,7 +46,7 @@ public: * @c CaloSampling::CaloSample; i.e., it has both * the calorimeter region and sampling encoded. */ - virtual void makeTheCorrection (const EventContext& ctx, + virtual void makeTheCorrection (const Context& myctx, xAOD::CaloCluster* cluster, const CaloDetDescrElement* elt, float eta, @@ -67,17 +58,23 @@ public: private: /// Calibration constants: The range over which this correction is defined. - float m_etamin_TR00; - float m_etamax_TR00; - float m_etamax_TR08; - float m_etamin_TR08; + Constant<float> m_etamin_TR00 + { this, "etamin_TR00", "The range over which this correction is defined." }; + Constant<float> m_etamax_TR00 + { this, "etamax_TR00", "The range over which this correction is defined." }; + Constant<float> m_etamin_TR08 + { this, "etamin_TR08", "The range over which this correction is defined." }; + Constant<float> m_etamax_TR08 + { this, "etamax_TR08", "The range over which this correction is defined." }; /// Calibration constant: The tabulated array of correction parameters. - CaloRec::Array<2> m_correction; + Constant<CxxUtils::Array<2> > m_correction + { this, "correction", "The tabulated array of correction parameters." }; /// Calibration constant: If true, tabulated values are in terms of /// raw (local) eta. - bool m_use_raw_eta; + Constant<bool> m_use_raw_eta + { this, "use_raw_eta", "If true, tabulated values are in terms of raw (local) eta." }; }; diff --git a/Calorimeter/CaloClusterCorrection/src/CaloTopoEMGap.cxx b/Calorimeter/CaloClusterCorrection/src/CaloTopoEMGap.cxx index 6d8bdebcc7011115a5d2fb0acd884b8e3ec76e85..36cbd103b204c2d8650ec4b8160423d9cb514bcb 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloTopoEMGap.cxx +++ b/Calorimeter/CaloClusterCorrection/src/CaloTopoEMGap.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /** @@ -36,28 +36,6 @@ const double dphi = twopi / 64. ; } // anonymous namespace -/** - * @brief Constructor. - * @param type The type of the tool. - * @param name The name of the tool. - * @param parent The parent algorithm of the tool. - */ -CaloTopoEMGap::CaloTopoEMGap (const std::string& type, - const std::string& name, - const IInterface* parent) - : CaloClusterCorrectionCommon(type, name, parent), - m_cells ("AllCalo") -{ - declareProperty ("Cells", m_cells); - - declareConstant ("etamin_crack", m_etamin_crack); - declareConstant ("etamax_crack", m_etamax_crack); - declareConstant ("degree", m_degree); - declareConstant ("correction", m_correction); - declareConstant ("use_raw_eta", m_use_raw_eta); -} - - /** * @brief Standard Gaudi initialize method. */ @@ -71,7 +49,7 @@ StatusCode CaloTopoEMGap::initialize() /** * @brief Virtual function for the correction-specific code. - * @param ctx The event context. + * @param myctx ToolWithConstants context. * @param cluster The cluster to correct. * It is updated in place. * @param elt The detector description element corresponding @@ -89,7 +67,7 @@ StatusCode CaloTopoEMGap::initialize() * @c CaloSampling::CaloSample; i.e., it has both * the calorimeter region and sampling encoded. */ -void CaloTopoEMGap::makeTheCorrection (const EventContext& ctx, +void CaloTopoEMGap::makeTheCorrection (const Context& myctx, CaloCluster* cluster, const CaloDetDescrElement*/*elt*/, float eta, @@ -102,15 +80,15 @@ void CaloTopoEMGap::makeTheCorrection (const EventContext& ctx, // and range checks. However, the v2 corrections were derived // using regular eta instead. float the_aeta; - if (m_use_raw_eta) + if (m_use_raw_eta(myctx)) the_aeta = std::abs (adj_eta); else the_aeta = std::abs (eta); - if (the_aeta < m_etamin_crack || the_aeta > m_etamax_crack) + if (the_aeta < m_etamin_crack(myctx) || the_aeta > m_etamax_crack(myctx)) return; // no correction required - SG::ReadHandle<CaloCellContainer> cc (m_cells, ctx); + SG::ReadHandle<CaloCellContainer> cc (m_cells, myctx.ctx()); // Add up the tile scintillator energy in the region around the cluster. double eh_scint = 0; @@ -139,11 +117,14 @@ void CaloTopoEMGap::makeTheCorrection (const EventContext& ctx, } } + const CxxUtils::Array<2> correction = m_correction (myctx); + const int degree = m_degree (myctx); + // Find the correction weights. - float par0 = interpolate (m_correction, the_aeta, m_degree, 1); - float par1 = interpolate (m_correction, the_aeta, m_degree, 2); - float par2 = interpolate (m_correction, the_aeta, m_degree, 3); - float par3 = interpolate (m_correction, the_aeta, m_degree, 4); + float par0 = interpolate (correction, the_aeta, degree, 1); + float par1 = interpolate (correction, the_aeta, degree, 2); + float par2 = interpolate (correction, the_aeta, degree, 3); + float par3 = interpolate (correction, the_aeta, degree, 4); // The correction is a weighted sum of calorimeter and scintillator energies. float ec = cluster->e(); diff --git a/Calorimeter/CaloClusterCorrection/src/CaloTopoEMGap.h b/Calorimeter/CaloClusterCorrection/src/CaloTopoEMGap.h index d59d873c6f49aabf21d3bb12a72c3366689d6410..122f318cae675704181a9bac9e6f8216094f751e 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloTopoEMGap.h +++ b/Calorimeter/CaloClusterCorrection/src/CaloTopoEMGap.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /* @@ -28,16 +28,8 @@ class CaloTopoEMGap : public CaloClusterCorrectionCommon { public: - - /** - * @brief Constructor. - * @param type The type of the tool. - * @param name The name of the tool. - * @param parent The parent algorithm of the tool. - */ - CaloTopoEMGap(const std::string& type, - const std::string& name, - const IInterface* parent); + /// Inherit constructor. + using CaloClusterCorrectionCommon::CaloClusterCorrectionCommon; /** @@ -48,7 +40,7 @@ public: /** * @brief Virtual function for the correction-specific code. - * @param ctx The event context. + * @param myctx ToolWithConstants context. * @param cluster The cluster to correct. * It is updated in place. * @param elt The detector description element corresponding @@ -66,7 +58,7 @@ public: * @c CaloSampling::CaloSample; i.e., it has both * the calorimeter region and sampling encoded. */ - virtual void makeTheCorrection (const EventContext& ctx, + virtual void makeTheCorrection (const Context& myctx, xAOD::CaloCluster* cluster, const CaloDetDescrElement* elt, float eta, @@ -78,21 +70,27 @@ public: private: /// Calibration constants: The range over which this correction is defined. - float m_etamin_crack; - float m_etamax_crack; + Constant<float> m_etamin_crack + { this, "etamin_crack", "Lower edge of range over which this correction is defined." }; + Constant<float> m_etamax_crack + { this, "etamax_crack", "Upper edge of range over which this correction is defined." }; /// Calibration constant: The interpolation degree. - int m_degree; + Constant<int> m_degree + { this, "degree", "The interpolation degree." }; /// Calibration constant: The tabulated array of correction weights, /// A and alpha. - CaloRec::Array<2> m_correction; + Constant<CxxUtils::Array<2> > m_correction + { this, "correction", "The tabulated array of correction weights, A and alpha." }; /// Calibration constant: If true, tabulated values are in terms of /// raw (local) eta. - bool m_use_raw_eta; + Constant<bool> m_use_raw_eta + { this, "use_raw_eta", "If true, tabulated values are in terms of raw (local) eta." }; - SG::ReadHandleKey<CaloCellContainer> m_cells; + SG::ReadHandleKey<CaloCellContainer> m_cells + { this, "Cells", "AllCalo", "SG key for calorimeter cells" }; }; diff --git a/Calorimeter/CaloClusterCorrection/src/CaloTopoEMLongWeights.cxx b/Calorimeter/CaloClusterCorrection/src/CaloTopoEMLongWeights.cxx index 51459c644bfe24b6231b246619213061c9a69499..c41344e2747ec3450f16a48cadcd9be5c7e8ee45 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloTopoEMLongWeights.cxx +++ b/Calorimeter/CaloClusterCorrection/src/CaloTopoEMLongWeights.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /******************************************************************** @@ -21,25 +21,9 @@ using xAOD::CaloCluster; using CaloClusterCorr::interpolate; - // ------------------------------------------------------------- - // Constructor - // ------------------------------------------------------------- -CaloTopoEMLongWeights::CaloTopoEMLongWeights(const std::string& type, - const std::string& name, - const IInterface* parent) - : CaloClusterCorrectionCommon(type, name, parent) -{ - declareConstant("correction", m_correction); - declareConstant("eta_start_crack", m_eta_start_crack); - declareConstant("eta_end_crack", m_eta_end_crack); - declareConstant("etamax", m_etamax); - declareConstant("degree", m_degree); - declareConstant("use_raw_eta", m_use_raw_eta); -} - /** * @brief Virtual function for the correction-specific code. - * @param ctx The event context. + * @param myctx ToolWithConstants context. * @param cluster The cluster to correct. * It is updated in place. * @param elt The detector description element corresponding @@ -58,7 +42,7 @@ CaloTopoEMLongWeights::CaloTopoEMLongWeights(const std::string& type, * the calorimeter region and sampling encoded. */ void CaloTopoEMLongWeights::makeTheCorrection - (const EventContext& /*ctx*/, + (const Context& myctx, CaloCluster* cluster, const CaloDetDescrElement* /*elt*/, float eta, @@ -71,41 +55,47 @@ void CaloTopoEMLongWeights::makeTheCorrection // and range checks. However, the v2 corrections were derived // using regular eta instead. float the_aeta; - if (m_use_raw_eta) + if (m_use_raw_eta(myctx)) the_aeta = std::abs (adj_eta); else the_aeta = std::abs (eta); - if (the_aeta >= m_etamax) return; + const float etamax = m_etamax (myctx); + if (the_aeta >= etamax) return; + + const float eta_start_crack = m_eta_start_crack (myctx); + const float eta_end_crack = m_eta_end_crack (myctx); int si; - if (the_aeta < m_eta_start_crack) + if (the_aeta < eta_start_crack) si = 0; - else if (the_aeta > m_eta_end_crack) + else if (the_aeta > eta_end_crack) si = 1; else { // No corrections are applied for the crack region. return; } + const CxxUtils::Array<2> correction = m_correction (myctx); + unsigned int shape[] = {2}; CaloRec::WritableArrayData<1> interp_barriers (shape); - interp_barriers[0] = m_eta_start_crack; - interp_barriers[1] = m_eta_end_crack; + interp_barriers[0] = eta_start_crack; + interp_barriers[1] = eta_end_crack; float pars[6]; - int ibin = static_cast<int> (the_aeta / m_etamax * m_correction.size()); - pars[0] = m_correction[ibin][1]; - pars[1] = m_correction[ibin][2]; - pars[2] = m_correction[ibin][3]; - pars[3] = m_correction[ibin][4]; - pars[4] = m_correction[ibin][5]; - pars[5] = m_correction[ibin][6]; + int ibin = static_cast<int> (the_aeta / etamax * correction.size()); + pars[0] = correction[ibin][1]; + pars[1] = correction[ibin][2]; + pars[2] = correction[ibin][3]; + pars[3] = correction[ibin][4]; + pars[4] = correction[ibin][5]; + pars[5] = correction[ibin][6]; // for (int i=0; i<6; i++) - // pars[i] = interpolate (m_correction, + // pars[i] = interpolate (correction, // the_aeta, - // m_degree, + // degree, // i+1, // interp_barriers); diff --git a/Calorimeter/CaloClusterCorrection/src/CaloTopoEMLongWeights.h b/Calorimeter/CaloClusterCorrection/src/CaloTopoEMLongWeights.h index cf7742d23fa78649b5a2d2a1c0a7c095c9d2e293..748d65b6a43d47d5dd5a74c6be58cf634417e612 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloTopoEMLongWeights.h +++ b/Calorimeter/CaloClusterCorrection/src/CaloTopoEMLongWeights.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef CALOCLUSTERCORRECTION_CALOTOPOEMLONGWEIGHTS_H @@ -24,14 +24,13 @@ PURPOSE: Longitudinal weight corrections applied to topoEM class CaloTopoEMLongWeights : public CaloClusterCorrectionCommon { public: - // constructor - CaloTopoEMLongWeights (const std::string& type, - const std::string& name, - const IInterface* parent); + /// Inherit constructor. + using CaloClusterCorrectionCommon::CaloClusterCorrectionCommon; + /** * @brief Virtual function for the correction-specific code. - * @param ctx The event context. + * @param myctx ToolWithConstants context. * @param cluster The cluster to correct. * It is updated in place. * @param elt The detector description element corresponding @@ -49,7 +48,7 @@ public: * @c CaloSampling::CaloSample; i.e., it has both * the calorimeter region and sampling encoded. */ - virtual void makeTheCorrection (const EventContext& ctx, + virtual void makeTheCorrection (const Context& myctx, xAOD::CaloCluster* cluster, const CaloDetDescrElement* elt, float eta, @@ -59,15 +58,13 @@ public: CaloSampling::CaloSample samp) const; - private: - - - CaloRec::Array<2> m_correction; - float m_eta_start_crack; - float m_eta_end_crack; - float m_etamax; - int m_degree; - bool m_use_raw_eta; +private: + Constant<CxxUtils::Array<2> > m_correction { this, "correction", "" }; + Constant<float> m_eta_start_crack { this, "eta_start_crack", "" }; + Constant<float> m_eta_end_crack { this, "eta_end_crack", "" }; + Constant<float> m_etamax { this, "etamax", "" }; + Constant<int> m_degree { this, "degree", "" }; + Constant<bool> m_use_raw_eta { this, "use_raw_eta", "" }; }; #endif diff --git a/Calorimeter/CaloClusterCorrection/src/CaloTopoEMphimod.cxx b/Calorimeter/CaloClusterCorrection/src/CaloTopoEMphimod.cxx index 893af113cb3361d6020a18ddf7e4264bd893ee2c..60fa68d90f42b714d20fef8f8f8c136be4ebbef6 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloTopoEMphimod.cxx +++ b/Calorimeter/CaloClusterCorrection/src/CaloTopoEMphimod.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /******************************************************************** @@ -25,50 +25,9 @@ Updated: March 12, 2005 (MB) using CLHEP::pi; -// ------------------------------------------------------------- -// Constructor -// ------------------------------------------------------------- -CaloTopoEMphimod::CaloTopoEMphimod(const std::string& type, const std::string& name, const IInterface* parent) - : CaloClusterCorrectionCommon(type, name, parent) -{ - declareConstant("P1b", m_P1b); - declareConstant("P2b", m_P2b); - declareConstant("P3b", m_P3b); - declareConstant("P4b", m_P4b); - declareConstant("P1e", m_P1e); - declareConstant("P2e", m_P2e); - declareConstant("P3e", m_P3e); - declareConstant("P4e", m_P4e); - declareConstant("BarrelGranularity", m_BarrelGranularity); - declareConstant("EndcapGranularity", m_EndcapGranularity); - declareConstant("EtaFrontier", m_EtaFrontier); -} - -// ------------------------------------------------------------- -// Destructor -// ------------------------------------------------------------- -CaloTopoEMphimod::~CaloTopoEMphimod() -{ } - -// Initialization -/*StatusCode CaloTopoEMphimod::initialize() -{ - ATH_MSG_DEBUG( " Phi modulation parameters : " << endmsg); - ATH_MSG_DEBUG( " P1b = " << m_P1b << endmsg); - ATH_MSG_DEBUG( " P2b = " << m_P2b << endmsg); - ATH_MSG_DEBUG( " P3b = " << m_P3b << endmsg); - ATH_MSG_DEBUG( " P4b = " << m_P4b << endmsg); - ATH_MSG_DEBUG( " P1e = " << m_P1e << endmsg); - ATH_MSG_DEBUG( " P2e = " << m_P2e << endmsg); - ATH_MSG_DEBUG( " P3e = " << m_P3e << endmsg); - ATH_MSG_DEBUG( " P4e = " << m_P4e << endmsg); - ATH_MSG_DEBUG( " Granularity = " << m_BarrelGranularity << " / " << m_EndcapGranularity << endmsg); - ATH_MSG_DEBUG( " EtaFrontier = " << m_EtaFrontier << endmsg); - return StatusCode::SUCCESS; -}*/ // make correction to one cluster -void CaloTopoEMphimod::makeTheCorrection(const EventContext& /*ctx*/, +void CaloTopoEMphimod::makeTheCorrection(const Context& myctx, xAOD::CaloCluster* cluster, const CaloDetDescrElement* elt, float /*eta*/, @@ -87,18 +46,24 @@ void CaloTopoEMphimod::makeTheCorrection(const EventContext& /*ctx*/, ATH_MSG_DEBUG( " ... phi-mod BEGIN" << endmsg); ATH_MSG_DEBUG( " ... e, eta, phi " << cluster->e() << " " << cluster->eta() << " " << cluster->phi() << " " << endmsg); + const CxxUtils::Array<1> EtaFrontier = m_EtaFrontier (myctx); + // Compute the correction - if (aeta < m_EtaFrontier[0]) + if (aeta < EtaFrontier[0]) { - iEtaBin = (int)(aeta / m_BarrelGranularity); - qphimod = 1 - m_P1b[iEtaBin]*std::cos(8*pi*u) - m_P2b[iEtaBin]*std::cos(16*pi*u) - - m_P3b[iEtaBin]*std::sin(8*pi*u) - m_P4b[iEtaBin]*std::sin(16*pi*u); + iEtaBin = (int)(aeta / m_BarrelGranularity(myctx)); + qphimod = 1 - m_P1b(myctx)[iEtaBin]*std::cos(8*pi*u) + - m_P2b(myctx)[iEtaBin]*std::cos(16*pi*u) + - m_P3b(myctx)[iEtaBin]*std::sin(8*pi*u) + - m_P4b(myctx)[iEtaBin]*std::sin(16*pi*u); } - else if (aeta > m_EtaFrontier[1] && aeta < m_EtaFrontier[2]) + else if (aeta > EtaFrontier[1] && aeta < EtaFrontier[2]) { - iEtaBin = (int)((aeta - m_EtaFrontier[1]) / m_EndcapGranularity); - qphimod = 1 - m_P1e[iEtaBin]*std::cos(6*pi*u) - m_P2e[iEtaBin]*std::cos(12*pi*u) - - m_P3e[iEtaBin]*std::sin(6*pi*u) - m_P4e[iEtaBin]*std::sin(12*pi*u); + iEtaBin = (int)((aeta - EtaFrontier[1]) / m_EndcapGranularity(myctx)); + qphimod = 1 - m_P1e(myctx)[iEtaBin]*std::cos(6*pi*u) + - m_P2e(myctx)[iEtaBin]*std::cos(12*pi*u) + - m_P3e(myctx)[iEtaBin]*std::sin(6*pi*u) + - m_P4e(myctx)[iEtaBin]*std::sin(12*pi*u); } else // wrong eta value { diff --git a/Calorimeter/CaloClusterCorrection/src/CaloTopoEMphimod.h b/Calorimeter/CaloClusterCorrection/src/CaloTopoEMphimod.h index a21ac28b73d34518a70ede83208130c860531386..752d11a73c64ab5c5536dad1c02bc9a5877826f1 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloTopoEMphimod.h +++ b/Calorimeter/CaloClusterCorrection/src/CaloTopoEMphimod.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef CALOCLUSTERCORRECTION_CALOTOPOEMPHIMOD_H @@ -24,16 +24,12 @@ class CaloCluster; class CaloTopoEMphimod : public CaloClusterCorrectionCommon { +public: + /// Inherit constructor. + using CaloClusterCorrectionCommon::CaloClusterCorrectionCommon; - public: - // constructor - CaloTopoEMphimod(const std::string& type, const std::string& name, const IInterface* parent); - // destructor - ~CaloTopoEMphimod(); - // initialization - // virtual StatusCode initialize(); // virtual method in CaloClusterCorrection - virtual void makeTheCorrection(const EventContext& ctx, + virtual void makeTheCorrection(const Context& myctx, xAOD::CaloCluster* cluster, const CaloDetDescrElement* elt, float eta, @@ -51,18 +47,17 @@ class CaloTopoEMphimod : public CaloClusterCorrectionCommon // with the constraint P0=1 (no modification of the overall scale at this stage). // x is the phi position in the cell (0<x<1) // Tuned on 100 GeV electrons, no energy dependence - CaloRec::Array<1> m_P1b; - CaloRec::Array<1> m_P2b; - CaloRec::Array<1> m_P3b; - CaloRec::Array<1> m_P4b; - CaloRec::Array<1> m_P1e; - CaloRec::Array<1> m_P2e; - CaloRec::Array<1> m_P3e; - CaloRec::Array<1> m_P4e; - CaloRec::Array<1> m_EtaFrontier; - float m_BarrelGranularity; - float m_EndcapGranularity; - + Constant<CxxUtils::Array<1> > m_P1b { this, "P1b", "" }; + Constant<CxxUtils::Array<1> > m_P2b { this, "P2b", "" }; + Constant<CxxUtils::Array<1> > m_P3b { this, "P3b", "" }; + Constant<CxxUtils::Array<1> > m_P4b { this, "P4b", "" }; + Constant<CxxUtils::Array<1> > m_P1e { this, "P1e", "" }; + Constant<CxxUtils::Array<1> > m_P2e { this, "P2e", "" }; + Constant<CxxUtils::Array<1> > m_P3e { this, "P3e", "" }; + Constant<CxxUtils::Array<1> > m_P4e { this, "P4e", "" }; + Constant<CxxUtils::Array<1> > m_EtaFrontier { this, "EtaFrontier", "" }; + Constant<float> m_BarrelGranularity { this, "BarrelGranularity", "" }; + Constant<float> m_EndcapGranularity { this, "EndcapGranularity", "" }; }; #endif diff --git a/Calorimeter/CaloClusterCorrection/src/CaloTopoEMphioff.cxx b/Calorimeter/CaloClusterCorrection/src/CaloTopoEMphioff.cxx index 8aaf180047a1125467413d4781ecd43b3b4259d2..cfb0ee0d0c0a7e655f0087c96cc4ce4e4cf362a7 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloTopoEMphioff.cxx +++ b/Calorimeter/CaloClusterCorrection/src/CaloTopoEMphioff.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /******************************************************************** @@ -25,41 +25,9 @@ Updated: March 12, 2005 (MB) using CLHEP::GeV; -// ------------------------------------------------------------- -// Constructor -// ------------------------------------------------------------- -CaloTopoEMphioff::CaloTopoEMphioff(const std::string& type, const std::string& name, const IInterface* parent) - : CaloClusterCorrectionCommon(type, name, parent) -{ - declareConstant("EdepA", m_EdepA); - declareConstant("EdepB", m_EdepB); - declareConstant("Granularity", m_Granularity); - declareConstant("EtaFrontier", m_EtaFrontier); - declareConstant("FlipPhi", m_FlipPhi); - declareConstant("EndcapOffset", m_EndcapOffset); -} - -// ------------------------------------------------------------- -// Destructor -// ------------------------------------------------------------- -CaloTopoEMphioff::~CaloTopoEMphioff() -{ } - -// Initialization -/*StatusCode CaloTopoEMphioff::initialize() -{ - ATH_MSG_DEBUG( " Phi offset parameters : " << endmsg); - ATH_MSG_DEBUG( " EdepA = " << m_EdepA << endmsg); - ATH_MSG_DEBUG( " EdepB = " << m_EdepB << endmsg); - ATH_MSG_DEBUG( " Granularity = " << m_Granularity << endmsg); - ATH_MSG_DEBUG( " EtaFrontier = " << m_EtaFrontier << endmsg); - ATH_MSG_DEBUG( " FlipPhi = " << m_FlipPhi << endmsg); - ATH_MSG_DEBUG( " EndcapOffset = " << m_EndcapOffset << endmsg); - return StatusCode::SUCCESS; -}*/ // make correction to one cluster -void CaloTopoEMphioff::makeTheCorrection(const EventContext& /*ctx*/, +void CaloTopoEMphioff::makeTheCorrection(const Context& myctx, xAOD::CaloCluster* cluster, const CaloDetDescrElement* elt, float /*eta*/, @@ -71,7 +39,7 @@ void CaloTopoEMphioff::makeTheCorrection(const EventContext& /*ctx*/, float qphioff = 0.; float aeta = fabs(adj_eta); float eclus = cluster->e() * (1./GeV); - int iEtaBin = (int)(aeta/m_Granularity); + int iEtaBin = (int)(aeta/m_Granularity(myctx)); // compute CaloSampling CaloSampling::CaloSample samp = (CaloSampling::CaloSample)elt->getSampling(); @@ -81,21 +49,23 @@ void CaloTopoEMphioff::makeTheCorrection(const EventContext& /*ctx*/, ATH_MSG_DEBUG( " ... phi-off BEGIN" << endmsg); ATH_MSG_DEBUG( " ... e, eta, phi " << cluster->e() << " " << cluster->eta() << " " << cluster->phi() << " " << samp << endmsg); + const CxxUtils::Array<1> EtaFrontier = m_EtaFrontier (myctx); + // Compute the correction - if (aeta < m_EtaFrontier[0]) + if (aeta < EtaFrontier[0]) { - qphioff = m_EdepA[iEtaBin]/sqrt(eclus) + m_EdepB[iEtaBin]; + qphioff = m_EdepA(myctx)[iEtaBin]/sqrt(eclus) + m_EdepB(myctx)[iEtaBin]; } - else if (aeta < m_EtaFrontier[2]) + else if (aeta < EtaFrontier[2]) { - qphioff = m_EdepA[iEtaBin]/eclus + m_EdepB[iEtaBin]; + qphioff = m_EdepA(myctx)[iEtaBin]/eclus + m_EdepB(myctx)[iEtaBin]; qphioff = -qphioff; - if (aeta > m_EtaFrontier[1]) qphioff -= m_EndcapOffset; + if (aeta > EtaFrontier[1]) qphioff -= m_EndcapOffset(myctx); } - else if (aeta < m_EtaFrontier[3]) + else if (aeta < EtaFrontier[3]) { - qphioff = m_EdepA[iEtaBin]*eclus + m_EdepB[iEtaBin]; - qphioff -= m_EndcapOffset; + qphioff = m_EdepA(myctx)[iEtaBin]*eclus + m_EdepB(myctx)[iEtaBin]; + qphioff -= m_EndcapOffset(myctx); } else // wrong eta value { @@ -103,7 +73,7 @@ void CaloTopoEMphioff::makeTheCorrection(const EventContext& /*ctx*/, } // Flip the sign, if needed. - if (m_FlipPhi && elt->eta_raw() < 0) + if (m_FlipPhi(myctx) && elt->eta_raw() < 0) qphioff = -qphioff; // Print out the function for debugging diff --git a/Calorimeter/CaloClusterCorrection/src/CaloTopoEMphioff.h b/Calorimeter/CaloClusterCorrection/src/CaloTopoEMphioff.h index 6f4829ed0183312100e665b3eac7afeb56ff37c6..481fafd10ed28504d96debd67c810a59fecc0d06 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloTopoEMphioff.h +++ b/Calorimeter/CaloClusterCorrection/src/CaloTopoEMphioff.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef CALOCLUSTERCORRECTION_CALOTOPOEMPHIOFF_H @@ -25,16 +25,13 @@ class CaloCluster; class CaloTopoEMphioff : public CaloClusterCorrectionCommon { +public: + /// Inherit constructor. + using CaloClusterCorrectionCommon::CaloClusterCorrectionCommon; + - public: - // constructor - CaloTopoEMphioff(const std::string& type, const std::string& name, const IInterface* parent); - // destructor - ~CaloTopoEMphioff(); - // initialization - // virtual StatusCode initialize(); // virtual method in CaloClusterCorrection - virtual void makeTheCorrection(const EventContext& ctx, + virtual void makeTheCorrection(const Context& myctx, xAOD::CaloCluster* cluster, const CaloDetDescrElement* elt, float eta, @@ -56,17 +53,13 @@ class CaloTopoEMphioff : public CaloClusterCorrectionCommon // EdepB is B in 25 eta bins // Granularity is the Granularity // EtaFrontier[i] is 0.8, 2.3, 2.5 for i=0,1,2 - CaloRec::Array<1> m_EdepA; - CaloRec::Array<1> m_EdepB; - CaloRec::Array<1> m_EtaFrontier; - - //std::vector<float> m_EdepA; - //std::vector<float> m_EdepB; - //std::vector<float> m_EtaFrontier; - float m_Granularity; - int m_FlipPhi; - float m_EndcapOffset; + Constant<CxxUtils::Array<1> > m_EdepA { this, "EdepA", "" }; + Constant<CxxUtils::Array<1> > m_EdepB { this, "EdepB", "" }; + Constant<CxxUtils::Array<1> > m_EtaFrontier { this, "EtaFrontier", "" }; + Constant<float> m_Granularity { this, "Granularity", "" }; + Constant<int> m_FlipPhi { this, "FlipPhi", "" }; + Constant<float> m_EndcapOffset { this, "EndcapOffset", "" }; }; #endif diff --git a/Calorimeter/CaloClusterCorrection/src/CaloTopoEMsshape.cxx b/Calorimeter/CaloClusterCorrection/src/CaloTopoEMsshape.cxx index 959f8c9950c573ac6a1753285ff2dabaca636ae7..bf4b8d0124f549de33703de1c3bc454016becb9a 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloTopoEMsshape.cxx +++ b/Calorimeter/CaloClusterCorrection/src/CaloTopoEMsshape.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /******************************************************************** @@ -22,43 +22,9 @@ Updated: March 12, 2005 (MB) #include "GaudiKernel/MsgStream.h" #include <math.h> -// ------------------------------------------------------------- -// Constructor -// ------------------------------------------------------------- -CaloTopoEMsshape::CaloTopoEMsshape(const std::string& type, const std::string& name, const IInterface* parent) - : CaloClusterCorrectionCommon(type, name, parent) -{ - declareConstant("P0", m_P0); - declareConstant("P1", m_P1); - declareConstant("P2", m_P2); - declareConstant("P3", m_P3); - declareConstant("P4", m_P4); - declareConstant("Granularity", m_Granularity); - declareConstant("EtaFrontier", m_EtaFrontier); -} - -// ------------------------------------------------------------- -// Destructor -// ------------------------------------------------------------- -CaloTopoEMsshape::~CaloTopoEMsshape() -{ } - -// Initialization -/*StatusCode CaloTopoEMsshape::initialize() -{ - ATH_MSG_DEBUG( " S-shape parameters : " << endmsg); - ATH_MSG_DEBUG( " P0 = " << m_P0 << endmsg); - ATH_MSG_DEBUG( " P1 = " << m_P1 << endmsg); - ATH_MSG_DEBUG( " P2 = " << m_P2 << endmsg); - ATH_MSG_DEBUG( " P3 = " << m_P3 << endmsg); - ATH_MSG_DEBUG( " P4 = " << m_P4 << endmsg); - ATH_MSG_DEBUG( " Granularity = " << m_Granularity << endmsg); - ATH_MSG_DEBUG( " Eta frontiers = " << m_EtaFrontier << endmsg); - return StatusCode::SUCCESS; -}*/ // make correction to one cluster -void CaloTopoEMsshape::makeTheCorrection(const EventContext& /*ctx*/, +void CaloTopoEMsshape::makeTheCorrection(const Context& myctx, xAOD::CaloCluster* cluster, const CaloDetDescrElement* elt, float eta, @@ -69,7 +35,7 @@ void CaloTopoEMsshape::makeTheCorrection(const EventContext& /*ctx*/, { float qsshape = 0.; float aeta = fabs(adj_eta); - int iEtaBin = (int)(aeta/m_Granularity); + int iEtaBin = (int)(aeta/m_Granularity(myctx)); // u is the normalized coordinate along eta (within a cell) // -0.5 < u < 0.5 float u = (eta - elt->eta()) / elt->deta(); @@ -82,13 +48,16 @@ void CaloTopoEMsshape::makeTheCorrection(const EventContext& /*ctx*/, ATH_MSG_DEBUG( " ... s-shapes BEGIN ; u = " << u << " " << eta << " " << adj_eta << " " << elt->eta() << " " << elt->deta() << endmsg); ATH_MSG_DEBUG( " ... e, eta, phi " << cluster->e() << " " << cluster->eta() << " " << cluster->phi() << " " << samp << endmsg); + const CxxUtils::Array<1> EtaFrontier = m_EtaFrontier (myctx); + // Compute the correction - if (aeta < m_EtaFrontier[0] || (aeta > m_EtaFrontier[1] && aeta < m_EtaFrontier[2])) + if (aeta < EtaFrontier[0] || (aeta > EtaFrontier[1] && aeta < EtaFrontier[2])) { if (samp == CaloSampling::EMB2 || samp == CaloSampling::EME2) { - qsshape = m_P0[iEtaBin]*0.01*std::atan(m_P1[iEtaBin]*u) - + m_P2[iEtaBin]*0.01*u + m_P3[iEtaBin]*1e-3*fabs(u) + m_P4[iEtaBin]*1e-3; + qsshape = m_P0(myctx)[iEtaBin]*0.01*std::atan(m_P1(myctx)[iEtaBin]*u) + + m_P2(myctx)[iEtaBin]*0.01*u + m_P3(myctx)[iEtaBin]*1e-3*fabs(u) + + m_P4(myctx)[iEtaBin]*1e-3; } else // wrong samp value { diff --git a/Calorimeter/CaloClusterCorrection/src/CaloTopoEMsshape.h b/Calorimeter/CaloClusterCorrection/src/CaloTopoEMsshape.h index cd505582aae990d9f1b56fb491d1a8dc50778589..eebd1c369530756ccb68c7f7ba833ea082124c1e 100755 --- a/Calorimeter/CaloClusterCorrection/src/CaloTopoEMsshape.h +++ b/Calorimeter/CaloClusterCorrection/src/CaloTopoEMsshape.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef CALOCLUSTERCORRECTION_CALOTOPOEMSSHAPE_H @@ -24,16 +24,13 @@ class CaloCluster; class CaloTopoEMsshape : public CaloClusterCorrectionCommon { +public: + /// Inherit constructor. + using CaloClusterCorrectionCommon::CaloClusterCorrectionCommon; + - public: - // constructor - CaloTopoEMsshape(const std::string& type, const std::string& name, const IInterface* parent); - // destructor - ~CaloTopoEMsshape(); - // initialization - // virtual StatusCode initialize(); // virtual method in CaloClusterCorrection - virtual void makeTheCorrection(const EventContext& ctx, + virtual void makeTheCorrection(const Context& myctx, xAOD::CaloCluster* cluster, const CaloDetDescrElement* elt, float eta, @@ -47,14 +44,13 @@ class CaloTopoEMsshape : public CaloClusterCorrectionCommon // f(x) = P0 + atan(P1*(x-0.5)) + P2(x-0.5) + P3*|x-0.5| + P4 // x is the position on the cell (0<x<1) // Tuned on 100 GeV electrons, no energy dependence - CaloRec::Array<1> m_P0; - CaloRec::Array<1> m_P1; - CaloRec::Array<1> m_P2; - CaloRec::Array<1> m_P3; - CaloRec::Array<1> m_P4; - CaloRec::Array<1> m_EtaFrontier; - float m_Granularity; - + Constant<CxxUtils::Array<1> > m_P0 { this, "P0", "" }; + Constant<CxxUtils::Array<1> > m_P1 { this, "P1", "" }; + Constant<CxxUtils::Array<1> > m_P2 { this, "P2", "" }; + Constant<CxxUtils::Array<1> > m_P3 { this, "P3", "" }; + Constant<CxxUtils::Array<1> > m_P4 { this, "P4", "" }; + Constant<CxxUtils::Array<1> > m_EtaFrontier { this, "EtaFrontier", "" }; + Constant<float> m_Granularity { this, "Granularity", "" }; }; #endif diff --git a/Calorimeter/CaloRec/python/CaloClusterSwGetterBase.py b/Calorimeter/CaloRec/python/CaloClusterSwGetterBase.py index f369306ab4a8312a53e72f76bb8bf037f556c131..d006752e6cb11885649be4aeaf6170a0c32a761a 100644 --- a/Calorimeter/CaloRec/python/CaloClusterSwGetterBase.py +++ b/Calorimeter/CaloRec/python/CaloClusterSwGetterBase.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # # $Id: CaloClusterSwGetterBase.py,v 1.3 2007/05/26 03:14:56 ssnyder Exp $ @@ -90,7 +90,7 @@ class CaloClusterSwGetterBase (CaloClusterGetterBase): # Create the correction tool list for SW clustering. def makeCorrectionTools (self): corrargs = self._corrargs.copy() - if not self._corrargs.has_key ('cells_name'): + if 'cells_name' not in self._corrargs: cells = self.getInputGetter(jp.CaloRecFlags.clusterCellGetterName()) corrargs['cells_name'] = cells.outputKey() return make_CaloSwCorrections (self._clusterKey, diff --git a/Calorimeter/CaloRec/python/CaloClusterTopoEMFixedSizeGetter.py b/Calorimeter/CaloRec/python/CaloClusterTopoEMFixedSizeGetter.py index d1bd0c726cf12acd0c721730182b9d53b41367fe..bf26ff4a8b29eb8a1e445dfcbd79861d8957b3b5 100644 --- a/Calorimeter/CaloRec/python/CaloClusterTopoEMFixedSizeGetter.py +++ b/Calorimeter/CaloRec/python/CaloClusterTopoEMFixedSizeGetter.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # @@ -26,7 +26,7 @@ class CaloClusterTopoEMFixedSizeGetter (CaloClusterGetterBase): def makeCorrectionTools (self): corrargs = self._corrargs.copy() - if not self._corrargs.has_key ('cells_name'): + if 'cells_name' not in self._corrargs: cells = self.getInputGetter(jp.CaloRecFlags.clusterCellGetterName()) corrargs['cells_name'] = cells.outputKey() return make_CaloSwCorrections (key = 'gam35', diff --git a/Calorimeter/CaloRec/share/CaloRec_RTT_T1_McAtNLO_top.py b/Calorimeter/CaloRec/share/CaloRec_RTT_T1_McAtNLO_top.py index 163d90c08ef192a4f85f495693a521d7cd769638..da0abc0816b8a82ff72155f770700c54b57775a0 100644 --- a/Calorimeter/CaloRec/share/CaloRec_RTT_T1_McAtNLO_top.py +++ b/Calorimeter/CaloRec/share/CaloRec_RTT_T1_McAtNLO_top.py @@ -60,4 +60,4 @@ include ("RecExCommon/RecExCommon_topOptions.py") #CBNT_Audit.nEventPrintMem=999999 MessageSvc.Format = "% F%40W%S%7W%R%T %0W%M" -print "BEGIN_RTTINFO = 1103_T1_McAtNLO_top" +printfunc ("BEGIN_RTTINFO = 1103_T1_McAtNLO_top") diff --git a/Calorimeter/CaloRec/share/didAnyTestFail.py b/Calorimeter/CaloRec/share/didAnyTestFail.py index e01613cbc9ad3dbd1c0ebc39a827d99a4043ff77..7fed66fa4885e415fa500db818d9becdcdd8e2b1 100644 --- a/Calorimeter/CaloRec/share/didAnyTestFail.py +++ b/Calorimeter/CaloRec/share/didAnyTestFail.py @@ -1,7 +1,11 @@ -import os, sys, commands,getopt, datetime +import os, sys,getopt, datetime import re import logging +from future import standard_library +standard_library import aliases() +import subprocess + def file_exists(fpath): return os.path.exists(fpath) @@ -54,9 +58,9 @@ class CheckForFail: ## return 1 # FIX : since rttDescriptor.name doesn't work correctly - log=commands.getoutput("ls CaloRec_RTT_*_log") + log=subprocess.getoutput("ls CaloRec_RTT_*_log") com = "cat " +log + "|grep BEGIN_RTTINFO | cut -d= -f2| tail -n1" - jobopt=commands.getoutput(com) + jobopt=subprocess.getoutput(com) logger.info(jobopt) found=0 for opt in self.tests: diff --git a/Calorimeter/CaloRec/share/extractCaloRec.py b/Calorimeter/CaloRec/share/extractCaloRec.py index fd9c7f0d024c033e84d494cc7281fab3489870df..b32e83d13878f1782e3684ef4b0b2fb9cddf0ae1 100644 --- a/Calorimeter/CaloRec/share/extractCaloRec.py +++ b/Calorimeter/CaloRec/share/extractCaloRec.py @@ -1,5 +1,9 @@ -import os, sys, commands,getopt, datetime -#import os, sys, commands,getopt +import os, sys, getopt, datetime +#import os, sys, getopt + +from future import standard_library +standard_library import aliases() +import subprocess class LogClass: @@ -136,14 +140,14 @@ class extract: if self.debugLevel: mylog.log(com) - res=commands.getoutput(com) + res=subprocess.getoutput(com) tmp= res.splitlines() else: for i in self.CaloList: com="grep \"Time User\" " + file + " | grep \"\<" +i+":initi\"" if self.debugLevel: mylog.log(com) - res=commands.getoutput(com) + res=subprocess.getoutput(com) tmp += res.splitlines() return tmp @@ -155,7 +159,7 @@ class extract: if self.debugLevel: mylog.log(com) - res=commands.getoutput(com) + res=subprocess.getoutput(com) res2= res.splitlines() return res2 @@ -168,14 +172,14 @@ class extract: if self.debugLevel: mylog.log(com) - res=commands.getoutput(com) + res=subprocess.getoutput(com) tmp= res.splitlines() else: for i in self.CaloList: com="grep \"Time User\" " + file + " | grep \"\<" +i if self.debugLevel: mylog.log(com) - res=commands.getoutput(com) + res=subprocess.getoutput(com) tmp += res.splitlines() return tmp @@ -192,14 +196,14 @@ class extract: if self.debugLevel: mylog.log(com) - res=commands.getoutput(com) + res=subprocess.getoutput(com) tmp= res.splitlines() else: for i in self.extraCaloList: com="grep \"Time User\" " + file + " | grep '" +i+" '" if self.debugLevel: mylog.log(com) - res=commands.getoutput(com) + res=subprocess.getoutput(com) tmp += res.splitlines() return tmp @@ -212,7 +216,7 @@ class extract: if self.debugLevel: mylog.log(com) - res=commands.getoutput(com) + res=subprocess.getoutput(com) res2= res.splitlines() return res2 @@ -223,7 +227,7 @@ class extract: if self.debugLevel: mylog.log(com) - res=commands.getoutput(com) + res=subprocess.getoutput(com) if self.debugLevel: mylog.log(res) @@ -239,7 +243,7 @@ class extract: if self.debugLevel: mylog.log(com) - res=commands.getoutput(com) + res=subprocess.getoutput(com) res2= res.splitlines() return res2 @@ -250,7 +254,7 @@ class extract: if self.debugLevel: mylog.log(com) - res=commands.getoutput(com) + res=subprocess.getoutput(com) res2= res.splitlines() return res2 @@ -262,7 +266,7 @@ class extract: if self.debugLevel: mylog.log(com) - res=commands.getoutput(com) + res=subprocess.getoutput(com) res2= res.splitlines() return res2 @@ -277,7 +281,7 @@ class extract: if self.debugLevel: mylog.log(com) - res=commands.getoutput(com) + res=subprocess.getoutput(com) tmp +=res.splitlines() # real memory @@ -285,7 +289,7 @@ class extract: if self.debugLevel: mylog.log(com) - res=commands.getoutput(com) + res=subprocess.getoutput(com) tmp +=res.splitlines() return tmp @@ -300,7 +304,7 @@ class extract: if self.debugLevel: mylog.log(com) - res=commands.getoutput(com) + res=subprocess.getoutput(com) res2= res.splitlines() if len(res2)==0: return tmp @@ -314,7 +318,7 @@ class extract: if self.debugLevel: mylog.log(com) - res=commands.getoutput(com) + res=subprocess.getoutput(com) res2= res.splitlines() if len(res2)==0: return tmp @@ -335,7 +339,7 @@ class extract: t=i.lstrip() tmp=t.split(" ") alg.append(tmp[0]) - #print alg + #printfunc (alg) for j in alg: tref=self.extractCPUTimeInitializeAlgo(reffile,str(j),mylog) tnew=self.extractCPUTimeInitializeAlgo(file,str(j),mylog) @@ -344,7 +348,7 @@ class extract: mylog.log(mess) continue #if str(j)=="LArSWClusterMaker:initialize": - # print str(j)," ", tref," ",tnew + # printfunc (str(j)," ", tref," ",tnew) #if self.CPUTimeUnity(str(tref[0]))==self.CPUTimeUnity(str(tnew[0])): trefUnity=self.CPUTimeUnity(str(tref[0])) tnewUnity=self.CPUTimeUnity(str(tnew[0])) @@ -397,8 +401,8 @@ class extract: nbEvtRef=self.extractNbEventsExecuteAlgo(reffile,str(j),mylog) tnew=self.extractCPUTimeExecuteAlgo(file,str(j),mylog) nbEvtNew=self.extractNbEventsExecuteAlgo(file,str(j),mylog) - #print j," ", tref," ",tnew - #print 'KARIM2 ',j," ",nbEvtRef ," ",nbEvtNew + #printfunc (j," ", tref," ",tnew) + #printfunc ('KARIM2 ',j," ",nbEvtRef ," ",nbEvtNew) if len(tnew)==0: mess=j+" not found in " + file mylog.log(mess) @@ -461,8 +465,8 @@ class extract: if isok==0: continue - # print j," ", tref," ",tnew - # print j," ",nbEvtRefb ," ",nbEvtNewb + # printfunc (j," ", tref," ",tnew) + # printfunc (j," ",nbEvtRefb ," ",nbEvtNewb) # convert en secondes trefUnity=self.CPUTimeUnity(str(tref[0])) @@ -539,7 +543,7 @@ class extract: #mylog.log(mess) #return continue - # print memexeref, memexe + # printfunc (memexeref, memexe) if len(memexe)==0: #mess='Info about memory execute not found' #mylog.log(mess) @@ -574,26 +578,26 @@ class extract: # find the first event with memory info #for i in range(1,int(nbEvents[0])+1): - # print i + # printfunc (i) # try: # memexeFIRST=self.extractMemoryCBNTExecute(file,i,mylog) # firstEvForLeak=memexeFIRST # break # except: - # print 'pipo' + # printfunc ('pipo') # find the last event with memory info #for i in range(int(nbEvents[0])+1,1): - # print i + # printfunc (i) # try: # memexeLAST=self.extractMemoryCBNTExecute(file,i,mylog) # lastEvForLeak=memexeLAST # break # except: - # print 'pipo' + # printfunc ('pipo') - #print "first event : ", memexeFIRST - #print "last event : ", memexeLAST + #printfunc ("first event : ", memexeFIRST) + #printfunc ("last event : ", memexeLAST) #leakRSS=float(memexeLAST[1])-float(memexeFIRST[1]) @@ -601,7 +605,7 @@ class extract: com="grep \"only second half of the job\" " + file + " | awk '{print $9}'" - res=commands.getoutput(com) + res=subprocess.getoutput(com) res2= res.splitlines() mess="leak = "+str(res2[0])+" MByte/event" @@ -622,7 +626,7 @@ class extract: if self.debugLevel: mylog.log(com) - res=commands.getoutput(com) + res=subprocess.getoutput(com) res2= res.splitlines() return res2 @@ -638,7 +642,7 @@ class extract: com="grep \"^Size of "+str(i)+"\" " + file + " | awk '{print $5}'" if self.debugLevel: mylog.log(com) - res=commands.getoutput(com) + res=subprocess.getoutput(com) tmp += res.splitlines() return tmp else: @@ -663,7 +667,7 @@ class extract: com="ls -l "+str(i)+" " + " | awk '{print $5}'" if self.debugLevel: mylog.log(com) - res=commands.getoutput(com) + res=subprocess.getoutput(com) tmp += res.splitlines() return tmp else: @@ -694,7 +698,7 @@ class extract: nbEventsRef=self.extractNbEventsExecuteAlgo(reffile,"CaloCellMaker:execute",mylog) nbEvents=self.extractNbEventsExecuteAlgo(file,"CaloCellMaker:execute",mylog) - #print 'KARIM',nbEventsRef,' ', nbEvents + #printfunc ('KARIM',nbEventsRef,' ', nbEvents) SizeOfFilesNew[j]=float(SizeOfFilesNew[j])/float(nbEvents[0]) SizeOfFilesRef[j]=float(SizeOfFilesRef[j])/float(nbEventsRef[0]) @@ -716,20 +720,20 @@ class extract: ## def extractLog(self,log): ## com="grep ^BEGIN_RTTINFO "+log -## res=commands.getoutput(com) +## res=subprocess.getoutput(com) ## res2=res.splitlines() -## print res2 +## printfunc (res2) ## names=[] ## for i in res2: ## name=i.split('=') ## name[1]=name[1].strip() ## names.append(name[1]) -## print name[1] +## printfunc (name[1]) ## com="grep -n \"^BEGIN_RTTINFO = "+name[1]+"\" "+log+"| cut -d: -f1" -## print com -## n1=commands.getoutput(com) +## printfunc (com) +## n1=subprocess.getoutput(com) ## com="grep -n \"^END_RTTINFO = "+name[1]+"\" "+log+" | cut -d: -f1" -## n2=commands.getoutput(com) +## n2=subprocess.getoutput(com) ## nblines=int(n2)-int(n1) ## newlog=name[1]+".log" ## com="grep -A"+str(nblines)+" \"^BEGIN_RTTINFO = "+name[1]+"\" "+log +" >"+newlog @@ -740,14 +744,14 @@ class extract: com="wc -l "+log +" | awk '{print $1}'" - res=commands.getoutput(com) + res=subprocess.getoutput(com) res2=res.splitlines() nbAllLines=int(res2[0]) - #print nbAllLines + #printfunc (nbAllLines) com="grep ^BEGIN_RTTINFO "+log - res=commands.getoutput(com) + res=subprocess.getoutput(com) res2=res.splitlines() names=[] @@ -757,20 +761,20 @@ class extract: names.append(name[1]) for i in range(len(names)): - #print i,names[i] + #printfunc (i,names[i]) #com="grep -n BEGIN_RTTINFO="+names[i]+" "+log+" | cut -d: -f1" com="grep -n \"^BEGIN_RTTINFO = "+names[i]+"\" "+log+"| cut -d: -f1" - n1=commands.getoutput(com) + n1=subprocess.getoutput(com) try: #com="grep -n BEGIN_RTTINFO="+names[i+1]+" "+log+" | cut -d: -f1" com="grep -n \"^BEGIN_RTTINFO = "+names[i+1]+"\" "+log+"| cut -d: -f1" - n2=commands.getoutput(com) + n2=subprocess.getoutput(com) except: n2=nbAllLines nblines=int(n2)-int(n1)-1 - #print nblines + #printfunc (nblines) newlog=names[i]+".log" #com="grep -A"+str(nblines)+" BEGIN_RTTINFO="+names[i]+" "+log +" >"+newlog com="grep -A"+str(nblines)+" \"^BEGIN_RTTINFO = "+names[i]+"\" "+log +" >"+newlog @@ -790,7 +794,7 @@ class extract: try: # rttDescriptor = self.dict.get('JobDescriptor') # log=rttDescriptor.log - res2=commands.getoutput("ls CaloRec_RTT_*_log") + res2=subprocess.getoutput("ls CaloRec_RTT_*_log") log=res2 except: log=sys.argv[1] @@ -814,7 +818,7 @@ class extract: for test in names: com="rm resultats.txt" - commands.getoutput(com) + subprocess.getoutput(com) mylog=LogClass("resultats.txt",1) @@ -823,7 +827,7 @@ class extract: log=test+".log" com = "cat " +log + "|grep BEGIN_RTTINFO | cut -d= -f2| tail -n1" - res=commands.getoutput(com) + res=subprocess.getoutput(com) jobopt=res.strip() mylog.log(str(res)) @@ -838,14 +842,14 @@ class extract: ok=0 for i in self.logDict.keys(): if i==res.strip(): - print "Found : ",self.logDict[i] + printfunc ("Found : ",self.logDict[i]) ok=1 self.reflog=self.logDict[i] break if ok==0: - print "logfile not in dict !!!" + printfunc ("logfile not in dict !!!") return @@ -878,15 +882,15 @@ class extract: mylog.log("Computing node informations : ") com="cat /etc/redhat-release" - res=commands.getoutput(com) + res=subprocess.getoutput(com) mylog.log("Operating system : "+str(res)) com="cat /proc/cpuinfo | grep \"model name\" | tail -n1 | cut -d: -f2" - res=commands.getoutput(com) + res=subprocess.getoutput(com) mylog.log("CPU :"+str(res)) com="cat /proc/meminfo | grep MemTotal | cut -d: -f2" - res=commands.getoutput(com) + res=subprocess.getoutput(com) mylog.log("MEMORY :"+str(res)) mylog.log("----------------------------------------------------------------------------------") @@ -939,7 +943,7 @@ class extract: com="ls -ltr" mylog.log(com) - mylog.log(str(commands.getoutput(com))) + mylog.log(str(subprocess.getoutput(com))) mylog.close() diff --git a/Calorimeter/CaloTools/src/CaloNoiseCondAlg.cxx b/Calorimeter/CaloTools/src/CaloNoiseCondAlg.cxx index 3386d2306b30e634db8322a1824add160af11ff2..e5a5615d28bc05a69ff25cfdcaccf102dda60b16 100644 --- a/Calorimeter/CaloTools/src/CaloNoiseCondAlg.cxx +++ b/Calorimeter/CaloTools/src/CaloNoiseCondAlg.cxx @@ -34,12 +34,7 @@ StatusCode CaloNoiseCondAlg::initialize() { return StatusCode::FAILURE; } - if ( m_useHVCorr) { - if (m_hvCorrKey.initialize().isFailure()) { - ATH_MSG_ERROR("useHVCorr set to true but failed to initialize LArHVCorrKey"); - return StatusCode::FAILURE; - } - } + ATH_CHECK( m_hvCorrKey.initialize(m_useHVCorr) ); if (m_lumi0<0) { if (m_lumiFolderKey.initialize().isFailure()) { diff --git a/Control/AthenaConfiguration/python/AtlasSemantics.py b/Control/AthenaConfiguration/python/AtlasSemantics.py index 083f5f913907df9b535934988b3d95cb5629ab80..6ae78fcf504112c2708c2281625926f1a7dfbe51 100644 --- a/Control/AthenaConfiguration/python/AtlasSemantics.py +++ b/Control/AthenaConfiguration/python/AtlasSemantics.py @@ -7,6 +7,15 @@ import re import collections import copy +# collections.Sequence is deprecated as of python 3.3. +# As of 3.9, need to get it from collections.abc. +# But that doesn't exist in py2. +try: + from collections import abc + Sequence = abc.Sequence +except ImportError: + Sequence = collections.Sequence + class AppendListSemantics(GaudiConfig2.semantics.SequenceSemantics): ''' Extend the sequence-semantics with a merge-method that appends the lists @@ -106,7 +115,7 @@ class PublicHandleArraySemantics(GaudiConfig2.semantics.PropertySemantics): super(PublicHandleArraySemantics, self).__init__(cpp_type,name) def store(self, value): - if not isinstance(value,collections.Sequence) and not isinstance(value,set): + if not isinstance(value,Sequence) and not isinstance(value,set): value=[value,] newValue=[] @@ -172,7 +181,7 @@ class SubAlgoSemantics(GaudiConfig2.semantics.PropertySemantics): super(SubAlgoSemantics, self).__init__(cpp_type,name) def store(self,value): - if not isinstance(value,collections.Sequence): + if not isinstance(value,Sequence): value=[value,] for v in value: diff --git a/Control/AthenaExamples/AthAsgExUnittest/AthAsgExUnittest/MyPackageDict.h b/Control/AthenaExamples/AthAsgExUnittest/AthAsgExUnittest/MyPackageDict.h deleted file mode 100644 index 8373e93bb0e1430ae3176bec1671f2cff09c8d52..0000000000000000000000000000000000000000 --- a/Control/AthenaExamples/AthAsgExUnittest/AthAsgExUnittest/MyPackageDict.h +++ /dev/null @@ -1,10 +0,0 @@ -/* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef ATHASGEXUNITTEST_MYPACKAGEDICT_H -#define ATHASGEXUNITTEST_MYPACKAGEDICT_H - -#include "AthAsgExUnittest/MyPackageTool.h" - -#endif diff --git a/Control/AthenaExamples/AthAsgExUnittest/AthAsgExUnittest/selection.xml b/Control/AthenaExamples/AthAsgExUnittest/AthAsgExUnittest/selection.xml deleted file mode 100644 index 1afaa3919dd9f187ed35151851651ff393280ff0..0000000000000000000000000000000000000000 --- a/Control/AthenaExamples/AthAsgExUnittest/AthAsgExUnittest/selection.xml +++ /dev/null @@ -1,4 +0,0 @@ -<lcgdict> - <class name="MyPackageTool" /> - <class name="IMyPackageTool" /> -</lcgdict> diff --git a/Control/AthenaExamples/AthAsgExUnittest/CMakeLists.txt b/Control/AthenaExamples/AthAsgExUnittest/CMakeLists.txt index 0a3ab24abf76c7dd7e745a7f4a2d17b2be162adb..2386195349647cb205a3ca7511773728f788b027 100644 --- a/Control/AthenaExamples/AthAsgExUnittest/CMakeLists.txt +++ b/Control/AthenaExamples/AthAsgExUnittest/CMakeLists.txt @@ -1,34 +1,18 @@ - -# -# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -# - -################################################################################ -# Package: MyPackage -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( AthAsgExUnittest ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - GaudiKernel - PRIVATE - Control/AthenaBaseComps - Control/AthAnalysisBaseComps - Control/AthToolSupport/AsgTools - Event/xAOD/xAODJet - AtlasTest/GoogleTestTools ) - # Libraries in the package: atlas_add_library( AthAsgExUnittestLib MyPackage/*.h src/*.cxx Root/*.cxx - PUBLIC_HEADERS AthAsgExUnittest + NO_PUBLIC_HEADERS LINK_LIBRARIES GaudiKernel AsgTools AthAnalysisBaseCompsLib ) + atlas_add_component( AthAsgExUnittest src/components/*.cxx - LINK_LIBRARIES GaudiKernel AsgTools AthAsgExUnittestLib ) + LINK_LIBRARIES AthAsgExUnittestLib ) # Add tests: atlas_add_test( gt_AthAsgExUnittest @@ -46,5 +30,3 @@ atlas_add_test( gt_MockxAODJet atlas_add_test( gt_xAODJet SOURCES test/gt_xAODJet.cxx LINK_LIBRARIES xAODJet GoogleTestTools ) - - diff --git a/Control/AthenaExamples/AthAsgExUnittest/Root/MyPackageTool.cxx b/Control/AthenaExamples/AthAsgExUnittest/Root/MyPackageTool.cxx index f484eafff3e1d44768e7d9834de3c105fe3ac706..0350e0f3b4c1a07f529d15d28bff44465a64e9e9 100644 --- a/Control/AthenaExamples/AthAsgExUnittest/Root/MyPackageTool.cxx +++ b/Control/AthenaExamples/AthAsgExUnittest/Root/MyPackageTool.cxx @@ -1,10 +1,10 @@ // -// Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration // // MyPackage includes -#include "AthAsgExUnittest/MyPackageTool.h" +#include "../src/MyPackageTool.h" MyPackageTool::MyPackageTool( const std::string& name ) : asg::AsgTool( name ) { //example property declarations with default values diff --git a/Control/AthenaExamples/AthAsgExUnittest/AthAsgExUnittest/IMyPackageTool.h b/Control/AthenaExamples/AthAsgExUnittest/src/IMyPackageTool.h similarity index 100% rename from Control/AthenaExamples/AthAsgExUnittest/AthAsgExUnittest/IMyPackageTool.h rename to Control/AthenaExamples/AthAsgExUnittest/src/IMyPackageTool.h diff --git a/Control/AthenaExamples/AthAsgExUnittest/src/MyPackageAlg.h b/Control/AthenaExamples/AthAsgExUnittest/src/MyPackageAlg.h index 0c03b35d6fa2c8e4c2d7cb48b6acd585efe44105..e8a9607eb7ed94bdeb8db453068ffbe61325a885 100644 --- a/Control/AthenaExamples/AthAsgExUnittest/src/MyPackageAlg.h +++ b/Control/AthenaExamples/AthAsgExUnittest/src/MyPackageAlg.h @@ -12,7 +12,7 @@ #include "AsgTools/AnaToolHandle.h" //use asg::AnaToolHandle instead of regular ToolHandles for full dual-use experience! #endif -#include "AthAsgExUnittest/IMyPackageTool.h" +#include "IMyPackageTool.h" class MyPackageAlg: public ::AthAnalysisAlgorithm { diff --git a/Control/AthenaExamples/AthAsgExUnittest/AthAsgExUnittest/MyPackageTool.h b/Control/AthenaExamples/AthAsgExUnittest/src/MyPackageTool.h similarity index 86% rename from Control/AthenaExamples/AthAsgExUnittest/AthAsgExUnittest/MyPackageTool.h rename to Control/AthenaExamples/AthAsgExUnittest/src/MyPackageTool.h index 9d902a658e3f389d11ae3984af10e8e7f6332080..ebc1bef9cbf18ea5b3947d48d504e7a4b1d22dc5 100644 --- a/Control/AthenaExamples/AthAsgExUnittest/AthAsgExUnittest/MyPackageTool.h +++ b/Control/AthenaExamples/AthAsgExUnittest/src/MyPackageTool.h @@ -1,12 +1,12 @@ // -*- mode: c++ -*- // -// Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration // #ifndef ATHASGEXUNITTEST_MYPACKAGETOOL_H #define ATHASGEXUNITTEST_MYPACKAGETOOL_H 1 #include "AsgTools/AsgTool.h" -#include "AthAsgExUnittest/IMyPackageTool.h" +#include "IMyPackageTool.h" class MyPackageTool: public asg::AsgTool, public virtual IMyPackageTool { public: diff --git a/Control/AthenaExamples/AthAsgExUnittest/src/components/AthAsgExUnittest_entries.cxx b/Control/AthenaExamples/AthAsgExUnittest/src/components/AthAsgExUnittest_entries.cxx index 95117f80988fe24ecc7001dd81259b9f457897df..ef5eb1e88d28c2273a95c33b751286b122b17992 100644 --- a/Control/AthenaExamples/AthAsgExUnittest/src/components/AthAsgExUnittest_entries.cxx +++ b/Control/AthenaExamples/AthAsgExUnittest/src/components/AthAsgExUnittest_entries.cxx @@ -3,6 +3,6 @@ DECLARE_COMPONENT( MyPackageAlg ) -#include "AthAsgExUnittest/MyPackageTool.h" +#include "../MyPackageTool.h" DECLARE_COMPONENT( MyPackageTool ) diff --git a/Control/AthenaExamples/AthAsgExUnittest/test/gt_AthAsgExUnittest.cxx b/Control/AthenaExamples/AthAsgExUnittest/test/gt_AthAsgExUnittest.cxx index 7f01f18764d2e6b945752fbbfbe700b978499784..d0de4e2dff099bef22ed6f8c9e7bd5cbdbb0392c 100644 --- a/Control/AthenaExamples/AthAsgExUnittest/test/gt_AthAsgExUnittest.cxx +++ b/Control/AthenaExamples/AthAsgExUnittest/test/gt_AthAsgExUnittest.cxx @@ -12,9 +12,9 @@ #include "AsgTools/AnaToolHandle.h" #include "AthAnalysisBaseComps/AthAnalysisHelper.h" -#include "../AthAsgExUnittest/IMyPackageTool.h" +#include "../src/IMyPackageTool.h" -#include "../AthAsgExUnittest/MyPackageTool.h" +#include "../src/MyPackageTool.h" #include "../src/MyPackageAlg.h" #include <iostream> diff --git a/Control/AthenaExamples/AthAsgExUnittest/test/gt_AthExUnittest.cxx b/Control/AthenaExamples/AthAsgExUnittest/test/gt_AthExUnittest.cxx index 142156a288defae4d93b05ebf6107bd64c0213d8..37a3af4ee3f626abb9a2bce800b66586ca7750d0 100644 --- a/Control/AthenaExamples/AthAsgExUnittest/test/gt_AthExUnittest.cxx +++ b/Control/AthenaExamples/AthAsgExUnittest/test/gt_AthExUnittest.cxx @@ -12,7 +12,7 @@ #include "AthenaBaseComps/AthAlgorithm.h" #include "AthenaBaseComps/AthService.h" -#include "../AthAsgExUnittest/IMyPackageTool.h" +#include "../src/IMyPackageTool.h" #include <string> #include <iostream> diff --git a/Control/AthenaExamples/AthExFortranAlgorithm/AthExFortranAlgorithm/config.h.in b/Control/AthenaExamples/AthExFortranAlgorithm/AthExFortranAlgorithm/config.h.in deleted file mode 100755 index 61025bcef7b500b4018a9c3b79cc0ab745248ffa..0000000000000000000000000000000000000000 --- a/Control/AthenaExamples/AthExFortranAlgorithm/AthExFortranAlgorithm/config.h.in +++ /dev/null @@ -1 +0,0 @@ -/* config.h.in. Generated automatically from configure.in by autoheader. */ diff --git a/Control/AthenaExamples/AthExFortranAlgorithm/CMakeLists.txt b/Control/AthenaExamples/AthExFortranAlgorithm/CMakeLists.txt index 0f53e07a7a873724863f4831314fef9b218eabee..a613c492db04dadafb5812919b74d22219beccb6 100644 --- a/Control/AthenaExamples/AthExFortranAlgorithm/CMakeLists.txt +++ b/Control/AthenaExamples/AthExFortranAlgorithm/CMakeLists.txt @@ -1,16 +1,8 @@ -################################################################################ -# Package: AthExFortranAlgorithm -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( AthExFortranAlgorithm ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Control/AthenaBaseComps - PRIVATE - GaudiKernel ) - # Component(s) in the package: atlas_add_component( AthExFortranAlgorithm src/*.cxx @@ -19,8 +11,6 @@ atlas_add_component( AthExFortranAlgorithm LINK_LIBRARIES AthenaBaseComps GaudiKernel ) # Install files from the package: -atlas_install_headers( AthExFortranAlgorithm ) -atlas_install_joboptions( share/FortranAlgorithmOptions.txt share/FortranAlgorithmOptions.py ) +atlas_install_joboptions( share/FortranAlgorithmOptions.py ) atlas_install_runtime( share/FortranAlgorithmInput.data ) atlas_install_scripts( share/preFortAlgEx.sh ) - diff --git a/Control/AthenaExamples/AthExFortranAlgorithm/share/FortranAlgorithmOptions.txt b/Control/AthenaExamples/AthExFortranAlgorithm/share/FortranAlgorithmOptions.txt deleted file mode 100755 index 6d81dd2fa1564681f31bb543fa3b64cde080cd06..0000000000000000000000000000000000000000 --- a/Control/AthenaExamples/AthExFortranAlgorithm/share/FortranAlgorithmOptions.txt +++ /dev/null @@ -1,57 +0,0 @@ -//############################################################## -// -// Job options file -// -//============================================================== - -//no EventSelector -ApplicationMgr.DLLs += { "AthenaServices" }; -ApplicationMgr.EventLoop = "AthenaEventLoopMgr"; -//-------------------------------------------------------------- -// StoreGate services configuration -//-------------------------------------------------------------- -#include "StoreGate/StoreGate_jobOptions.txt" - -ApplicationMgr.ExtSvc += { "EvtPersistencySvc/EventPersistencySvc", - "HistogramSvc/HistogramDataSvc" - }; -//-------------------------------------------------------------- -// Private Application Configuration options -//-------------------------------------------------------------- - -//load relevant libraries -ApplicationMgr.DLLs += { "AthExFortranAlgorithm" }; - -//top algorithms to be run -ApplicationMgr.TopAlg = { "FortranAlgorithm" }; - -//-------------------------------------------------------------- -// Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL ) -//-------------------------------------------------------------- - -MessageSvc.OutputLevel = 2; -MessageSvc.useColors = true; - -//-------------------------------------------------------------- -// Event related parameters -//-------------------------------------------------------------- - -// dummy event loop -ApplicationMgr.EvtSel = "NONE"; -// Number of events to be processed (default is 10) -ApplicationMgr.EvtMax = 1; - -//-------------------------------------------------------------- -// Algorithms Private Options -//-------------------------------------------------------------- - -// For the FortranAlgorithm algorithm -FortranAlgorithm.LUN = 42; -FortranAlgorithm.fileName = "FortranAlgorithmInput.data"; - -//============================================================== -// -// End of job options file -// -//############################################################## - diff --git a/Control/AthenaExamples/AthExFortranAlgorithm/src/FortranAlgorithm.cxx b/Control/AthenaExamples/AthExFortranAlgorithm/src/FortranAlgorithm.cxx index 70fe0e0cd6db2630c99685f301a0833586ff0754..85584df4eceb470d162a6bfae31b35e43f8474e2 100755 --- a/Control/AthenaExamples/AthExFortranAlgorithm/src/FortranAlgorithm.cxx +++ b/Control/AthenaExamples/AthExFortranAlgorithm/src/FortranAlgorithm.cxx @@ -2,7 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "AthExFortranAlgorithm/FortranAlgorithm.h" +#include "FortranAlgorithm.h" extern "C" { void initialize_(const int& lun, const char*, int); diff --git a/Control/AthenaExamples/AthExFortranAlgorithm/AthExFortranAlgorithm/FortranAlgorithm.h b/Control/AthenaExamples/AthExFortranAlgorithm/src/FortranAlgorithm.h similarity index 100% rename from Control/AthenaExamples/AthExFortranAlgorithm/AthExFortranAlgorithm/FortranAlgorithm.h rename to Control/AthenaExamples/AthExFortranAlgorithm/src/FortranAlgorithm.h diff --git a/Control/AthenaExamples/AthExFortranAlgorithm/src/components/FortranAlgorithm_entries.cxx b/Control/AthenaExamples/AthExFortranAlgorithm/src/components/FortranAlgorithm_entries.cxx index 79f2167acf60da3c21029899bb356b9d74708817..46a80de068fc5f6752d50f2fef1804894efc9c0a 100644 --- a/Control/AthenaExamples/AthExFortranAlgorithm/src/components/FortranAlgorithm_entries.cxx +++ b/Control/AthenaExamples/AthExFortranAlgorithm/src/components/FortranAlgorithm_entries.cxx @@ -1,4 +1,4 @@ -#include "AthExFortranAlgorithm/FortranAlgorithm.h" +#include "../FortranAlgorithm.h" DECLARE_COMPONENT( FortranAlgorithm ) diff --git a/Control/AthenaExamples/AthExHelloWorld/CMakeLists.txt b/Control/AthenaExamples/AthExHelloWorld/CMakeLists.txt index dbd0e1826a7467a1f7637dd7d73057778f41d1dd..e5663de19125a4e3e9e63d2542d94add98856fbe 100644 --- a/Control/AthenaExamples/AthExHelloWorld/CMakeLists.txt +++ b/Control/AthenaExamples/AthExHelloWorld/CMakeLists.txt @@ -1,17 +1,8 @@ -################################################################################ -# Package: AthExHelloWorld -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( AthExHelloWorld ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - GaudiKernel - PRIVATE - Control/AthenaBaseComps - Control/AthenaConfiguration ) - # Component(s) in the package: atlas_add_component( AthExHelloWorld src/*.cxx @@ -19,25 +10,25 @@ atlas_add_component( AthExHelloWorld LINK_LIBRARIES GaudiKernel AthenaBaseComps ) # Install files from the package: -atlas_install_headers( AthExHelloWorld ) atlas_install_joboptions( share/*.py ) atlas_install_python_modules( python/HelloWorldConfig.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) +# Test(s) in the package: atlas_add_test( AthExHelloWorld - ENVIRONMENT THREADS=0 - SCRIPT test/test_AthExHelloWorld.sh - ) + ENVIRONMENT THREADS=0 + SCRIPT test/test_AthExHelloWorld.sh ) atlas_add_test( AthExHelloWorldMT_1 - ENVIRONMENT THREADS=1 - SCRIPT test/test_AthExHelloWorld.sh - ) + ENVIRONMENT THREADS=1 + SCRIPT test/test_AthExHelloWorld.sh ) atlas_add_test( AthExHelloWorldMT_2 - ENVIRONMENT THREADS=2 - SCRIPT test/test_AthExHelloWorld.sh - LOG_IGNORE_PATTERN "AthenaHiveEventLoopMgr.* processing event|^HelloWorld .*(INFO|WARNING A WARNING|ERROR An ERROR|FATAL A FATAL)|my message to the world" #processing order can change - ) - -atlas_add_test( AthExHelloWorld_CfgTest SCRIPT python -m AthExHelloWorld.HelloWorldConfig POST_EXEC_SCRIPT nopost.sh ) + ENVIRONMENT THREADS=2 + SCRIPT test/test_AthExHelloWorld.sh + LOG_IGNORE_PATTERN "AthenaHiveEventLoopMgr.* processing event|^HelloWorld .*(INFO|WARNING A WARNING|ERROR An ERROR|FATAL A FATAL)|my message to the world" #processing order can change + ) + +atlas_add_test( AthExHelloWorld_CfgTest + SCRIPT python -m AthExHelloWorld.HelloWorldConfig + POST_EXEC_SCRIPT nopost.sh ) diff --git a/Control/AthenaExamples/AthExHistNtup/CMakeLists.txt b/Control/AthenaExamples/AthExHistNtup/CMakeLists.txt index a36347ca4948964739b93b01ca5a695aa428abad..daf3ff1524b4d213c463437d953a1c9de5626adb 100644 --- a/Control/AthenaExamples/AthExHistNtup/CMakeLists.txt +++ b/Control/AthenaExamples/AthExHistNtup/CMakeLists.txt @@ -1,16 +1,8 @@ -################################################################################ -# Package: AthExHistNtup -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( AthExHistNtup ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PRIVATE - Control/AthenaBaseComps - Event/xAOD/xAODEventInfo - GaudiKernel ) - # External dependencies: find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) @@ -22,5 +14,4 @@ atlas_add_component( AthExHistNtup LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps xAODEventInfo GaudiKernel ) # Install files from the package: -atlas_install_joboptions( share/HistNtupOptions.txt share/HistNtupOptions.py ) - +atlas_install_joboptions( share/HistNtupOptions.py ) diff --git a/Control/AthenaExamples/AthExHistNtup/share/HistNtupOptions.txt b/Control/AthenaExamples/AthExHistNtup/share/HistNtupOptions.txt deleted file mode 100755 index b65951289491d3069760b0ee4b14264cc67d66e2..0000000000000000000000000000000000000000 --- a/Control/AthenaExamples/AthExHistNtup/share/HistNtupOptions.txt +++ /dev/null @@ -1,81 +0,0 @@ -//############################################################## -// -// Job options file -// -//============================================================== - -#include "AthenaCommon/Atlas_ZebraTDR.UnixStandardJob.txt" - -// For ddcnvsvc -#include "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.txt" -#include"InDetMgrDetDescrCnv/InDetMgrDetDescrCnv_joboptions.txt" -#include "LArDetMgrDetDescrCnv/LArDetMgrDetDescrCnv_joboptions.txt" -//FIXME #include "TileDetMgrDetDescrCnv/TileDetMgrDetDescrCnv_joboptions.txt" -#include "MuonDetMgrDetDescrCnv/MuonDetMgrDetDescrCnv_joboptions.txt" - -// Turn on the reading of the dictionary -DetDescrCnvSvc.DecodeIdDict = true; - -//-------------------------------------------------------------- -// Private Application Configuration options -//-------------------------------------------------------------- -//load relevant libraries -ApplicationMgr.DLLs += { "AthExHistNtup" }; - -// Select the appropriate shared library -ApplicationMgr.DLLs += { "HbookCnv" }; -////ApplicationMgr.DLLs += { "RootHistCnv" }; - -// Select HBOOK or ROOT persistency (HBOOK is default) -ApplicationMgr.HistogramPersistency = "HBOOK"; - -ApplicationMgr.TopAlg = { "Hist" }; -ApplicationMgr.TopAlg += { "Ntup" }; - -//-------------------------------------------------------------- -// For Zebra input: identify your input runs. -//-------------------------------------------------------------- - -// Provide a first/last range or a list -//EventSelector.runs = {1, 100000}; -EventSelector.firstRun = 1; -EventSelector.lastRun = 100000; -//-------------------------------------------------------------- -// Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL ) -//-------------------------------------------------------------- - -Hist.OutputLevel = 2; -Ntup.OutputLevel = 2; -MessageSvc.useColors = true; - -//-------------------------------------------------------------- -// Histogram output file -//-------------------------------------------------------------- - -// Specify the appropriate output file type -HistogramPersistencySvc.OutputFile = "histo.hbook"; -//HistogramPersistencySvc.OutputFile = "histo.rt"; - -//-------------------------------------------------------------- -// Ntuples -//-------------------------------------------------------------- - -NTupleSvc.Output = { "FILE1 DATAFILE='tuple1.hbook' OPT='NEW'" }; - -//-------------------------------------------------------------- -// Event related parameters -//-------------------------------------------------------------- - -// Number of events to be processed (default is 10) -ApplicationMgr.EvtMax = 10; - -//-------------------------------------------------------------- -// Algorithms Private Options -//-------------------------------------------------------------- - -//============================================================== -// -// End of job options file -// -//############################################################## - diff --git a/Control/AthenaExamples/AthExHive/CMakeLists.txt b/Control/AthenaExamples/AthExHive/CMakeLists.txt index 36e4966543212d6b39add94051ee20de2b3c619e..07fd1441b11401c304a0b0fa0b8f18fec2c5eb04 100644 --- a/Control/AthenaExamples/AthExHive/CMakeLists.txt +++ b/Control/AthenaExamples/AthExHive/CMakeLists.txt @@ -1,38 +1,30 @@ -################################################################################ -# Package: AthExHive -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( AthExHive ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Control/AthenaKernel - PRIVATE - Control/AthenaBaseComps - Control/CxxUtils - Control/StoreGate - Event/xAOD/xAODEventInfo - GaudiKernel ) +# External dependencies: +find_package( Boost ) +# Component(s) in the package: atlas_add_library( AthExHiveLib AthExHive/*.h INTERFACE PUBLIC_HEADERS AthExHive LINK_LIBRARIES AthenaKernel GaudiKernel) -# Component(s) in the package: atlas_add_component( AthExHive src/*.cxx src/condEx/*.cxx src/loopTest/*.cxx src/components/*.cxx - LINK_LIBRARIES AthenaKernel AthenaBaseComps xAODEventInfo AthExHiveLib ) + LINK_LIBRARIES AthenaKernel AthenaBaseComps StoreGateLib xAODEventInfo AthExHiveLib ) # Install files from the package: atlas_install_joboptions( share/*.py ) atlas_install_runtime( share/condDb.txt ) +# Tests in the package: atlas_add_test ( AthExHive_test SCRIPT test/AthExHive_test.sh PROPERTIES TIMEOUT 300 diff --git a/Control/AthenaExamples/AthExJobOptions/CMakeLists.txt b/Control/AthenaExamples/AthExJobOptions/CMakeLists.txt index c4c11a9058091c4caca280e68527f66478e9b5c0..18a1048dae4de9ed9d6f05a25852f57409b34b98 100644 --- a/Control/AthenaExamples/AthExJobOptions/CMakeLists.txt +++ b/Control/AthenaExamples/AthExJobOptions/CMakeLists.txt @@ -1,20 +1,8 @@ -################################################################################ -# Package: AthExJobOptions -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( AthExJobOptions ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Control/AthenaBaseComps - Control/AthenaKernel - GaudiKernel - PRIVATE - AtlasTest/TestTools - Control/StoreGate - Event/EventInfo ) - # Component(s) in the package: atlas_add_component( AthExJobOptions src/*.cxx @@ -22,9 +10,7 @@ atlas_add_component( AthExJobOptions LINK_LIBRARIES AthenaBaseComps AthenaKernel GaudiKernel StoreGateLib SGtests EventInfo ) # Install files from the package: -atlas_install_headers( AthExJobOptions ) -atlas_install_python_modules( python/*.py - POST_BUILD_CMD ${ATLAS_FLAKE8} ) +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) atlas_install_joboptions( share/*.py ) # Tests in this package: diff --git a/Control/AthenaExamples/AthExMonitored/CMakeLists.txt b/Control/AthenaExamples/AthExMonitored/CMakeLists.txt index 9e81614b6749b54261dbe0c4eac6ce6e043d2f70..fdb8f84aee74b7d98573fe47c4af132a59614bb3 100644 --- a/Control/AthenaExamples/AthExMonitored/CMakeLists.txt +++ b/Control/AthenaExamples/AthExMonitored/CMakeLists.txt @@ -1,17 +1,8 @@ -################################################################################ -# Package: AthExMonitored -################################################################################ +# Copyright (C) 20022020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( AthExMonitored ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - GaudiKernel - PRIVATE - Control/AthenaBaseComps - Control/AthenaMonitoringKernel ) - # Component(s) in the package: atlas_add_component( AthExMonitored src/*.cxx @@ -20,4 +11,4 @@ atlas_add_component( AthExMonitored # Install files from the package: atlas_install_joboptions( share/*.py ) -atlas_install_python_modules( python/*.py ) +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) diff --git a/Control/AthenaExamples/AthExRunExamples/CMakeLists.txt b/Control/AthenaExamples/AthExRunExamples/CMakeLists.txt deleted file mode 100644 index ea0cc987cdf33315acb06715d4419cd905b837a8..0000000000000000000000000000000000000000 --- a/Control/AthenaExamples/AthExRunExamples/CMakeLists.txt +++ /dev/null @@ -1,16 +0,0 @@ -################################################################################ -# Package: AthExRunExamples -################################################################################ - -# Declare the package name: -atlas_subdir( AthExRunExamples ) - -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Control/AthenaExamples/AthExFortranAlgorithm - Control/AthenaExamples/AthExHelloWorld - Control/AthenaExamples/AthExHistNtup - Control/AthenaExamples/AthExStoreGateExample - Control/AthenaExamples/ToyConversion - Control/MinimalRunTime ) - diff --git a/Control/AthenaExamples/AthExRunHelloWorld/CMakeLists.txt b/Control/AthenaExamples/AthExRunHelloWorld/CMakeLists.txt deleted file mode 100644 index 912845c46ffb452d9ff82206af5af8c4ebf5547a..0000000000000000000000000000000000000000 --- a/Control/AthenaExamples/AthExRunHelloWorld/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -################################################################################ -# Package: AthExRunHelloWorld -################################################################################ - -# Declare the package name: -atlas_subdir( AthExRunHelloWorld ) - -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Control/AthenaExamples/AthExHelloWorld - Control/MinimalRunTime ) - diff --git a/Control/AthenaExamples/AthExStoreGateExample/CMakeLists.txt b/Control/AthenaExamples/AthExStoreGateExample/CMakeLists.txt index 392daf9e3bb4acc4dcfcb0fd6b31babb63494bcd..9cdec175534b6bd79c46b31366e1a9a2066fda2b 100644 --- a/Control/AthenaExamples/AthExStoreGateExample/CMakeLists.txt +++ b/Control/AthenaExamples/AthExStoreGateExample/CMakeLists.txt @@ -1,63 +1,35 @@ -################################################################################ -# Package: AthExStoreGateExample -################################################################################ +# Copyright (C) 20022020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( AthExStoreGateExample ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Control/AthenaKernel - Control/SGTools - PRIVATE - AtlasTest/TestTools - Control/AthContainers - Control/AthLinks - Control/AthenaBaseComps - Control/CxxUtils - Control/PileUpTools - Control/StoreGate - Event/EventInfo - Event/xAOD/xAODEventInfo - GaudiKernel ) - -# External dependencies: -find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) - # Component(s) in the package: atlas_add_library( SGTutorialLib Tutorial/LinkObj.cxx Tutorial/SGRead.cxx Tutorial/SGWrite.cxx PUBLIC_HEADERS AthExStoreGateExample - PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES AthenaKernel SGTools PileUpToolsLib StoreGateLib SGtests - PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} TestTools AthContainers AthLinks AthenaBaseComps CxxUtils EventInfo xAODEventInfo GaudiKernel ) + LINK_LIBRARIES AthenaBaseComps AthenaKernel GaudiKernel StoreGateLib + PRIVATE_LINK_LIBRARIES AthLinks ) -atlas_add_library( SGTutorial - Tutorial/SGTutorial_entries.cxx - PUBLIC_HEADERS AthExStoreGateExample - PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES AthenaKernel SGTools PileUpToolsLib StoreGateLib SGtests SGTutorialLib - PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} TestTools AthContainers AthLinks AthenaBaseComps CxxUtils EventInfo xAODEventInfo GaudiKernel ) +atlas_add_component( SGTutorial + Tutorial/SGTutorial_entries.cxx + LINK_LIBRARIES SGTutorialLib ) atlas_add_component( AthExStoreGateExample src/*.cxx src/components/*.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES SGTutorialLib ) + LINK_LIBRARIES AthContainers AthLinks AthenaBaseComps EventInfo PileUpToolsLib SGTools SGTutorialLib TestTools ) atlas_add_component( AthExDFlow src_dflow/*.cxx src_dflow/components/*.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES SGTutorialLib ) + LINK_LIBRARIES AthenaBaseComps GaudiKernel SGTools StoreGateLib xAODEventInfo ) atlas_add_dictionary( AthExStoreGateExampleDict AthExStoreGateExample/AthExStoreGateExampleDict.h AthExStoreGateExample/selection.xml - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaKernel SGTools TestTools AthContainers AthLinks AthenaBaseComps CxxUtils PileUpToolsLib StoreGateLib SGtests EventInfo xAODEventInfo GaudiKernel SGTutorialLib SGTutorial ) + LINK_LIBRARIES SGTutorialLib ) # Install files from the package: atlas_install_joboptions( share/StoreGateExample_Gen_jobOptions.txt share/StoreGateExample_Gen_jobOptions.py share/StoreGateExample_Del_jobOptions.py share/StoreGateExample_Reentrant_jobOptions.py share/dflow_jobo.py share/StoreGateHiveExample.py share/HandleTest_jobOptions.py ) diff --git a/Control/AthenaExamples/AthExThinning/CMakeLists.txt b/Control/AthenaExamples/AthExThinning/CMakeLists.txt index d9772fad11e3e81853506f673268f051a46fccf2..23b8c785e64109549caeed3b350b99a14a04949a 100644 --- a/Control/AthenaExamples/AthExThinning/CMakeLists.txt +++ b/Control/AthenaExamples/AthExThinning/CMakeLists.txt @@ -1,29 +1,8 @@ -################################################################################ -# Package: AthExThinning -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( AthExThinning ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Control/AthContainers - Control/AthLinks - Control/AthenaBaseComps - Control/AthenaKernel - Control/AthenaPython - Control/AthenaServices - Control/DataModelAthenaPool - Database/AthenaPOOL/AthenaPoolUtilities - GaudiKernel - PRIVATE - Control/StoreGate - Database/AthenaPOOL/AthenaPoolCnvSvc ) - -# External dependencies: -find_package( CLHEP ) -find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) - # Component(s) in the package: atlas_add_library( AthExThinningEvent src_lib/AthExIParticle.cxx @@ -38,31 +17,25 @@ atlas_add_library( AthExThinningEvent src_lib/AthExParticles_p1.cxx src_lib/AthExFatObject_p1.cxx PUBLIC_HEADERS AthExThinning - PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES AthContainers AthLinks AthenaBaseComps AthenaKernel AthenaPoolUtilities GaudiKernel DataModelAthenaPoolLib StoreGateLib SGtests AthenaPoolCnvSvcLib - PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} ) + LINK_LIBRARIES AthContainers AthLinks AthenaBaseComps AthenaKernel DataModelAthenaPoolLib GaudiKernel StoreGateLib ) atlas_add_component( AthExThinningAlgs src_lib/CreateData.cxx src_lib/WriteThinnedData.cxx src_lib/ReadThinnedData.cxx src_lib/components/*.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthContainers AthLinks AthenaBaseComps AthenaKernel DataModelAthenaPoolLib AthenaPoolUtilities GaudiKernel StoreGateLib SGtests AthenaPoolCnvSvcLib AthExThinningEvent ) + LINK_LIBRARIES AthExThinningEvent ) atlas_add_poolcnv_library( AthExThinningPoolCnv src/*.cxx FILES AthExThinning/AthExParticles.h AthExThinning/AthExIParticles.h AthExThinning/AthExDecay.h AthExThinning/AthExElephantino.h AthExThinning/AthExFatObject.h - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthContainers AthLinks AthenaBaseComps AthenaKernel DataModelAthenaPoolLib AthenaPoolUtilities GaudiKernel StoreGateLib SGtests AthenaPoolCnvSvcLib AthExThinningEvent ) + LINK_LIBRARIES AthExThinningEvent AthenaPoolCnvSvcLib ) atlas_add_dictionary( AthExThinningEventDict AthExThinning/AthExThinningEventDict.h AthExThinning/selection.xml - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthContainers AthLinks AthenaBaseComps AthenaKernel DataModelAthenaPoolLib AthenaPoolUtilities GaudiKernel StoreGateLib SGtests AthenaPoolCnvSvcLib AthExThinningEvent - ELEMENT_LINKS AthExParticles AthExIParticles ) + LINK_LIBRARIES AthExThinningEvent + ELEMENT_LINKS AthExParticles AthExIParticles ) # Install files from the package: atlas_install_python_modules( python/*.py diff --git a/Control/AthenaExamples/AthExThinning/src_lib/CreateData.cxx b/Control/AthenaExamples/AthExThinning/src_lib/CreateData.cxx index ca46b7f5cb5b50f0c04ed123e443382b4abef7f7..dc888c9f957b9b7ff92ad561959ac7b3be36048a 100644 --- a/Control/AthenaExamples/AthExThinning/src_lib/CreateData.cxx +++ b/Control/AthenaExamples/AthExThinning/src_lib/CreateData.cxx @@ -1,7 +1,7 @@ ///////////////////////// -*- C++ -*- ///////////////////////////// /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // CreateData.cxx @@ -14,9 +14,7 @@ // FrameWork includes #include "GaudiKernel/Property.h" - -// CLHEP -#include "CLHEP/Units/SystemOfUnits.h" +#include "GaudiKernel/SystemOfUnits.h" // StoreGate #include "StoreGate/StoreGateSvc.h" @@ -133,10 +131,10 @@ StatusCode CreateData::makeData( const std::string& test ) } for ( unsigned int i = 0; i != m_nbrParticles.value(); ++i ) { - AthExParticle * p = new AthExParticle( (i+1) * 10. * CLHEP::GeV, - (i+1) * 10. * CLHEP::GeV, - (i+1) * 10. * CLHEP::GeV, - (i+2) * 10. * CLHEP::GeV ); + AthExParticle * p = new AthExParticle( (i+1) * 10. * Gaudi::Units::GeV, + (i+1) * 10. * Gaudi::Units::GeV, + (i+1) * 10. * Gaudi::Units::GeV, + (i+2) * 10. * Gaudi::Units::GeV ); particles->push_back(p); } @@ -174,7 +172,7 @@ StatusCode CreateData::makeData( const std::string& test ) dcy->setDecay( p1, p2, l1, l2 ); - const double igev = 1. / CLHEP::GeV; + const double igev = 1. / Gaudi::Units::GeV; ATH_MSG_INFO ("Created a Decay from :" << endmsg << " p1: px= " << dcy->p1()->px() * igev << endmsg diff --git a/Control/AthenaExamples/AthExThinning/src_lib/ReadThinnedData.cxx b/Control/AthenaExamples/AthExThinning/src_lib/ReadThinnedData.cxx index 2910d8f7045dcacfb3574136ffbce966961e9630..041cd35a1593b3ae4177cc37d3df23cbcc711736 100644 --- a/Control/AthenaExamples/AthExThinning/src_lib/ReadThinnedData.cxx +++ b/Control/AthenaExamples/AthExThinning/src_lib/ReadThinnedData.cxx @@ -1,7 +1,7 @@ ///////////////////////// -*- C++ -*- ///////////////////////////// /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // ReadThinnedData.cxx @@ -15,13 +15,11 @@ // FrameWork includes #include "GaudiKernel/MsgStream.h" #include "GaudiKernel/Property.h" +#include "GaudiKernel/SystemOfUnits.h" // StoreGate #include "StoreGate/StoreGateSvc.h" -// CLHEP includes -#include "CLHEP/Units/SystemOfUnits.h" - // AthExThinning includes #include "AthExThinning/AthExParticles.h" #include "AthExThinning/AthExDecay.h" @@ -150,7 +148,7 @@ StatusCode ReadThinnedData::checkTest( const std::string& testName ) return StatusCode::RECOVERABLE; } - const double igev = 1. / CLHEP::GeV; + const double igev = 1. / Gaudi::Units::GeV; ATH_MSG_DEBUG ("IN particles: " << particles->size() << endmsg << "IN iparticles: " << iparticles->size() << endmsg diff --git a/Control/AthenaExamples/AthExThinning/src_lib/WriteThinnedData.cxx b/Control/AthenaExamples/AthExThinning/src_lib/WriteThinnedData.cxx index 4b87c15154e622c3808e9bff760a040f8f084606..fd310189da9dd485893c179befbbeb500eeced74 100644 --- a/Control/AthenaExamples/AthExThinning/src_lib/WriteThinnedData.cxx +++ b/Control/AthenaExamples/AthExThinning/src_lib/WriteThinnedData.cxx @@ -1,7 +1,7 @@ ///////////////////////// -*- C++ -*- ///////////////////////////// /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // WriteThinnedData.cxx @@ -16,9 +16,7 @@ // FrameWork includes #include "GaudiKernel/Property.h" - -// CLHEP -#include "CLHEP/Units/SystemOfUnits.h" +#include "GaudiKernel/SystemOfUnits.h" // StoreGate #include "StoreGate/StoreGateSvc.h" @@ -160,7 +158,7 @@ StatusCode WriteThinnedData::test( const EventContext& ctx, // fetch Elephantino SG::ReadHandle<AthExElephantino> elephantino (m_elephantinoKeys[testNum], ctx); - const double igev = 1. / CLHEP::GeV; + const double igev = 1. / Gaudi::Units::GeV; ATH_MSG_DEBUG("IN particles: " << particles->size() << endmsg << "IN decay: " << endmsg << " p1: px= " << decay->p1()->px() * igev << endmsg @@ -224,7 +222,7 @@ StatusCode WriteThinnedData::doThinningTest1( const EventContext& ctx, SG::ThinningHandle<AthExParticles> particles (particlesKey, ctx); std::vector<bool> filter = m_filter.value(); - const double igev = 1. / CLHEP::GeV; + const double igev = 1. / Gaudi::Units::GeV; msg(MSG::INFO) << "Particles | filter :" << endmsg; for ( unsigned int i = 0; i != particles->size(); ++i ) { const std::string kr = filter[i] ? "keep" : "remove"; @@ -303,7 +301,7 @@ StatusCode WriteThinnedData::doThinningTest2( const EventContext& ctx, SG::ThinningHandle<AthExParticles> particles (particlesKey, ctx); std::vector<bool> filter = m_filter.value(); - const double igev = 1. / CLHEP::GeV; + const double igev = 1. / Gaudi::Units::GeV; msg(MSG::INFO) << "Particles | filter :" << endmsg; for ( unsigned int i = 0; i != particles->size(); ++i ) { const std::string kr = filter[i] ? "keep" : "remove"; @@ -383,7 +381,7 @@ WriteThinnedData::doThinningTest3( const EventContext& ctx, SG::ThinningHandle<AthExIParticles> iparticles (iparticlesKey, ctx); std::vector<bool> filter = m_filter.value(); - const double igev = 1. / CLHEP::GeV; + const double igev = 1. / Gaudi::Units::GeV; msg(MSG::INFO) << "IParticles | filter :" << endmsg; for ( unsigned int i = 0; i != iparticles->size(); ++i ) { const std::string kr = filter[i] ? "keep" : "remove"; diff --git a/Control/AthenaExamples/AthExUnittest/CMakeLists.txt b/Control/AthenaExamples/AthExUnittest/CMakeLists.txt index 17e031707b6333b6eca12ec90d4c8d2c2234d329..f6961cf34b356be27279388eab439e27f5ff0c3a 100644 --- a/Control/AthenaExamples/AthExUnittest/CMakeLists.txt +++ b/Control/AthenaExamples/AthExUnittest/CMakeLists.txt @@ -1,22 +1,8 @@ - -# -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -# - -################################################################################ -# Package: MyPackage -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( AthExUnittest ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - GaudiKernel - PRIVATE - Control/AthenaBaseComps - AtlasTest/GoogleTestTools ) - # The component lib: atlas_add_component( AthExUnittest AthExUnittest/*.h src/*.cxx @@ -28,5 +14,3 @@ atlas_add_component( AthExUnittest atlas_add_test( gt_AthExUnittest SOURCES test/gt_AthExUnittest.cxx LINK_LIBRARIES GaudiKernel GoogleTestTools AthenaBaseComps ) - - diff --git a/Control/AthenaExamples/MultiInputExample/CMakeLists.txt b/Control/AthenaExamples/MultiInputExample/CMakeLists.txt index b128b6b1751901f10608a98abc6f1d871db1f653..e81a67699c0170fc3b489290d91df91f16f18a7c 100644 --- a/Control/AthenaExamples/MultiInputExample/CMakeLists.txt +++ b/Control/AthenaExamples/MultiInputExample/CMakeLists.txt @@ -1,27 +1,13 @@ -################################################################################ -# Package: MultiInputExample -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( MultiInputExample ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Control/AthenaBaseComps - GaudiKernel - PRIVATE - Control/PileUpTools - Control/StoreGate - Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleData - Event/EventInfo ) - # Component(s) in the package: atlas_add_component( MultiInputExample src/*.cxx src/components/*.cxx - LINK_LIBRARIES AthenaBaseComps GaudiKernel PileUpToolsLib StoreGateLib SGtests AthenaPoolExampleData EventInfo ) + LINK_LIBRARIES AthenaBaseComps AthenaPoolExampleData EventInfo GaudiKernel PileUpToolsLib ) # Install files from the package: -atlas_install_headers( MultiInputExample ) atlas_install_joboptions( share/MultiInputInit.py ) - diff --git a/Control/AthenaExamples/MultiInputExample/src/MyAlg.cxx b/Control/AthenaExamples/MultiInputExample/src/MyAlg.cxx index 157ff28157ea49605fbb22ee189846336f2aa8bd..08516518720e4b412601c7cb1ee76dbd09a2eede 100644 --- a/Control/AthenaExamples/MultiInputExample/src/MyAlg.cxx +++ b/Control/AthenaExamples/MultiInputExample/src/MyAlg.cxx @@ -2,7 +2,7 @@ Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ -#include "MultiInputExample/MyAlg.h" +#include "MyAlg.h" #include "GaudiKernel/MsgStream.h" #include "PileUpTools/PileUpMergeSvc.h" diff --git a/Control/AthenaExamples/MultiInputExample/MultiInputExample/MyAlg.h b/Control/AthenaExamples/MultiInputExample/src/MyAlg.h similarity index 100% rename from Control/AthenaExamples/MultiInputExample/MultiInputExample/MyAlg.h rename to Control/AthenaExamples/MultiInputExample/src/MyAlg.h diff --git a/Control/AthenaExamples/MultiInputExample/src/MyMultiInputAlg.cxx b/Control/AthenaExamples/MultiInputExample/src/MyMultiInputAlg.cxx index 3d26b089e0588debb8e35f85dd4b6a2008e7a924..4d5a7ec94d29a4ea4071bffb52905876320312bf 100644 --- a/Control/AthenaExamples/MultiInputExample/src/MyMultiInputAlg.cxx +++ b/Control/AthenaExamples/MultiInputExample/src/MyMultiInputAlg.cxx @@ -2,7 +2,7 @@ Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ -#include "MultiInputExample/MyMultiInputAlg.h" +#include "MyMultiInputAlg.h" #include "GaudiKernel/MsgStream.h" #include "PileUpTools/PileUpMergeSvc.h" diff --git a/Control/AthenaExamples/MultiInputExample/MultiInputExample/MyMultiInputAlg.h b/Control/AthenaExamples/MultiInputExample/src/MyMultiInputAlg.h similarity index 100% rename from Control/AthenaExamples/MultiInputExample/MultiInputExample/MyMultiInputAlg.h rename to Control/AthenaExamples/MultiInputExample/src/MyMultiInputAlg.h diff --git a/Control/AthenaExamples/MultiInputExample/src/components/MultiInputExample_entries.cxx b/Control/AthenaExamples/MultiInputExample/src/components/MultiInputExample_entries.cxx index a5f5eecb394179c35c485b1ebaa71cfeb99d0f25..d6a5ea0486c19018875fc1956fc73d939f2165ac 100644 --- a/Control/AthenaExamples/MultiInputExample/src/components/MultiInputExample_entries.cxx +++ b/Control/AthenaExamples/MultiInputExample/src/components/MultiInputExample_entries.cxx @@ -1,4 +1,4 @@ -#include "MultiInputExample/MyMultiInputAlg.h" +#include "../MyMultiInputAlg.h" DECLARE_COMPONENT( MyMultiInputAlg ) diff --git a/Control/AthenaExamples/ToyConversion/CMakeLists.txt b/Control/AthenaExamples/ToyConversion/CMakeLists.txt index 328473afacd9a41822d901060993614559d058f2..b77ed8aceabb33dc29502a70ce3d52e47aea1b54 100644 --- a/Control/AthenaExamples/ToyConversion/CMakeLists.txt +++ b/Control/AthenaExamples/ToyConversion/CMakeLists.txt @@ -1,15 +1,8 @@ -################################################################################ -# Package: ToyConversion -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( ToyConversion ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Control/AthenaKernel - GaudiKernel ) - # Component(s) in the package: atlas_add_library( ToyConversionLib src/*.cxx @@ -22,4 +15,3 @@ atlas_add_component( ToyConversion # Install files from the package: atlas_install_joboptions( share/ToyConversionOpts.txt share/ToyConversionOpts.py ) - diff --git a/Control/AthenaKernel/AthenaKernel/IMetaDataSvc.h b/Control/AthenaKernel/AthenaKernel/IMetaDataSvc.h index ec82de1182d47ea34d36ea20ad36c5f245305acf..bf81f6019be4a58f1906b467b20a6050295ec1c4 100644 --- a/Control/AthenaKernel/AthenaKernel/IMetaDataSvc.h +++ b/Control/AthenaKernel/AthenaKernel/IMetaDataSvc.h @@ -39,6 +39,10 @@ public: // Non-static members template <typename T, typename TKEY> StatusCode record(T* p2BRegistered, const TKEY& key); + /// Record an object with a key, take ownership of the unique_ptr obj + template <typename T, typename TKEY> + StatusCode record(std::unique_ptr<T> pUnique, const TKEY& key); + /// Remove object with this type+key template <typename T, typename TKEY> StatusCode remove(const TKEY& key, bool ignoreIfAbsent=false); @@ -103,6 +107,19 @@ StatusCode IMetaDataSvc::record(T* pObject, const TKEY& key) return StatusCode::FAILURE; } + +template <typename T, typename TKEY> +StatusCode IMetaDataSvc::record(std::unique_ptr<T> pUnique, const TKEY& key) +{ + if( this->record( pUnique.get(), key ).isSuccess() ) { + pUnique.release(); + return StatusCode::SUCCESS; + } + pUnique.reset(); + return StatusCode::FAILURE; +} + + template <typename T, class TKEY> StatusCode IMetaDataSvc::remove(const TKEY& key, bool ignoreIfAbsent) { diff --git a/Control/AthenaMonitoringKernel/CMakeLists.txt b/Control/AthenaMonitoringKernel/CMakeLists.txt index c6b7d661e6bda6b6d006d4f5561964cae69ce359..646c1177f43d1cbaa1f748c8098fbd77388fa471 100644 --- a/Control/AthenaMonitoringKernel/CMakeLists.txt +++ b/Control/AthenaMonitoringKernel/CMakeLists.txt @@ -1,43 +1,31 @@ -################################################################################ -# Package: AthenaMonitoringKernel -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( AthenaMonitoringKernel ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( - PUBLIC - Control/AthenaBaseComps - PRIVATE - AtlasTest/TestTools -) - -# Options to steer cmake configuation: -option(VALGRIND "Enable valgrind dependency for profiling" OFF) - # External dependencies: find_package( nlohmann_json ) -if (${VALGRIND}) - find_package( valgrind REQUIRED ) - add_compile_definitions(ATHMON_VALGRIND) - set( _extra_includes ${VALGRIND_INCLUDE_DIRS}) -endif() +find_package( valgrind ) +find_package( ROOT COMPONENTS Core Hist ) +find_package( Boost COMPONENTS program_options ) atlas_add_library( AthenaMonitoringKernelLib + AthenaMonitoringKernel/*.h src/*.cxx src/HistogramFiller/*.cxx PUBLIC_HEADERS AthenaMonitoringKernel - PRIVATE_INCLUDE_DIRS nlohmann_json - LINK_LIBRARIES AthenaBaseComps - PRIVATE_LINK_LIBRARIES nlohmann_json::nlohmann_json + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} + LINK_LIBRARIES ${ROOT_LIBRARIES} GaudiKernel AthenaBaseComps StoreGateLib + CxxUtils xAODEventInfo + PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} + PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} nlohmann_json::nlohmann_json ) atlas_add_component( AthenaMonitoringKernel src/components/*.cxx - PRIVATE_LINK_LIBRARIES AthenaMonitoringKernelLib nlohmann_json::nlohmann_json + PRIVATE_LINK_LIBRARIES AthenaMonitoringKernelLib ) # Install files from the package: @@ -45,6 +33,14 @@ atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) atlas_install_joboptions( share/*.py ) +# Decide whether to use Valgrind in the unit tests. +set( _extra_includes ) +set( _test_definitions ) +if( VALGRIND_FOUND ) + list( APPEND _extra_includes ${VALGRIND_INCLUDE_DIRS} ) + list( APPEND _test_definitions DEFINITIONS ATHMON_VALGRIND ) +endif() + # Unit tests C++: file( GLOB CXX_TEST_FILES CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/test/*.cxx ) foreach ( test_file ${CXX_TEST_FILES} ) @@ -54,8 +50,12 @@ foreach ( test_file ${CXX_TEST_FILES} ) file( MAKE_DIRECTORY ${rundir} ) atlas_add_test( ${name} SOURCES ${test_file} - INCLUDE_DIRS ${_extra_includes} - LINK_LIBRARIES TestTools AthenaMonitoringKernelLib nlohmann_json::nlohmann_json + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} + ${_extra_includes} + ${_test_definitions} + LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} TestTools + GaudiKernel AthenaKernel CxxUtils + AthenaMonitoringKernelLib nlohmann_json::nlohmann_json ENVIRONMENT "JOBOPTSEARCHPATH=${CMAKE_CURRENT_SOURCE_DIR}/share" POST_EXEC_SCRIPT nopost.sh PROPERTIES TIMEOUT 300 diff --git a/Control/AthenaServices/python/Configurables.py b/Control/AthenaServices/python/Configurables.py index b0b7e99cd1d193fac0d22cfdd40fc2f7027fc4ea..153f18df4af004d1342e6a703501da9776f21b00 100644 --- a/Control/AthenaServices/python/Configurables.py +++ b/Control/AthenaServices/python/Configurables.py @@ -130,7 +130,6 @@ class ThinningSvc( _ThinningSvc ): ## list of streams we know we will apply thinning on outstreams = [] - ## connect @c ThinningOutputTool into the HelperTools slot AthenaOutputStream = CfgMgr.AthenaOutputStream ## first loop over TopAlg (as output stream can be located @@ -173,27 +172,11 @@ class ThinningSvc( _ThinningSvc ): if _lvl == handle.propertyNoValue: _lvl = handle.getDefaultProperty('OutputLevel') pass - ## get and install the ThinningOutputTool configurable - from AthenaServices.AthenaServicesConf import ThinningOutputTool - toolName = "ThinningTool_%s" % handle.name() - tool = ThinningOutputTool (toolName, - OutputLevel=_lvl, - ThinningSvc=handle) - tool.Proxies = [] - for o in outstreams: - tool.Proxies += _build_proxy_list(o) - o.HelperTools.insert(0, tool) - ## XXX FIXME XXX - ## see https://savannah.cern.ch/bugs/index.php?40823 - o.HelperTools += [] # just to work-around bug #40823 - ## return pass # class ThinningSvc def createThinningSvc(svcName = "ThinningSvc", outStreams = []): """Helper method to create a completely configured ThinningSvc. - It will take care of adding the helper ThinningOutputTool to the list of - 'outStreams' it has been given. Note that 'outStreams' elements have to be AthenaOutputStreams ! """ from AthenaCommon.Logging import logging diff --git a/Control/AthenaServices/src/AthenaOutputStream.cxx b/Control/AthenaServices/src/AthenaOutputStream.cxx index 714c8db10b3b99021bb072f368379a7eeb3d0102..c16372969befdef2b430f4769b87be26b5994b96 100644 --- a/Control/AthenaServices/src/AthenaOutputStream.cxx +++ b/Control/AthenaServices/src/AthenaOutputStream.cxx @@ -83,6 +83,13 @@ namespace { { addRef(); } + // Extra constructor to create a temporary proxy without aliases, for objects in MetaContainers + AltDataBucket(void* ptr, CLID clid, const std::type_info& tinfo, const std::string name) : + m_proxy(this, new SG::TransientAddress(clid, name) ), + m_ptr(ptr), m_clid(clid), m_tinfo(tinfo) + { + addRef(); + } virtual const CLID& clID() const override { return m_clid; } virtual void* object() override { return m_ptr; } @@ -859,7 +866,7 @@ void AthenaOutputStream::addItemObjects(const SG::FolderItem& item) if( metaCont ) { void* obj = metaCont->getAsVoid( m_outSeqSvc->currentRangeID() ); auto altbucket = std::make_unique<AltDataBucket>( - obj, item_id, *CLIDRegistry::CLIDToTypeinfo(item_id), *itemProxy ); + obj, item_id, *CLIDRegistry::CLIDToTypeinfo(item_id), itemProxy->name() ); m_objects.push_back( altbucket.get() ); m_ownedObjects.push_back( std::move(altbucket) ); m_altObjects.push_back( itemProxy->object() ); // only for duplicate prevention diff --git a/Control/AthenaServices/src/ThinningOutputTool.cxx b/Control/AthenaServices/src/ThinningOutputTool.cxx deleted file mode 100644 index ca545a70a197c14aef0470ffb3842b57e9fb3619..0000000000000000000000000000000000000000 --- a/Control/AthenaServices/src/ThinningOutputTool.cxx +++ /dev/null @@ -1,259 +0,0 @@ -///////////////////////// -*- C++ -*- ///////////////////////////// - -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// ThinningOutputTool.cxx -// Implementation file for class ThinningOutputTool -// Author: S.Binet<binet@cern.ch> -/////////////////////////////////////////////////////////////////// - - -// STL includes -#include <climits> -#include <cstdlib> // for atoi -#include <stdexcept> - -// FrameWork includes -#include "GaudiKernel/IToolSvc.h" - -// AthenaKernel -#include "AthenaKernel/IThinningSvc.h" - -// SGTools -#include "SGTools/DataProxy.h" - -// AthenaServices includes -#include "ThinningOutputTool.h" - -/////////////////////////////////////////////////////////////////// -// Public methods: -/////////////////////////////////////////////////////////////////// - -// Constructors -//////////////// -ThinningOutputTool::ThinningOutputTool( const std::string& type, - const std::string& name, - const IInterface* parent ) : - AthAlgTool( type, name, parent ), - m_thinningSvc ( "ThinningSvc", name ), - m_activeSvc ( nullptr ) -{ - // - // Property declaration - // - //declareProperty( "Property", m_nProperty ); - - declareProperty( "ThinningSvc", - m_thinningSvc = ThinningSvc_t( "ThinningSvc", name ), - "Handle to the service which has thinned data" ); - - declareProperty( "Proxies", - m_proxies, - "list of pairs (clid,key) the tool will forcingly read " - "from input to ensure a sound thinning state" ) - ->declareUpdateHandler(&ThinningOutputTool::propertyHandler, this); - - // Declare IAthenaOutputStreamTool interface - declareInterface<IAthenaOutputTool>(this); - -} - -// Destructor -/////////////// -ThinningOutputTool::~ThinningOutputTool() -{} - -// Athena Algorithm's Hooks -//////////////////////////// -StatusCode ThinningOutputTool::initialize() -{ - ATH_MSG_INFO ("Initializing " << name() << "..."); - - // Get pointer to ThinningSvc and cache it : - if ( !m_thinningSvc.retrieve().isSuccess() ) { - ATH_MSG_ERROR ("Unable to retrieve pointer to ThinningSvc"); - return StatusCode::FAILURE; - } - - ATH_MSG_INFO("proxies to be forcingly read: " << m_proxies.size()); - if (msgLvl(MSG::VERBOSE)) { - for (std::size_t i = 0, imax = m_proxies.size(); i != imax; ++i) { - ATH_MSG_VERBOSE(" clid=[" << m_proxies[i][0] << "] sg_key=[" - << m_proxies[i][1] << "]"); - } - } - return StatusCode::SUCCESS; -} - -StatusCode ThinningOutputTool::finalize() -{ - ATH_MSG_INFO ("Finalizing " << name() << "..."); - return StatusCode::SUCCESS; -} - -StatusCode ThinningOutputTool::preExecute() -{ - bool allGood = true; - ATH_MSG_DEBUG ("Calling IThinningSvc::commit()..."); - - // retrieve the currently active thinning svc - m_activeSvc = IThinningSvc::instance(); - - // set our thinning svc as the active one - static const bool override = true; - IThinningSvc* svc = IThinningSvc::instance( &*m_thinningSvc, override ); - if ( svc != &*m_thinningSvc ) { - ATH_MSG_ERROR - ("Could not set our peer ThinningSvc as the current active one !"); - // put back the previous one - IThinningSvc::instance( m_activeSvc, override ); - // bail-out - return StatusCode::FAILURE; - } - - const bool doThinning = m_thinningSvc->thinningOccurred(); - if (doThinning && m_proxies.size()>0) { - typedef std::vector<const SG::DataProxy*> SgProxies_t; - SgProxies_t proxies = m_thinningSvc->proxies(); // just in case - for ( std::size_t i = 0, imax = m_proxies.size(); - i != imax; - ++i ) { - const Proxy_t& proxy = m_proxies[i]; - CLID clid = std::atol(proxy[0].c_str()); - const std::string& key = proxy[1]; - ATH_MSG_VERBOSE("loading proxy(" << clid << ", " << key << ")..."); - if (key != "*") { - SG::DataProxy* p = m_thinningSvc->proxy(clid, key); - if (!p) { - // this proxy is only accessible *when* back navigation is 'ON' - ATH_MSG_VERBOSE("null pointer to proxy(" <<clid<<"#"<<key<< ")"); - continue; - } - if ( p->isValid() ) { - ATH_MSG_DEBUG - ("force-loading proxy(clid=[" << p->clID() << "], " - << "key=[" << p->name() << "])..."); - if ( nullptr == p->accessData() ) { - ATH_MSG_WARNING - ("Could not accessData(clid=[" << p->clID() << "], " - << "key=[" << p->name() << "]) !" - << endmsg - << "Thinning might segfault under certain conditions..."); - } - } - } else { - // get all proxies with CLID 'clid' - ATH_MSG_VERBOSE("requested to load all proxies with clid [" - <<clid<<"]..."); - for (std::size_t j = 0, jmax = proxies.size(); j != jmax; ++j) { - // FIXME: linear search ! - if (proxies[j]->clID() != clid) { - continue; - } - // lovely... - SG::DataProxy* p = const_cast<SG::DataProxy*>(proxies[j]); - if (p->isValid()) { - ATH_MSG_DEBUG - ("force-loading proxy(clid=[" << p->clID() << "], " - << "key=[" << p->name() << "])..."); - if ( nullptr == p->accessData() ) { - ATH_MSG_WARNING - ("Could not accessData(clid=[" << p->clID() << "], " - << "key=[" << p->name() << "]) !" - << endmsg - << "Thinning might segfault under certain conditions..."); - } - } - } - } //> a wildcard was there... - } //> loop over my proxy list - } //> thinning occured and proxies to load - - // apply thinning only if needed - if ( doThinning && !m_thinningSvc->commit().isSuccess() ) { - ATH_MSG_ERROR - ("IThinningSvc::commit() failed !" << endmsg - << "Containers (and ElementLinks pointing to their elements) are " - << "most probably in a corrupted state !!"); - allGood = false; - } - - return allGood - ? StatusCode::SUCCESS - : StatusCode::FAILURE - ; -} - -StatusCode ThinningOutputTool::postExecute() -{ - bool allGood = true; - ATH_MSG_DEBUG ("Calling IThinningSvc::rollback()..."); - - const bool doThinning = m_thinningSvc->thinningOccurred(); - if ( doThinning && !m_thinningSvc->rollback().isSuccess() ) { - ATH_MSG_ERROR - ("IThinningSvc::rollback() failed !" << endmsg - << "Containers (and ElementLinks pointing to their elements) are " - << "most probably in a corrupted state !!"); - allGood = false; - } - - // restore old active svc - static const bool override = true; - IThinningSvc* svc = IThinningSvc::instance( m_activeSvc, override ); - if ( svc != m_activeSvc ) { - ATH_MSG_WARNING - ("Could not setup the previous active thinning svc as the "\ - "current active one !"); - } - - return allGood - ? StatusCode::SUCCESS - : StatusCode::FAILURE - ; -} - -/////////////////////////////////////////////////////////////////// -// Const methods: -/////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////// -// Non-const methods: -/////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////// -// Protected methods: -/////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////// -// Const methods: -/////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////// -// Non-const methods: -/////////////////////////////////////////////////////////////////// - -void -ThinningOutputTool::propertyHandler(Property& /*m_proxies*/) -{ - const Proxies_t& proxies = m_proxies; - - for (Proxies_t::const_iterator i = proxies.begin(), iend = proxies.end(); - i != iend; - ++i) { - const Proxy_t& proxy = *i; - if (proxy.size() != 2) { - ATH_MSG_ERROR("invalid proxy format - need 2 items. got: " << - proxy.size()); - throw std::runtime_error("invalid proxy format (need 2 items)"); - } - const long clid = std::atol(proxy[0].c_str()); - if (clid == LONG_MAX || clid == LONG_MIN || clid <= 0) { - ATH_MSG_ERROR("invalid clid number [" << proxy[0] << "] (converts to [" - << clid << "])"); - throw std::runtime_error("invalid clid number"); - } - } -} diff --git a/Control/AthenaServices/src/ThinningOutputTool.h b/Control/AthenaServices/src/ThinningOutputTool.h deleted file mode 100644 index d83d0e5406bd0830b244bd04d23cb41286c4100e..0000000000000000000000000000000000000000 --- a/Control/AthenaServices/src/ThinningOutputTool.h +++ /dev/null @@ -1,120 +0,0 @@ -///////////////////////// -*- C++ -*- ///////////////////////////// - -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// ThinningOutputTool.h -// Header file for class ThinningOutputTool -// Author: S.Binet<binet@cern.ch> -/////////////////////////////////////////////////////////////////// -#ifndef ATHENASERVICES_THINNINGOUTPUTTOOL_H -#define ATHENASERVICES_THINNINGOUTPUTTOOL_H - -// STL includes -#include <string> -#include <vector> -#include <utility> // for std::pair - -// FrameWork includes -#include "AthenaBaseComps/AthAlgTool.h" -#include "GaudiKernel/ServiceHandle.h" - -// AthenaKernel includes -#include "AthenaKernel/IAthenaOutputTool.h" - -// Forward declaration -class IThinningSvc; - -class ThinningOutputTool : virtual public IAthenaOutputTool, - public AthAlgTool -{ - - /////////////////////////////////////////////////////////////////// - // Public methods: - /////////////////////////////////////////////////////////////////// - public: - - // Copy constructor: - - /// Constructor with parameters: - ThinningOutputTool( const std::string& type, - const std::string& name, - const IInterface* parent ); - - /// Destructor: - virtual ~ThinningOutputTool(); - - // Athena algorithm's Hooks - virtual StatusCode initialize(); - virtual StatusCode finalize(); - - /// Called at the beginning of @c AthenaOutputStream::execute() - /// This will trigger the 'commit' of the @c IThinningSvc indices - StatusCode preExecute(); - - /// Called at the end of @c AthenaOutputStream::execute() - /// This will trigger the 'rollback' of the @c IThinningSvc indices - StatusCode postExecute(); - - /// Called at the end of @c AthenaOutputStream::initialize() - /// No-op (for now ?) - StatusCode postInitialize() { return StatusCode::SUCCESS; } - - /// Called at the beginning of @c AthenaOutputStream::finalize() - /// No-op (for now ?) - StatusCode preFinalize() { return StatusCode::SUCCESS; } - - /////////////////////////////////////////////////////////////////// - // Const methods: - /////////////////////////////////////////////////////////////////// - - /////////////////////////////////////////////////////////////////// - // Non-const methods: - /////////////////////////////////////////////////////////////////// - - /////////////////////////////////////////////////////////////////// - // Private methods: - /////////////////////////////////////////////////////////////////// - private: - - /// Default constructor: - ThinningOutputTool(); - - /** property callback to ensure correct format of 'Proxies' - */ - void propertyHandler(Property& p); - - /////////////////////////////////////////////////////////////////// - // Private data: - /////////////////////////////////////////////////////////////////// - private: - - typedef ServiceHandle<IThinningSvc> ThinningSvc_t; - /// Pointer to the @c IThinningSvc service - ThinningSvc_t m_thinningSvc; - - /// Pointer to the active @c IThinningSvc service - IThinningSvc* m_activeSvc; - - typedef std::vector<std::string> Proxy_t; - typedef std::vector<Proxy_t> Proxies_t; - /** list of pairs (clid,key) the tool will forcingly read from input - * to ensure a sound thinning state (ie: all element-links will be correctly - * massaged by the thinning machinery) - */ - Proxies_t m_proxies; - - // Containers - - -}; - -// I/O operators -////////////////////// - -/////////////////////////////////////////////////////////////////// -// Inline methods: -/////////////////////////////////////////////////////////////////// - -#endif //> ATHENASERVICES_THINNINGOUTPUTTOOL_H diff --git a/Control/AthenaServices/src/components/AthenaServices_entries.cxx b/Control/AthenaServices/src/components/AthenaServices_entries.cxx index 50589cdcdb12ff7ea25cb95fd23d23496702b149..465609cb5a923291062cd16d1c6e304ce23a0338 100644 --- a/Control/AthenaServices/src/components/AthenaServices_entries.cxx +++ b/Control/AthenaServices/src/components/AthenaServices_entries.cxx @@ -7,7 +7,6 @@ #include "../SimplePOSIXTimeKeeperSvc.h" #include "../MixingEventSelector.h" #include "../ThinningSvc.h" -#include "../ThinningOutputTool.h" #include "../ThinningCacheTool.h" //#include "../EventDumperSvc.h" #include "../MemoryRescueSvc.h" @@ -68,7 +67,6 @@ DECLARE_COMPONENT( EvtIdModifierSvc ) DECLARE_COMPONENT( MetaDataSvc ) DECLARE_COMPONENT( OutputStreamSequencerSvc ) DECLARE_COMPONENT( AthenaOutputStreamTool ) -DECLARE_COMPONENT( ThinningOutputTool ) DECLARE_COMPONENT( Athena::ThinningCacheTool ) DECLARE_COMPONENT( AthenaStopperAlg ) DECLARE_COMPONENT( AthIncFirerAlg ) diff --git a/Database/AthenaPOOL/OutputStreamAthenaPool/src/CopyEventStreamInfo.cxx b/Database/AthenaPOOL/OutputStreamAthenaPool/src/CopyEventStreamInfo.cxx index a9a7e911770e1fca860a8d7712728d85f018df56..2ea6e688543d509adf92df8ee97f7ad1cc68373c 100644 --- a/Database/AthenaPOOL/OutputStreamAthenaPool/src/CopyEventStreamInfo.cxx +++ b/Database/AthenaPOOL/OutputStreamAthenaPool/src/CopyEventStreamInfo.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /** @file CopyEventStreamInfo.cxx @@ -17,7 +17,7 @@ CopyEventStreamInfo::CopyEventStreamInfo(const std::string& type, const std::string& name, const IInterface* parent) : ::AthAlgTool(type, name, parent), - m_metaDataStore("StoreGateSvc/MetaDataStore", name), + m_metaDataSvc("MetaDataSvc", name), m_inputMetaDataStore("StoreGateSvc/InputMetaDataStore", name) { // Declare IMetaDataTool interface declareInterface<IMetaDataTool>(this); @@ -31,9 +31,9 @@ CopyEventStreamInfo::~CopyEventStreamInfo() { //___________________________________________________________________________ StatusCode CopyEventStreamInfo::initialize() { ATH_MSG_INFO("Initializing " << name() << " - package version " << PACKAGE_VERSION); - // Locate the MetaDataStore and InputMetaDataStore - if (!m_metaDataStore.retrieve().isSuccess()) { - ATH_MSG_FATAL("Could not find MetaDataStore"); + // Locate the MetaDataSvc and InputMetaDataStore + if (!m_metaDataSvc.retrieve().isSuccess()) { + ATH_MSG_FATAL("Could not find MetaDataSvc"); return(StatusCode::FAILURE); } if (!m_inputMetaDataStore.retrieve().isSuccess()) { @@ -45,9 +45,9 @@ StatusCode CopyEventStreamInfo::initialize() { //___________________________________________________________________________ StatusCode CopyEventStreamInfo::finalize() { ATH_MSG_DEBUG("in finalize()"); - // release the MetaDataStore and InputMetaDataStore - if (!m_metaDataStore.release().isSuccess()) { - ATH_MSG_WARNING("Could not release MetaDataStore"); + // release the MetaDataSvc and InputMetaDataStore + if (!m_metaDataSvc.release().isSuccess()) { + ATH_MSG_WARNING("Could not release MetaDataSvc"); } if (!m_inputMetaDataStore.release().isSuccess()) { ATH_MSG_WARNING("Could not release InputMetaDataStore"); @@ -79,40 +79,37 @@ StatusCode CopyEventStreamInfo::beginInputFile(const SG::SourceID&) EventStreamInfo* evtStrInfo_out = 0; for (SG::ObjectWithVersion<EventStreamInfo>& obj : allVersions) { const EventStreamInfo* evtStrInfo_in = obj.dataObject.cptr(); - if (!m_metaDataStore->contains<EventStreamInfo>(key)) { - evtStrInfo_out = new EventStreamInfo(*evtStrInfo_in); - if (!m_metaDataStore->record(evtStrInfo_out, key).isSuccess()) { + evtStrInfo_out = m_metaDataSvc->tryRetrieve<EventStreamInfo>(key); + if( !evtStrInfo_out ) { + auto esinfo_up = std::make_unique<EventStreamInfo>(*evtStrInfo_in); + if( m_metaDataSvc->record( std::move(esinfo_up), key ).isFailure()) { ATH_MSG_ERROR("Could not record DataObject: " << key); return StatusCode::FAILURE; } } else { - if (!m_metaDataStore->retrieve(evtStrInfo_out, key).isSuccess()) { - ATH_MSG_ERROR("Could not find DataObject in output: " << key); - return StatusCode::FAILURE; - } evtStrInfo_out->addEvent(evtStrInfo_in->getNumberOfEvents()); for (auto elem = evtStrInfo_in->getRunNumbers().begin(), - lastElem = evtStrInfo_in->getRunNumbers().end(); + lastElem = evtStrInfo_in->getRunNumbers().end(); elem != lastElem; elem++) { - evtStrInfo_out->insertRunNumber(*elem); + evtStrInfo_out->insertRunNumber(*elem); } for (auto elem = evtStrInfo_in->getLumiBlockNumbers().begin(), - lastElem = evtStrInfo_in->getLumiBlockNumbers().end(); + lastElem = evtStrInfo_in->getLumiBlockNumbers().end(); elem != lastElem; elem++) { evtStrInfo_out->insertLumiBlockNumber(*elem); } for (auto elem = evtStrInfo_in->getProcessingTags().begin(), - lastElem = evtStrInfo_in->getProcessingTags().end(); + lastElem = evtStrInfo_in->getProcessingTags().end(); elem != lastElem; elem++) { evtStrInfo_out->insertProcessingTag(*elem); } for (auto elem = evtStrInfo_in->getItemList().begin(), - lastElem = evtStrInfo_in->getItemList().end(); + lastElem = evtStrInfo_in->getItemList().end(); elem != lastElem; elem++) { evtStrInfo_out->insertItemList((*elem).first, (*elem).second); } for (auto elem = evtStrInfo_in->getEventTypes().begin(), - lastElem = evtStrInfo_in->getEventTypes().end(); + lastElem = evtStrInfo_in->getEventTypes().end(); elem != lastElem; elem++) { evtStrInfo_out->insertEventType(*elem); } diff --git a/Database/AthenaPOOL/OutputStreamAthenaPool/src/CopyEventStreamInfo.h b/Database/AthenaPOOL/OutputStreamAthenaPool/src/CopyEventStreamInfo.h index 7d6e68dbf4e5eba29136726aeb9ff6a1373f63a9..43682f60954130197f0e45219fc232c6107e023a 100644 --- a/Database/AthenaPOOL/OutputStreamAthenaPool/src/CopyEventStreamInfo.h +++ b/Database/AthenaPOOL/OutputStreamAthenaPool/src/CopyEventStreamInfo.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef COPYEVENTSTREAMINFO_H @@ -15,6 +15,7 @@ #include "AthenaBaseComps/AthAlgTool.h" #include "AthenaKernel/IMetaDataTool.h" +#include "AthenaKernel/IMetaDataSvc.h" #include <string> @@ -48,8 +49,9 @@ private: /// Key, the StoreGate key for the EventStreamInfo object. StringProperty m_key; - /// Pointer to the metadata stores - ServiceHandle<StoreGateSvc> m_metaDataStore; + /// Access to output MetaDataStore through MetaDataSvc (using MetaContainers) + ServiceHandle<IMetaDataSvc> m_metaDataSvc; + /// MetaDataStore for input ServiceHandle<StoreGateSvc> m_inputMetaDataStore; }; #endif diff --git a/Database/AthenaPOOL/OutputStreamAthenaPool/src/MakeEventStreamInfo.cxx b/Database/AthenaPOOL/OutputStreamAthenaPool/src/MakeEventStreamInfo.cxx index 462cecda784ed2539a84345c27b075803770b15e..8b49f3e3ae13203315fd108dc7e33812616c297e 100644 --- a/Database/AthenaPOOL/OutputStreamAthenaPool/src/MakeEventStreamInfo.cxx +++ b/Database/AthenaPOOL/OutputStreamAthenaPool/src/MakeEventStreamInfo.cxx @@ -102,10 +102,10 @@ StatusCode MakeEventStreamInfo::postExecute() { EventStreamInfo* pEventStream = m_metaDataSvc->tryRetrieve<EventStreamInfo>(m_key.value()); if( !pEventStream ) { - pEventStream = new EventStreamInfo(); - if( m_metaDataSvc->record(pEventStream, m_key.value() ).isFailure()) { + auto esinfo_up = std::make_unique<EventStreamInfo>(); + pEventStream = esinfo_up.get(); + if( m_metaDataSvc->record(std::move(esinfo_up), m_key.value()).isFailure() ) { ATH_MSG_ERROR("Could not register EventStreamInfo object"); - delete pEventStream; return(StatusCode::FAILURE); } } diff --git a/Database/IOVDbSvc/CMakeLists.txt b/Database/IOVDbSvc/CMakeLists.txt index 961db48998fe4eb2fea0256df5eb8eaebc6da78a..222de047257923dbb7ca9940e8dac507434c0b68 100644 --- a/Database/IOVDbSvc/CMakeLists.txt +++ b/Database/IOVDbSvc/CMakeLists.txt @@ -1,34 +1,11 @@ -################################################################################ -# Package: IOVDbSvc -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( IOVDbSvc ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( - PUBLIC - GaudiKernel - PRIVATE - Control/AthenaBaseComps - Control/AthenaKernel - Control/CxxUtils - Control/SGTools - Control/StoreGate - Database/APR/FileCatalog - Database/AthenaPOOL/AthenaPoolUtilities - Database/AthenaPOOL/PoolSvc - Database/CoraCool - Database/IOVDbDataModel - Database/IOVDbMetaDataTools - DetectorDescription/GeoModel/GeoModelInterfaces - Event/EventInfo - Event/EventInfoUtils - Event/EventInfoMgt ) - # External dependencies: find_package( COOL COMPONENTS CoolKernel CoolApplication ) -find_package( CORAL COMPONENTS CoralBase ) +find_package( CORAL COMPONENTS CoralBase RelationalAccess ) find_package( ROOT COMPONENTS Core ) find_package( Boost COMPONENTS unit_test_framework ) find_package( nlohmann_json ) @@ -39,167 +16,169 @@ atlas_add_library( IOVDbSvcLib IOVDbSvc/*.h INTERFACE PUBLIC_HEADERS IOVDbSvc - INCLUDE_DIRS ${COOL_INCLUDE_DIRS} nlohmann_json::nlohmann_json ${CURL_INCLUDE_DIRS} - LINK_LIBRARIES ${COOL_LIBRARIES} GaudiKernel nlohmann_json::nlohmann_json ${CURL_LIBRARIES} - ) + INCLUDE_DIRS ${COOL_INCLUDE_DIRS} + LINK_LIBRARIES ${COOL_LIBRARIES} GaudiKernel ) atlas_add_component( IOVDbSvc src/*.h src/*.cxx src/components/*.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${COOL_INCLUDE_DIRS} nlohmann_json::nlohmann_json ${CURL_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} ${COOL_LIBRARIES} nlohmann_json::nlohmann_json ${CURL_LIBRARIES} GaudiKernel AthenaBaseComps AthenaKernel CxxUtils SGTools StoreGateLib - FileCatalog AthenaPoolUtilities CoraCool IOVDbDataModel EventInfo EventInfoUtils IOVDbSvcLib GeoModelInterfaces IOVDbMetaDataToolsLib EventInfoMgtLib PoolSvcLib - ) - + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${COOL_INCLUDE_DIRS} + ${Boost_INCLUDE_DIRS} ${CURL_INCLUDE_DIRS} + LINK_LIBRARIES ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} ${COOL_LIBRARIES} + ${CURL_LIBRARIES} nlohmann_json::nlohmann_json GaudiKernel AthenaBaseComps + AthenaKernel StoreGateLib FileCatalog AthenaPoolUtilities CoraCool + IOVDbDataModel EventInfo EventInfoUtils GeoModelInterfaces + IOVDbMetaDataToolsLib EventInfoMgtLib PoolSvcLib IOVDbSvcLib ) # Install files from the package: atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8}) atlas_install_joboptions( share/*.py ) atlas_install_joboptions( share/*.txt ) - +# Test(s) in the package. atlas_add_test( IOVDbSvc_test - SOURCES - test/IOVDbSvc_test.cxx - INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${CURL_INCLUDE_DIRS} - LINK_LIBRARIES AthenaBaseComps AthenaKernel SGTools StoreGateLib SGtests GaudiKernel TestTools EventInfo IOVSvcLib xAODEventInfo PersistentDataModel ${COOL_LIBRARIES} ${CURL_LIBRARIES} - PROPERTIES TIMEOUT 300 - LOG_IGNORE_PATTERN "^HistogramPersis.* INFO|^IOVSvc +DEBUG|^IOVSvcTool +DEBUG |Warning in <TFile::Init>: no |Initializing" ) - + SOURCES test/IOVDbSvc_test.cxx + INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} + LINK_LIBRARIES ${COOL_LIBRARIES} ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} + GaudiKernel AthenaKernel CxxUtils TestTools + PROPERTIES TIMEOUT 300 + LOG_IGNORE_PATTERN "^HistogramPersis.* INFO|^IOVSvc +DEBUG|^IOVSvcTool +DEBUG |Warning in <TFile::Init>: no |Initializing" ) + atlas_add_test( IOVDbSvc_Boost_test - SOURCES - test/IOVDbSvc_Boost_test.cxx - INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${CURL_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} AthenaBaseComps AthenaKernel SGTools StoreGateLib SGtests GaudiKernel TestTools EventInfo IOVSvcLib xAODEventInfo PersistentDataModel ${COOL_LIBRARIES} ${CURL_LIBRARIES} - LOG_IGNORE_PATTERN "^HistogramPersis.* INFO|^IOVSvc +DEBUG|^IOVSvcTool +DEBUG" - - ) -set_target_properties( IOVDbSvc_IOVDbSvc_Boost_test PROPERTIES ENABLE_EXPORTS True ) + SOURCES test/IOVDbSvc_Boost_test.cxx + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${COOL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} + LINK_LIBRARIES ${Boost_LIBRARIES} ${COOL_LIBRARIES} ${ROOT_LIBRARIES} + GaudiKernel AthenaKernel CxxUtils TestTools StoreGateLib + LOG_IGNORE_PATTERN "^HistogramPersis.* INFO|^IOVSvc +DEBUG|^IOVSvcTool +DEBUG" ) atlas_add_test( IOVDbConn_test - SOURCES - test/IOVDbConn_test.cxx src/IOVDbConn.cxx - INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${CURL_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} AthenaBaseComps AthenaKernel SGTools StoreGateLib SGtests GaudiKernel TestTools EventInfo IOVSvcLib xAODEventInfo PersistentDataModel ${COOL_LIBRARIES} CoraCool ${CURL_LIBRARIES} - POST_EXEC_SCRIPT "nopost.sh" - ) - + SOURCES test/IOVDbConn_test.cxx src/IOVDbConn.cxx + INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} + LINK_LIBRARIES ${COOL_LIBRARIES} ${Boost_LIBRARIES} ${ROOT_LIBRARIES} + GaudiKernel CxxUtils TestTools CoraCool + POST_EXEC_SCRIPT "nopost.sh" ) + atlas_add_test( IOVDbStringFunctions_test - SOURCES - test/IOVDbStringFunctions_test.cxx src/IOVDbStringFunctions.cxx - INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CURL_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} IOVSvcLib ${CURL_LIBRARIES} CoraCool - POST_EXEC_SCRIPT "nopost.sh" - ) - + SOURCES test/IOVDbStringFunctions_test.cxx src/IOVDbStringFunctions.cxx + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} + LINK_LIBRARIES ${Boost_LIBRARIES} + POST_EXEC_SCRIPT "nopost.sh" ) + atlas_add_test( IOVDbParser_test - SOURCES - test/IOVDbParser_test.cxx src/IOVDbParser.cxx src/IOVDbStringFunctions.cxx - INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CURL_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} IOVSvcLib ${CURL_LIBRARIES} - POST_EXEC_SCRIPT "nopost.sh" - ) - + SOURCES test/IOVDbParser_test.cxx src/IOVDbParser.cxx + src/IOVDbStringFunctions.cxx + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} + LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} GaudiKernel CxxUtils + TestTools + POST_EXEC_SCRIPT "nopost.sh" ) + atlas_add_test( FolderTypes_test - SOURCES - test/FolderTypes_test.cxx src/IOVDbStringFunctions.cxx src/FolderTypes.cxx src/Json2Cool.cxx src/BasicFolder.cxx - INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${CURL_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${COOL_LIBRARIES} IOVSvcLib AthenaPoolUtilities ${CURL_LIBRARIES} nlohmann_json::nlohmann_json - POST_EXEC_SCRIPT "nopost.sh" - ) - + SOURCES test/FolderTypes_test.cxx src/FolderTypes.cxx + src/IOVDbStringFunctions.cxx + INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} + ${ROOT_INCLUDE_DIRS} + LINK_LIBRARIES ${COOL_LIBRARIES} ${CORAL_LIBRARIES} ${Boost_LIBRARIES} + ${ROOT_LIBRARIES} GaudiKernel AthenaKernel StoreGateLib CxxUtils TestTools + AthenaPoolUtilities + POST_EXEC_SCRIPT "nopost.sh" ) + atlas_add_test( IOVDbCoolFunctions_test - SOURCES - test/IOVDbCoolFunctions_test.cxx src/IOVDbCoolFunctions.cxx src/IOVDbConn.cxx - INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${CURL_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${COOL_LIBRARIES} IOVSvcLib ${CURL_LIBRARIES} CoraCool - POST_EXEC_SCRIPT "nopost.sh" - ) - + SOURCES test/IOVDbCoolFunctions_test.cxx src/IOVDbCoolFunctions.cxx + src/IOVDbConn.cxx + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${COOL_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} + LINK_LIBRARIES ${Boost_LIBRARIES} ${COOL_LIBRARIES} ${CORAL_LIBRARIES} + GaudiKernel AthenaKernel CoraCool + POST_EXEC_SCRIPT "nopost.sh" ) + atlas_add_test( ReadFromFileMetaData_test - SOURCES - test/ReadFromFileMetaData_test.cxx src/BasicFolder.cxx src/IOVDbSvcCurl.cxx src/Json2Cool.cxx src/CrestFunctions.cxx src/ReadFromFileMetaData.cxx src/FolderTypes.cxx src/IOVDbCoolFunctions.cxx src/IOVDbStringFunctions.cxx src/IOVDbConn.cxx - INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${CURL_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${COOL_LIBRARIES} IOVDbDataModel IOVSvcLib ${CURL_LIBRARIES} CoraCool nlohmann_json::nlohmann_json - POST_EXEC_SCRIPT "nopost.sh" - ) - + SOURCES test/ReadFromFileMetaData_test.cxx src/ReadFromFileMetaData.cxx + src/FolderTypes.cxx src/IOVDbCoolFunctions.cxx src/IOVDbStringFunctions.cxx + src/IOVDbConn.cxx + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${COOL_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} + LINK_LIBRARIES ${Boost_LIBRARIES} ${COOL_LIBRARIES} ${CORAL_LIBRARIES} + AthenaKernel IOVDbDataModel AthenaPoolUtilities CoraCool CxxUtils TestTools + POST_EXEC_SCRIPT "nopost.sh" ) + atlas_add_test( IOVDbFolder_test - SOURCES - test/IOVDbFolder_test.cxx src/IOVDbFolder.cxx src/CrestFunctions.cxx src/Cool2Json.cxx src/Json2Cool.cxx src/IovStore.cxx src/IOVDbConn.cxx src/IOVDbParser.cxx src/FolderTypes.cxx src/IOVDbCoolFunctions.cxx src/IOVDbStringFunctions.cxx src/ReadFromFileMetaData.cxx src/TagFunctions.cxx src/BasicFolder.cxx src/IOVDbSvcCurl.cxx src/IOVDbResolveTag.cxx src/Base64Codec.cxx - INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} nlohmann_json::nlohmann_json ${CURL_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} AthenaBaseComps AthenaKernel SGTools StoreGateLib SGtests GaudiKernel TestTools EventInfo IOVSvcLib xAODEventInfo PersistentDataModel ${COOL_LIBRARIES} CoraCool AthenaPoolUtilities GeoModelInterfaces IOVDbMetaDataToolsLib IOVDbDataModel nlohmann_json::nlohmann_json ${CURL_LIBRARIES} - LOG_IGNORE_PATTERN "^HistogramPersis.* INFO|^IOVSvc +DEBUG|^IOVSvcTool +DEBUG" - POST_EXEC_SCRIPT "nopost.sh" - ) - + SOURCES test/IOVDbFolder_test.cxx src/FolderTypes.cxx + src/IOVDbStringFunctions.cxx src/IOVDbParser.cxx src/IOVDbConn.cxx + src/IOVDbFolder.cxx src/IOVDbParser.cxx src/IovStore.cxx + src/ReadFromFileMetaData.cxx src/IOVDbCoolFunctions.cxx src/TagFunctions.cxx + src/Cool2Json.cxx src/Base64Codec.cxx src/Json2Cool.cxx src/IOVDbSvcCurl.cxx + src/BasicFolder.cxx src/IOVDbResolveTag.cxx src/CrestFunctions.cxx + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${COOL_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} + ${ROOT_INCLUDE_DIRS} ${CURL_INCLUDE_DIRS} + LINK_LIBRARIES ${Boost_LIBRARIES} ${COOL_LIBRARIES} ${CORAL_LIBRARIES} + ${ROOT_LIBRARIES} ${CURL_LIBRARIES} nlohmann_json::nlohmann_json + GaudiKernel AthenaKernel AthenaBaseComps StoreGateLib SGTools CxxUtils + TestTools CoraCool AthenaPoolUtilities GeoModelInterfaces EventInfo + IOVDbMetaDataToolsLib IOVDbDataModel + LOG_IGNORE_PATTERN "^HistogramPersis.* INFO|^IOVSvc +DEBUG|^IOVSvcTool +DEBUG" + POST_EXEC_SCRIPT "nopost.sh" ) + atlas_add_test( IovStore_test - SOURCES - test/IovStore_test.cxx src/IovStore.cxx - INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${CURL_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${COOL_LIBRARIES} IOVSvcLib ${CURL_LIBRARIES} - POST_EXEC_SCRIPT "nopost.sh" - ) - + SOURCES test/IovStore_test.cxx src/IovStore.cxx + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${COOL_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} + LINK_LIBRARIES ${Boost_LIBRARIES} ${COOL_LIBRARIES} ${CORAL_LIBRARIES} + POST_EXEC_SCRIPT "nopost.sh" ) + atlas_add_test( TagFunctions_test - SOURCES - test/TagFunctions_test.cxx src/TagFunctions.cxx src/IOVDbStringFunctions.cxx - INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${CURL_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${COOL_LIBRARIES} AthenaKernel StoreGateLib GaudiKernel TestTools EventInfo IOVSvcLib PersistentDataModel AthenaPoolUtilities GeoModelInterfaces ${COOL_LIBRARIES} ${CURL_LIBRARIES} - POST_EXEC_SCRIPT "nopost.sh" - ) - + SOURCES test/TagFunctions_test.cxx src/TagFunctions.cxx + src/IOVDbStringFunctions.cxx + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${COOL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} + LINK_LIBRARIES ${Boost_LIBRARIES} ${COOL_LIBRARIES} ${ROOT_LIBRARIES} + GaudiKernel AthenaKernel StoreGateLib AthenaPoolUtilities CxxUtils TestTools + EventInfo GeoModelInterfaces + POST_EXEC_SCRIPT "nopost.sh" ) + atlas_add_test( IOVDbSvcCurl_test - SOURCES - test/IOVDbSvcCurl_test.cxx src/IOVDbSvcCurl.cxx - INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CURL_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CURL_LIBRARIES} IOVSvcLib - POST_EXEC_SCRIPT "nopost.sh" - ) - + SOURCES test/IOVDbSvcCurl_test.cxx src/IOVDbSvcCurl.cxx + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CURL_INCLUDE_DIRS} + LINK_LIBRARIES ${Boost_LIBRARIES} ${CURL_LIBRARIES} + POST_EXEC_SCRIPT "nopost.sh" ) + atlas_add_test( BasicFolder_test - SOURCES - test/BasicFolder_test.cxx src/BasicFolder.cxx - INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${COOL_INCLUDE_DIRS} ${CURL_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${COOL_LIBRARIES} IOVSvcLib ${CURL_LIBRARIES} - POST_EXEC_SCRIPT "nopost.sh" - ) + SOURCES test/BasicFolder_test.cxx src/BasicFolder.cxx + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${COOL_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} + LINK_LIBRARIES ${Boost_LIBRARIES} ${COOL_LIBRARIES} ${CORAL_LIBRARIES} + POST_EXEC_SCRIPT "nopost.sh" ) atlas_add_test( Json2Cool_test - SOURCES - test/Json2Cool_test.cxx src/Json2Cool.cxx src/BasicFolder.cxx - INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${COOL_INCLUDE_DIRS} ${CURL_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${COOL_LIBRARIES} IOVSvcLib nlohmann_json::nlohmann_json ${CURL_LIBRARIES} - POST_EXEC_SCRIPT "nopost.sh" - ) + SOURCES test/Json2Cool_test.cxx src/Json2Cool.cxx src/BasicFolder.cxx + src/IOVDbStringFunctions.cxx + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${COOL_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} + LINK_LIBRARIES ${Boost_LIBRARIES} ${COOL_LIBRARIES} ${CORAL_LIBRARIES} + nlohmann_json::nlohmann_json + POST_EXEC_SCRIPT "nopost.sh" ) atlas_add_test( Cool2Json_test - SOURCES - test/Cool2Json_test.cxx src/Cool2Json.cxx src/Json2Cool.cxx src/IOVDbConn.cxx src/IOVDbParser.cxx src/FolderTypes.cxx src/IOVDbCoolFunctions.cxx src/IOVDbStringFunctions.cxx src/ReadFromFileMetaData.cxx src/TagFunctions.cxx src/BasicFolder.cxx src/IOVDbSvcCurl.cxx src/IOVDbResolveTag.cxx src/Base64Codec.cxx - INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} nlohmann_json::nlohmann_json ${CURL_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} AthenaBaseComps AthenaKernel SGTools StoreGateLib SGtests GaudiKernel TestTools EventInfo IOVSvcLib xAODEventInfo PersistentDataModel ${COOL_LIBRARIES} CoraCool nlohmann_json::nlohmann_json ${CURL_LIBRARIES} - LOG_IGNORE_PATTERN "^HistogramPersis.* INFO|^IOVSvc +DEBUG|^IOVSvcTool +DEBUG" - POST_EXEC_SCRIPT "nopost.sh" - ) - + SOURCES test/Cool2Json_test.cxx src/Cool2Json.cxx src/IOVDbConn.cxx + src/IOVDbParser.cxx src/IOVDbStringFunctions.cxx src/FolderTypes.cxx + src/Base64Codec.cxx + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${COOL_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} + ${ROOT_INCLUDE_DIRS} + LINK_LIBRARIES ${Boost_LIBRARIES} ${COOL_LIBRARIES} ${CORAL_LIBRARIES} + ${ROOT_LIBRARIES} GaudiKernel AthenaKernel StoreGateLib CoraCool + AthenaPoolUtilities CxxUtils TestTools + LOG_IGNORE_PATTERN "^HistogramPersis.* INFO|^IOVSvc +DEBUG|^IOVSvcTool +DEBUG" + POST_EXEC_SCRIPT "nopost.sh" ) + atlas_add_test( CrestFunctions_test - SOURCES - test/CrestFunctions_test.cxx src/CrestFunctions.cxx src/IOVDbSvcCurl.cxx src/IOVDbStringFunctions.cxx - INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CURL_INCLUDE_DIRS} ${COOL_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} IOVSvcLib AthenaPoolUtilities ${CURL_LIBRARIES} CoraCool - POST_EXEC_SCRIPT "nopost.sh" - ) - -atlas_add_test( Base64Codec_test - SOURCES - test/Base64Codec_test.cxx src/Base64Codec.cxx - INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} IOVSvcLib ${CORAL_LIBRARIES} - POST_EXEC_SCRIPT "nopost.sh" - ) + SOURCES test/CrestFunctions_test.cxx src/CrestFunctions.cxx + src/IOVDbSvcCurl.cxx src/IOVDbStringFunctions.cxx + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${COOL_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} + ${CURL_INCLUDE_DIRS} + LINK_LIBRARIES ${Boost_LIBRARIES} ${COOL_LIBRARIES} ${CORAL_LIBRARIES} + ${CURL_LIBRARIES} + POST_EXEC_SCRIPT "nopost.sh" ) +atlas_add_test( Base64Codec_test + SOURCES test/Base64Codec_test.cxx src/Base64Codec.cxx + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} + LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} + POST_EXEC_SCRIPT "nopost.sh" ) if( NOT SIMULATIONBASE AND NOT GENERATIONBASE ) - atlas_add_test( IOVDbSvcCfgTest SCRIPT python -m IOVDbSvc.IOVDbSvcConfig POST_EXEC_SCRIPT nopost.sh ) + atlas_add_test( IOVDbSvcCfgTest + SCRIPT python -m IOVDbSvc.IOVDbSvcConfig + POST_EXEC_SCRIPT "nopost.sh" ) endif() - - diff --git a/DetectorDescription/Identifier/Identifier/Range.h b/DetectorDescription/Identifier/Identifier/Range.h index dfdbfcb3004c0814a43719bc443aeb82eafc85ac..d9bdc2e4dd1256766e6b6116839e0792d266f946 100644 --- a/DetectorDescription/Identifier/Identifier/Range.h +++ b/DetectorDescription/Identifier/Identifier/Range.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef IDENTIFIER_RANGE_H @@ -582,12 +582,13 @@ Range::field::get_value_at (size_type index) const // both_bounded if the more frequent case and so comes first. if (both_bounded == m_mode) { + assert (index < (size_type) (m_maximum - m_minimum + 1)); return (m_minimum + index); // if (index >= (size_type) (m_maximum - m_minimum + 1)) return (0); // else return (m_minimum + index); } else if (enumerated == m_mode) { - return (m_values[index]); + return (m_values.at(index)); // if (index >= m_values.size ()) return (0); // else return (m_values[index]); } diff --git a/DetectorDescription/RegionSelector/python/RegSelToolConfig.py b/DetectorDescription/RegionSelector/python/RegSelToolConfig.py index a64c342313523f30f236540160d28c9d1f4b428a..8c73cbe2dc438c32954f2e71a0ccdddf9bdc63e4 100644 --- a/DetectorDescription/RegionSelector/python/RegSelToolConfig.py +++ b/DetectorDescription/RegionSelector/python/RegSelToolConfig.py @@ -10,54 +10,66 @@ # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration# # -from AthenaCommon.Constants import INFO,ERROR,FALSE,TRUE,DEBUG,VERBOSE +from AthenaConfiguration.ComponentFactory import CompFactory # CompFactory creates old or new configs depending on the enva -def _makeRegSelTool( detector, enable, CondAlgConstructor ) : - - from RegionSelector.RegionSelectorConf import RegSelTool +def _condAlgName(detector): + return "RegSelCondAlg_"+detector + +def _createRegSelCondAlg( detector, CondAlgConstructor ): + """ + Cretes conditions alg that provides dat to a RegSel Tool + """ + condAlg = CondAlgConstructor( name = _condAlgName( detector ), + ManagerName = detector, + PrintTable = False, + RegSelLUT = ("RegSelLUTCondData_"+detector) ) + + if detector == "Pixel": + condAlg.DetEleCollKey = "PixelDetectorElementCollection" + elif detector == "SCT": + condAlg.DetEleCollKey = "SCT_DetectorElementCollection" + return condAlg + +def _createRegSelTool( detector, enable ): + """ + Creates RegSelTool and corresponding cond tool that is needed for its function + + If the enable flag is set - the tool is properly configured, else it is configured NOT to provide the data. + + """ - tool = RegSelTool(name="RegSelTool_"+detector) + tool = CompFactory.RegSelTool(name="RegSelTool_"+detector) + # should we enable the look up table access for this subsystem ? - if ( enable ) : + if not enable: + # detector not configured so don't enable + # lookup table access + tool.Initialised = False + return tool - # add the lookup table to retrieve + # add the lookup table to retrieve - tool.RegSelLUT = "RegSelLUTCondData_"+detector - - tool.Initialised = True + tool.RegSelLUT = "RegSelLUTCondData_"+detector # has to match wiht appropriate RegSelCondAlg + tool.Initialised = True + return tool - # add the conditions algorithm to create the lookup table - from AthenaCommon.AlgSequence import AthSequencer - condseq = AthSequencer('AthCondSeq') - - if not hasattr( condseq, 'RegSelCondAlg_'+detector ) : - CondAlg = CondAlgConstructor( name = ("RegSelCondAlg_"+detector), - ManagerName = detector, - PrintTable = False, - RegSelLUT = ("RegSelLUTCondData_"+detector) ) - if detector == "Pixel": - CondAlg.DetEleCollKey = "PixelDetectorElementCollection" - elif detector == "SCT": - CondAlg.DetEleCollKey = "SCT_DetectorElementCollection" +def _makeRegSelTool( detector, enable, CondAlgConstructor ): - condseq += CondAlg + from AthenaCommon.AlgSequence import AthSequencer + condseq = AthSequencer('AthCondSeq') - else: - # detector not configured so don't enable - # lookup table access + if enable and not hasattr( condseq, _condAlgName( detector ) ): + condseq += _createRegSelCondAlg( detector, CondAlgConstructor ) - tool.Initialised = False - - return tool + return _createRegSelTool( detector, enable ) # inner detector toold - def makeRegSelTool_Pixel() : from AthenaCommon.DetFlags import DetFlags enabled = DetFlags.detdescr.pixel_on() @@ -160,3 +172,12 @@ def makeRegSelTool_TILE() : from TileRawUtils.TileRawUtilsConf import RegSelCondAlg_Tile return _makeRegSelTool( "TILE", enabled, RegSelCondAlg_Tile ) + +##### new JO counterparts + +def regSelToolMDTCfg(flags): + from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator + ca = ComponentAccumulator() + ca.setPrivateTools( _createRegSelTool( "MDT", True ) ) + ca.addCondAlgo( _createRegSelCondAlg( "MDT", CompFactory.MDT_RegSelCondAlg ) ) + return ca diff --git a/Event/ByteStreamCnvSvc/ByteStreamCnvSvc/ByteStreamOutputSvc.h b/Event/ByteStreamCnvSvc/ByteStreamCnvSvc/ByteStreamOutputSvc.h index 2e986118ce34363b21f44903edd787d49d1f5b7b..0871f3c65b408bc7dfd029e1fa961f9767a8066d 100644 --- a/Event/ByteStreamCnvSvc/ByteStreamCnvSvc/ByteStreamOutputSvc.h +++ b/Event/ByteStreamCnvSvc/ByteStreamCnvSvc/ByteStreamOutputSvc.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef BYTESTREAMCNVSVC_BYTESTREAMOUTPUTSVC_H @@ -15,6 +15,8 @@ #include "ByteStreamData/RawEvent.h" +#include "GaudiKernel/EventContext.h" + /** @class ByteStreamOutputSvc * @brief This class provides the base class to services to write bytestream data. * The concrete class can provide Raw event to a file, transient store, or through network. @@ -31,6 +33,9 @@ public: /// virtual method for writing the event virtual bool putEvent(RawEvent* re) = 0; + + /// context-aware method for writing the event + virtual bool putEvent(RawEvent* re, const EventContext& ctx) = 0; }; inline const InterfaceID& ByteStreamOutputSvc::interfaceID() { diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.cxx b/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.cxx index 1ce60ee24cef94ee8903958ab0c352db69848461..6e8b751ca496883dd78a81ebb6928f09eca3f716 100644 --- a/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.cxx +++ b/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "ByteStreamEventStorageOutputSvc.h" @@ -354,6 +354,11 @@ ByteStreamEventStorageOutputSvc::putEvent(RawEvent* re) return(true); } +bool ByteStreamEventStorageOutputSvc::putEvent(RawEvent* /*re*/, const EventContext& /*ctx*/) { + ATH_MSG_FATAL(name() << " does not implement the context-aware putEvent method"); + return false; +} + /******************************************************************************/ StatusCode diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.h b/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.h index 9bf035bf44f0bbfb77b9e15dce7db6122d857e7f..8c9daa9a515e88eb63e0c80405a07cad86e4303f 100644 --- a/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.h +++ b/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef BYTESTREAMEVENTSTORAGEOUTPUTSVC_H @@ -42,19 +42,20 @@ public: virtual ~ByteStreamEventStorageOutputSvc(); /// Required of all Gaudi Services - virtual StatusCode initialize(); - virtual StatusCode stop (); - virtual StatusCode finalize (); + virtual StatusCode initialize() override; + virtual StatusCode stop () override; + virtual StatusCode finalize () override; /// Required of all Gaudi services: see Gaudi documentation for details - StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface); + StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override; /// Implementation of the ByteStreamOutputSvc interface method putEvent. - virtual bool putEvent(RawEvent* re); + virtual bool putEvent(RawEvent* re) override; + virtual bool putEvent(RawEvent* re, const EventContext& ctx) override; // Callback method to reinitialize the internal state of the component // for I/O purposes (e.g. upon @c fork(2)) - virtual StatusCode io_reinit(); + virtual StatusCode io_reinit() override; private: // internal member functions diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamMergeOutputSvc.cxx b/Event/ByteStreamCnvSvc/src/ByteStreamMergeOutputSvc.cxx index 0a24e50e40c38c9f0314404b5b280460625a9326..8148846ca32e7789aee19c833bebc5f2b59aa756 100644 --- a/Event/ByteStreamCnvSvc/src/ByteStreamMergeOutputSvc.cxx +++ b/Event/ByteStreamCnvSvc/src/ByteStreamMergeOutputSvc.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "ByteStreamMergeOutputSvc.h" @@ -173,6 +173,11 @@ bool ByteStreamMergeOutputSvc::putEvent(RawEvent* newEvent) { return(true); } +bool ByteStreamMergeOutputSvc::putEvent(RawEvent* /*re*/, const EventContext& /*ctx*/) { + ATH_MSG_FATAL(name() << " does not implement the context-aware putEvent method"); + return false; +} + StatusCode ByteStreamMergeOutputSvc::queryInterface(const InterfaceID& riid, void** ppvInterface) { if (ByteStreamOutputSvc::interfaceID().versionMatch(riid)) { *ppvInterface = dynamic_cast<ByteStreamOutputSvc*>(this); diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamMergeOutputSvc.h b/Event/ByteStreamCnvSvc/src/ByteStreamMergeOutputSvc.h index fda0e3d78cac60168dcea2b8e44780cb61fbfb81..9794a8a8332a7557514104efa96fb53de093a639 100644 --- a/Event/ByteStreamCnvSvc/src/ByteStreamMergeOutputSvc.h +++ b/Event/ByteStreamCnvSvc/src/ByteStreamMergeOutputSvc.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef BYTESTREAMMERGEOUTPUTSVC_H @@ -27,12 +27,13 @@ public: /// Destructor. virtual ~ByteStreamMergeOutputSvc(); - virtual StatusCode initialize(); + virtual StatusCode initialize() override; /// Implementation of the ByteStreamOutputSvc interface methods. - virtual bool putEvent(RawEvent* re); + virtual bool putEvent(RawEvent* re) override; + virtual bool putEvent(RawEvent* re, const EventContext& ctx) override; /// Required of all Gaudi services: see Gaudi documentation for details - StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface); + StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override; private: uint32_t reducedROBid(uint32_t); diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamRDP_OutputSvc.cxx b/Event/ByteStreamCnvSvc/src/ByteStreamRDP_OutputSvc.cxx index 595dc78364e8790147cdc1662d7ba24de36802e5..517ece2152b7ad6aa69a2739ed2d654bc3fce95e 100644 --- a/Event/ByteStreamCnvSvc/src/ByteStreamRDP_OutputSvc.cxx +++ b/Event/ByteStreamCnvSvc/src/ByteStreamRDP_OutputSvc.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ //=================================================================== @@ -15,15 +15,8 @@ // Constructor. ByteStreamRDP_OutputSvc::ByteStreamRDP_OutputSvc(const std::string& name, ISvcLocator* svcloc) - : ByteStreamOutputSvc(name, svcloc), - m_totalEventCounter(0), m_re(0), m_buf(0), m_robProvider("ROBDataProviderSvc", name) { - declareProperty("BSOutputStreamName", m_bsOutputStreamName = name); -} - -// Destructor. -ByteStreamRDP_OutputSvc::~ByteStreamRDP_OutputSvc() { - delete [] m_buf; - delete m_re; m_re = 0; + : ByteStreamOutputSvc(name, svcloc) { + if (m_bsOutputStreamName.empty()) m_bsOutputStreamName = name; } // Open the first input file and read the first event. @@ -42,23 +35,27 @@ StatusCode ByteStreamRDP_OutputSvc::initialize() { return(StatusCode::SUCCESS); } -// Receive the next event. -bool ByteStreamRDP_OutputSvc::putEvent(RawEvent* re) { - delete [] m_buf; - delete m_re; m_re = 0; - // Keep a local copy - uint32_t reSize = re->fragment_size_word(); - OFFLINE_FRAGMENTS_NAMESPACE::PointerType reStart; - re->start(reStart); - m_buf = new OFFLINE_FRAGMENTS_NAMESPACE::DataType[reSize]; - memcpy (reinterpret_cast<void *>(m_buf), reinterpret_cast<const void *>(reStart), reSize*sizeof(reStart[0])); - m_re = new RawEvent(m_buf); - // Give RawEvent to RDP - m_robProvider->setNextEvent(m_re); - // Event Count - ++m_totalEventCounter; - ATH_MSG_DEBUG("Number of Events in ByteStreamRDP_OutputSvc: " << m_totalEventCounter); - return(true); +// Receive the next event without explicit context +bool ByteStreamRDP_OutputSvc::putEvent(RawEvent* re) { + return putEvent(re, Gaudi::Hive::currentContext()); +} + +// Receive the next event +bool ByteStreamRDP_OutputSvc::putEvent(RawEvent* re, const EventContext& ctx) { + EventCache* cache = m_eventsCache.get(ctx); + cache->releaseEvent(); + const uint32_t reSize = re->fragment_size_word(); + const uint32_t* reStart = re->start(); + cache->dataBuffer = std::make_unique<uint32_t[]>(reSize); + std::copy(reStart, reStart+reSize, cache->dataBuffer.get()); + + // Create a cached RawEvent object from the cached data buffer + cache->rawEvent = std::make_unique<RawEvent>(cache->dataBuffer.get()); + + // Give the RawEvent to ROBDataProvider + m_robProvider->setNextEvent(ctx, cache->rawEvent.get()); + + return true; } StatusCode ByteStreamRDP_OutputSvc::queryInterface(const InterfaceID& riid, void** ppvInterface) { diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamRDP_OutputSvc.h b/Event/ByteStreamCnvSvc/src/ByteStreamRDP_OutputSvc.h index 249396214b640d33e8e6315252bd3e8e9f53cfe9..af2d3e1c4eda170085c6c015769655ce63cdb154 100644 --- a/Event/ByteStreamCnvSvc/src/ByteStreamRDP_OutputSvc.h +++ b/Event/ByteStreamCnvSvc/src/ByteStreamRDP_OutputSvc.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef BYTESTREAMRDP_OUTPUTSVC_H @@ -17,6 +17,7 @@ #include "ByteStreamData/RawEvent.h" #include "ByteStreamCnvSvc/ByteStreamOutputSvc.h" +#include "AthenaKernel/SlotSpecificObj.h" #include "GaudiKernel/ServiceHandle.h" class IROBDataProviderSvc; @@ -25,25 +26,32 @@ class ByteStreamRDP_OutputSvc: public ByteStreamOutputSvc { public: /// Constructors: ByteStreamRDP_OutputSvc(const std::string& name, ISvcLocator* svcloc); - /// Destructor. - virtual ~ByteStreamRDP_OutputSvc(); /// Required of all Gaudi Services - virtual StatusCode initialize(); + virtual StatusCode initialize() override; + /// Implementation of the ByteStreamOutputSvc interface methods. - virtual bool putEvent(RawEvent* re); + virtual bool putEvent(RawEvent* re) override; + virtual bool putEvent(RawEvent* re, const EventContext& ctx) override; /// Required of all Gaudi services: see Gaudi documentation for details - StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface); + StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override; private: // data - int m_totalEventCounter; //!< number of event counter - RawEvent* m_re; - OFFLINE_FRAGMENTS_NAMESPACE::DataType* m_buf; - ServiceHandle<IROBDataProviderSvc> m_robProvider; - -private: // properties - Gaudi::Property<std::string> m_bsOutputStreamName; //!< stream name for multiple output + struct EventCache { + void releaseEvent() { + this->rawEvent.reset(); + this->dataBuffer.reset(); + } + std::unique_ptr<RawEvent> rawEvent {nullptr}; //!< Current event fragment + std::unique_ptr<uint32_t[]> dataBuffer {nullptr}; //!< Underlying data structure + }; + SG::SlotSpecificObj<EventCache> m_eventsCache; //!< Cache of event data for each slot + + ServiceHandle<IROBDataProviderSvc> m_robProvider { + this, "ROBDataProviderSvc", "ROBDataProviderSvc", "ROB data provider"}; + Gaudi::Property<std::string> m_bsOutputStreamName { + this, "BSOutputStreamName", "", "Stream name for multiple output"}; }; #endif diff --git a/Event/ByteStreamCnvSvc/src/EventSelectorByteStream.cxx b/Event/ByteStreamCnvSvc/src/EventSelectorByteStream.cxx index 5991520c7c5732446820db900207478623caa31e..81355fb6fe19d372fc4270ef5559a573635d749f 100644 --- a/Event/ByteStreamCnvSvc/src/EventSelectorByteStream.cxx +++ b/Event/ByteStreamCnvSvc/src/EventSelectorByteStream.cxx @@ -1,13 +1,9 @@ -/* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -*/ - -//==================================================================== -// EventSelectorByteStream.cxx -//==================================================================== -// -// Include files. +/* Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "EventSelectorByteStream.h" + +#include <vector> +#include <algorithm> + #include "EventContextByteStream.h" #include "ByteStreamCnvSvc/ByteStreamInputSvc.h" #include "ByteStreamCnvSvcBase/ByteStreamAddress.h" @@ -28,38 +24,61 @@ #include "PersistentDataModel/DataHeader.h" #include "eformat/StreamTag.h" -#include <vector> -#include <algorithm> // Constructor. -EventSelectorByteStream::EventSelectorByteStream(const std::string& name, ISvcLocator* svcloc) - : base_class(name, svcloc) -{ - declareProperty("HelperTools", m_helperTools); - - // RunNumber, OldRunNumber and OverrideRunNumberFromInput are used - // to override the run number coming in on the input stream - m_runNo.verifier().setLower(0); - // The following properties are only for compatibility with - // McEventSelector and are not really used anywhere - // TODO: validate if those are even used - m_eventsPerRun.verifier().setLower(0); - m_firstEventNo.verifier().setLower(0); - m_firstLBNo.verifier().setLower(0); - m_eventsPerLB.verifier().setLower(0); - m_initTimeStamp.verifier().setLower(0); - - m_inputCollectionsProp.declareUpdateHandler(&EventSelectorByteStream::inputCollectionsHandler, this); -} -//________________________________________________________________________________ +EventSelectorByteStream::EventSelectorByteStream( + const std::string& name, + ISvcLocator* svcloc) + : base_class(name, svcloc) + , m_activeStoreSvc("ActiveStoreSvc", name) { + declareProperty("HelperTools", m_helperTools); + + // RunNumber, OldRunNumber and OverrideRunNumberFromInput are used + // to override the run number coming in on the input stream + m_runNo.verifier().setLower(0); + // The following properties are only for compatibility with + // McEventSelector and are not really used anywhere + // TODO(berghaus): validate if those are even used + m_eventsPerRun.verifier().setLower(0); + m_firstEventNo.verifier().setLower(0); + m_firstLBNo.verifier().setLower(0); + m_eventsPerLB.verifier().setLower(0); + m_initTimeStamp.verifier().setLower(0); + + m_inputCollectionsProp.declareUpdateHandler( + &EventSelectorByteStream::inputCollectionsHandler, + this); +} + + +/******************************************************************************/ void EventSelectorByteStream::inputCollectionsHandler(Property&) { - if (this->FSMState() != Gaudi::StateMachine::OFFLINE) { - this->reinit().ignore(); - } + if (this->FSMState() != Gaudi::StateMachine::OFFLINE) { + this->reinit().ignore(); + } } -//________________________________________________________________________________ + + +/******************************************************************************/ EventSelectorByteStream::~EventSelectorByteStream() { } + + +/******************************************************************************/ +StoreGateSvc* +EventSelectorByteStream::eventStore() const { + if (m_activeStoreSvc == 0) { + if (!m_activeStoreSvc.retrieve().isSuccess()) { + ATH_MSG_ERROR("Cannot get ActiveStoreSvc"); + throw GaudiException( + "Cannot get ActiveStoreSvc", name(), StatusCode::FAILURE); + } + } + + return(m_activeStoreSvc->activeStore()); +} + + //________________________________________________________________________________ StatusCode EventSelectorByteStream::initialize() { if (m_isSecondary.value()) { @@ -92,11 +111,6 @@ StatusCode EventSelectorByteStream::initialize() { ATH_MSG_FATAL("Cannot cast ByteStreamInputSvc"); return(StatusCode::FAILURE); } - m_eventSource->addRef(); - if (!m_evtStore.retrieve().isSuccess()) { - ATH_MSG_FATAL("Cannot get StoreGateSvc"); - return(StatusCode::FAILURE); - } // Get CounterTool (if configured) if (!m_counterTool.empty()) { @@ -653,13 +667,13 @@ StatusCode EventSelectorByteStream::recordAttributeList() const { std::string listName("EventInfoAtts"); - if (m_evtStore->contains<AthenaAttributeList>(listName)) { + if (eventStore()->contains<AthenaAttributeList>(listName)) { const AthenaAttributeList* oldAttrList = nullptr; - if (!m_evtStore->retrieve(oldAttrList, listName).isSuccess()) { + if (!eventStore()->retrieve(oldAttrList, listName).isSuccess()) { ATH_MSG_ERROR("Cannot retrieve old AttributeList from StoreGate."); return(StatusCode::FAILURE); } - if (!m_evtStore->removeDataAndProxy(oldAttrList).isSuccess()) { + if (!eventStore()->removeDataAndProxy(oldAttrList).isSuccess()) { ATH_MSG_ERROR("Cannot remove old AttributeList from StoreGate."); return(StatusCode::FAILURE); } @@ -673,7 +687,7 @@ StatusCode EventSelectorByteStream::recordAttributeList() const ATH_CHECK(fillAttributeList(attrList.get(), "", false)); // put result in event store - if (m_evtStore->record(std::move(attrList), listName).isFailure()) { + if (eventStore()->record(std::move(attrList), listName).isFailure()) { return StatusCode::FAILURE; } @@ -900,7 +914,7 @@ StatusCode EventSelectorByteStream::readEvent(int maxevt) { //________________________________________________________________________________ StatusCode EventSelectorByteStream::createAddress(const IEvtSelector::Context& /*it*/, IOpaqueAddress*& iop) const { - SG::DataProxy* proxy = m_evtStore->proxy(ClassID_traits<DataHeader>::ID(),"ByteStreamDataHeader"); + SG::DataProxy* proxy = eventStore()->proxy(ClassID_traits<DataHeader>::ID(),"ByteStreamDataHeader"); if (proxy !=0) { iop = proxy->address(); return(StatusCode::SUCCESS); diff --git a/Event/ByteStreamCnvSvc/src/EventSelectorByteStream.h b/Event/ByteStreamCnvSvc/src/EventSelectorByteStream.h index b44112d5dafd78e879a0982bbd83dbd75694c43e..412414862e192bd2f91a7fc0778e3ba6b0ade890 100644 --- a/Event/ByteStreamCnvSvc/src/EventSelectorByteStream.h +++ b/Event/ByteStreamCnvSvc/src/EventSelectorByteStream.h @@ -144,6 +144,7 @@ private: // internal member functions void nextFile() const; /// Search for event with number evtNum. int findEvent(int evtNum) const; + StoreGateSvc* eventStore() const; private: // properties /// IsSecondary, know if this is an instance of secondary event selector @@ -164,7 +165,7 @@ private: // properties mutable std::vector<std::string>::const_iterator m_inputCollectionsIterator; void inputCollectionsHandler(Property&); ServiceHandle<IIncidentSvc> m_incidentSvc{this, "IncidentSvc", "IncidentSvc", ""}; - ServiceHandle<StoreGateSvc> m_evtStore{this, "StoreGateSvc", "StoreGateSvc", ""}; + ServiceHandle<ActiveStoreSvc> m_activeStoreSvc; Gaudi::Property<long> m_skipEvents{this, "SkipEvents", 0, ""}; // Number of events to skip at the beginning Gaudi::Property<std::vector<long>> m_skipEventSequenceProp{this, "SkipEventSequence", {}, ""}; diff --git a/Event/EventContainers/CMakeLists.txt b/Event/EventContainers/CMakeLists.txt index 35dd151127216a77fbab369f14f1a22420c19bcd..13966852d9b4f540d4fb08514265de2d32a5a74d 100644 --- a/Event/EventContainers/CMakeLists.txt +++ b/Event/EventContainers/CMakeLists.txt @@ -23,8 +23,7 @@ atlas_add_library( EventContainers atlas_add_dictionary( EventContainersDict EventContainers/EventContainersDict.h EventContainers/selection.xml - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} EventContainers ) + LINK_LIBRARIES EventContainers ) atlas_add_test( IdCont SOURCES test/ID_ContainerTest.cxx @@ -50,4 +49,4 @@ atlas_add_test( IDBenchTest SOURCES test/IDC_Benchmark.cxx INCLUDE_DIRS src test EventContainers LINK_LIBRARIES Identifier AthenaKernel GaudiKernel EventContainers LOG_IGNORE_PATTERN "time" - ) \ No newline at end of file + ) diff --git a/Event/EventContainers/src/InternalOfflineFast.cxx b/Event/EventContainers/src/InternalOfflineFast.cxx index d3a799015a1db9bcd37499418c0ef409c6eeaf65..118d7c1df88584e54a7b96db1241ef61829aad4b 100644 --- a/Event/EventContainers/src/InternalOfflineFast.cxx +++ b/Event/EventContainers/src/InternalOfflineFast.cxx @@ -27,7 +27,8 @@ void InternalOfflineFast::wait() const { for(size_t i=0 ;i < m_fullMap.size(); ++i){ if(m_fullMap[i]) m_map.emplace_back(i, m_fullMap[i]); } - m_needsupdate.store(true); + m_map.shrink_to_fit(); + m_needsupdate.store(false); } std::vector<IdentifierHash> InternalOfflineFast::getAllCurrentHashes() const { @@ -70,7 +71,15 @@ size_t InternalOfflineFast::numberOfCollections() const { } void InternalOfflineFast::cleanUp(deleter_f* deleter) noexcept { - for(const auto& x : m_map) { deleter(x.second); m_fullMap[x.first] = nullptr; } + if(!m_needsupdate) { + for(const auto& x : m_map) { deleter(x.second); m_fullMap[x.first] = nullptr; } + if(!m_map.empty()) m_needsupdate.store(true, std::memory_order_relaxed); + } + else { + for(size_t i=0 ;i < m_fullMap.size(); ++i){ + if(m_fullMap[i]) deleter(m_fullMap[i]); + } + } m_map.clear(); } @@ -114,5 +123,10 @@ StatusCode InternalOfflineFast::fetchOrCreate(const std::vector<IdentifierHash>& } void InternalOfflineFast::destructor(deleter_f* deleter) noexcept { - for(const auto& x : m_map) deleter(x.second); + if(!m_needsupdate) for(const auto& x : m_map) deleter(x.second); + else { + for(size_t i=0 ;i < m_fullMap.size(); ++i){ + if(m_fullMap[i]) deleter(m_fullMap[i]); + } + } } diff --git a/Event/FourMom/FourMom/FourMomentumError.icc b/Event/FourMom/FourMom/FourMomentumError.icc index 1692cd4b7a47e66c0a01600fb466be9616ea4fed..770301b831457ee66ba5716f1c212664c0fa0d78 100644 --- a/Event/FourMom/FourMom/FourMomentumError.icc +++ b/Event/FourMom/FourMom/FourMomentumError.icc @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "FourMom/ErrorMatrixBase.h" @@ -65,19 +65,19 @@ FourMomentumError< FourMom>::FourMomentumError( const CLHEP::HepSymMatrix& m, m_PtCotThPhiM(nullptr) { if ( t == PxPyPzE) { - m_PxPyPzE = std::make_unique<ErrorMatrixPxPyPzE>( m); + m_PxPyPzE.store (std::make_unique<ErrorMatrixPxPyPzE>( m)); m_originalType = PxPyPzE; } if ( t == EEtaPhiM) { - m_EEtaPhiM = std::make_unique<ErrorMatrixEEtaPhiM>( m); + m_EEtaPhiM.store (std::make_unique<ErrorMatrixEEtaPhiM>( m)); m_originalType = EEtaPhiM; } if ( t == PtEtaPhiM) { - m_PtEtaPhiM = std::make_unique<ErrorMatrixPtEtaPhiM>( m); + m_PtEtaPhiM.store (std::make_unique<ErrorMatrixPtEtaPhiM>( m)); m_originalType = PtEtaPhiM; } if ( t == PtCotThPhiM) { - m_PtCotThPhiM = std::make_unique<ErrorMatrixPtCotThPhiM>( m); + m_PtCotThPhiM.store (std::make_unique<ErrorMatrixPtCotThPhiM>( m)); m_originalType = PtCotThPhiM; } } @@ -93,16 +93,16 @@ FourMomentumError< FourMom>::FourMomentumError( const FourMomentumError& other) m_originalType( other.originalType()) { if (other.originalType() == PxPyPzE) { - m_PxPyPzE = new ErrorMatrixPxPyPzE( *other.pxPyPzEMatrix()); + m_PxPyPzE.store (std::make_unique<ErrorMatrixPxPyPzE>( *other.pxPyPzEMatrix())); } else if (other.originalType() == EEtaPhiM) { - m_EEtaPhiM = new ErrorMatrixEEtaPhiM(*other.eEtaPhiMMatrix()); + m_EEtaPhiM.store (std::make_unique<ErrorMatrixEEtaPhiM>(*other.eEtaPhiMMatrix())); } else if (other.originalType() == PtEtaPhiM) { - m_PtEtaPhiM = new ErrorMatrixPtEtaPhiM( *other.ptEtaPhiMMatrix()); + m_PtEtaPhiM.store (std::make_unique<ErrorMatrixPtEtaPhiM>( *other.ptEtaPhiMMatrix())); } else if (other.originalType() == PtCotThPhiM) { - m_PtCotThPhiM = new ErrorMatrixPtCotThPhiM( *other.ptCotThPhiMMatrix()); + m_PtCotThPhiM.store (std::make_unique<ErrorMatrixPtCotThPhiM>( *other.ptCotThPhiMMatrix())); } } @@ -112,23 +112,23 @@ FourMomentumError< FourMom> &FourMomentumError<FourMom>::operator=( const FourMo { if (this!=&other){ m_p4( other.m_p4); - m_PxPyPzE = std::make_unique<ErrorMatrixPxPyPzE>(); - m_EEtaPhiM = std::make_unique<ErrorMatrixEEtaPhiM>(); - m_PtEtaPhiM = std::make_unique<ErrorMatrixPtEtaPhiM>(); - m_PtCotThPhiM = std::make_unique<ErrorMatrixPtCotThPhiM>(); + m_PxPyPzE.store (std::make_unique<ErrorMatrixPxPyPzE>()); + m_EEtaPhiM.store (std::make_unique<ErrorMatrixEEtaPhiM>()); + m_PtEtaPhiM.store (std::make_unique<ErrorMatrixPtEtaPhiM>()); + m_PtCotThPhiM.store (std::make_unique<ErrorMatrixPtCotThPhiM>()); m_originalType = other.originalType(); if (other.originalType() == PxPyPzE) { - m_PxPyPzE = new ErrorMatrixPxPyPzE( *other.pxPyPzEMatrix()); + m_PxPyPzE.store (std::make_unique<ErrorMatrixPxPyPzE>( *other.pxPyPzEMatrix())); } else if (other.originalType() == EEtaPhiM) { - m_EEtaPhiM = new ErrorMatrixEEtaPhiM(*other.eEtaPhiMMatrix()); + m_EEtaPhiM.store (std::make_unique<ErrorMatrixEEtaPhiM>(*other.eEtaPhiMMatrix())); } else if (other.originalType() == PtEtaPhiM) { - m_PtEtaPhiM = new ErrorMatrixPtEtaPhiM( *other.ptEtaPhiMMatrix()); + m_PtEtaPhiM.store (std::make_unique<ErrorMatrixPtEtaPhiM>( *other.ptEtaPhiMMatrix())); } else if (other.originalType() == PtCotThPhiM) { - m_PtCotThPhiM = new ErrorMatrixPtCotThPhiM( *other.ptCotThPhiMMatrix()); + m_PtCotThPhiM.store (std::make_unique<ErrorMatrixPtCotThPhiM>( *other.ptCotThPhiMMatrix())); } } return *this; diff --git a/Event/xAOD/xAODTauCnv/CMakeLists.txt b/Event/xAOD/xAODTauCnv/CMakeLists.txt index 8af1a94107850dbb4d4f70ffd093f3422007485b..bd43c731e295bcda4f8035a8d0f6f5dd7ae4505c 100644 --- a/Event/xAOD/xAODTauCnv/CMakeLists.txt +++ b/Event/xAOD/xAODTauCnv/CMakeLists.txt @@ -16,14 +16,20 @@ atlas_depends_on_subdirs( PUBLIC GaudiKernel ) +atlas_add_library( xAODTauCnvLib + xAODTauCnv/*.h + INTERFACE + PUBLIC_HEADERS xAODTauCnv + LINK_LIBRARIES GaudiKernel AthContainers xAODTau tauEvent ) + + # Component(s) in the package: atlas_add_component( xAODTauCnv src/*.cxx src/components/*.cxx - LINK_LIBRARIES AthContainers xAODTau tauEvent AthenaBaseComps AthenaKernel GaudiKernel ) + LINK_LIBRARIES xAODTauCnvLib xAODTau tauEvent AthenaBaseComps AthenaKernel GaudiKernel ) # Install files from the package: -atlas_install_headers( xAODTauCnv ) atlas_install_python_modules( python/*.py ) atlas_install_joboptions( share/*.py ) diff --git a/Event/xAOD/xAODTriggerCnv/CMakeLists.txt b/Event/xAOD/xAODTriggerCnv/CMakeLists.txt index 4088e6e022274dcaa28ee7c44520d2a08c8610aa..b4ebe224944dd2392132da7bded34f4d10ea9bb6 100644 --- a/Event/xAOD/xAODTriggerCnv/CMakeLists.txt +++ b/Event/xAOD/xAODTriggerCnv/CMakeLists.txt @@ -9,8 +9,10 @@ atlas_subdir( xAODTriggerCnv ) # Extra dependencies, based on the build environment: if( XAOD_STANDALONE ) set( extra_deps PRIVATE Control/xAODRootAccess ) + set( interface_extra_libs ) elseif( XAOD_ANALYSIS ) set( extra_deps GaudiKernel Control/AthenaKernel ) + set( interface_extra_libs GaudiKernel ) else() set( extra_deps GaudiKernel PRIVATE @@ -25,8 +27,10 @@ else() Trigger/TrigEvent/TrigDecisionEvent Trigger/TrigEvent/TrigDecisionInterface Trigger/TrigEvent/TrigSteeringEvent ) + set( interface_extra_libs GaudiKernel ) endif() + # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC @@ -34,6 +38,13 @@ atlas_depends_on_subdirs( Event/xAOD/xAODTrigger ${extra_deps} ) +atlas_add_library( xAODTriggerCnvLib + xAODTriggerCnv/*.h + INTERFACE + PUBLIC_HEADERS xAODTriggerCnv + LINK_LIBRARIES ${interface_extra_libs} xAODTrigger AsgTools ) + + # Build the package differently in standalone and Athena modes: if( XAOD_STANDALONE ) @@ -41,7 +52,7 @@ if( XAOD_STANDALONE ) atlas_add_library( xAODTriggerCnv xAODTriggerCnv/*.h Root/*.cxx PUBLIC_HEADERS xAODTriggerCnv - LINK_LIBRARIES AsgTools xAODTrigger ) + LINK_LIBRARIES xAODTriggerCnvLib AsgTools xAODTrigger ) # Plus we also build a dictionary: atlas_add_dictionary( xAODTriggerCnvDict @@ -64,20 +75,19 @@ elseif( XAOD_ANALYSIS ) # The main library is a component one in this case: atlas_add_component( xAODTriggerCnv xAODTriggerCnv/*.h Root/*.cxx src/components/*.cxx - LINK_LIBRARIES AsgTools xAODTrigger GaudiKernel ) + LINK_LIBRARIES xAODTriggerCnvLib AsgTools xAODTrigger GaudiKernel ) else() # The main library is a component one in this case: atlas_add_component( xAODTriggerCnv xAODTriggerCnv/*.h src/*.cxx Root/*.cxx src/components/*.cxx - LINK_LIBRARIES AsgTools xAODTrigger GaudiKernel AthenaBaseComps + LINK_LIBRARIES xAODTriggerCnvLib AsgTools xAODTrigger GaudiKernel AthenaBaseComps AthenaKernel StoreGateLib SGtests EventInfo AnalysisTriggerEvent - TrigConfHLTData TrigDecisionEvent TrigSteeringEvent ) + TrigConfHLTData TrigDecisionEvent TrigSteeringEvent TrigConfInterfaces TrigDecisionInterface TrigAnalysisInterfaces ) endif() # Install files from the package: -atlas_install_headers( xAODTriggerCnv ) atlas_install_python_modules( python/*.py ) atlas_install_joboptions( share/*.py ) diff --git a/Event/xAOD/xAODTruthCnv/src/HepMCTruthReader.cxx b/Event/xAOD/xAODTruthCnv/src/HepMCTruthReader.cxx index 63e6a7e50bfac8b466acdcdf6e0102420597167c..bb5b253bb65c2eb86278aa17c086998e27db3f4c 100644 --- a/Event/xAOD/xAODTruthCnv/src/HepMCTruthReader.cxx +++ b/Event/xAOD/xAODTruthCnv/src/HepMCTruthReader.cxx @@ -217,7 +217,7 @@ void HepMCTruthReader::printParticle(const HepMC::GenParticlePtr particle) { cout << particle->momentum().e() << " "; cout.setf(ios::fmtflags(0), ios::floatfield); cout.unsetf(ios_base::showpos); - if ( particle->has_decayed() ) { + if ( particle->status()==2 ) { if ( HepMC::barcode(particle->end_vertex())!=0 ) { cout.width(3); cout << particle->status() << " "; diff --git a/Event/xAOD/xAODTruthCnv/src/xAODTruthCnvAlg.cxx b/Event/xAOD/xAODTruthCnv/src/xAODTruthCnvAlg.cxx index be134d9c472abea3952950efb5e1e2d3aca1d96d..6a3698116ebbbb21f2f3c51db4daaf87d5774020 100644 --- a/Event/xAOD/xAODTruthCnv/src/xAODTruthCnvAlg.cxx +++ b/Event/xAOD/xAODTruthCnv/src/xAODTruthCnvAlg.cxx @@ -269,7 +269,9 @@ namespace xAODMaker { // Get the beam particles pair<HepMC::GenParticlePtr,HepMC::GenParticlePtr> beamParticles; - if ( genEvt->valid_beam_particles() ) beamParticles = genEvt->beam_particles(); + bool genEvt_valid_beam_particles=false; + genEvt_valid_beam_particles=genEvt->valid_beam_particles(); + if ( genEvt_valid_beam_particles ) beamParticles = genEvt->beam_particles(); for (HepMC::GenEvent::particle_const_iterator pitr=genEvt->particles_begin(); pitr!=genEvt->particles_end(); ++pitr) { // (a) create TruthParticle xAOD::TruthParticle* xTruthParticle = new xAOD::TruthParticle(); @@ -285,7 +287,7 @@ namespace xAODMaker { if (!isSignalProcess) truthLinkVec->push_back(new xAODTruthParticleLink(HepMcParticleLink((*pitr),genEvt->event_number()), eltp)); // Is this one of the beam particles? - if (genEvt->valid_beam_particles()) { + if (genEvt_valid_beam_particles) { if (isSignalProcess) { if (*pitr == beamParticles.first) xTruthEvent->setBeamParticle1Link(eltp); if (*pitr == beamParticles.second) xTruthEvent->setBeamParticle2Link(eltp); diff --git a/ForwardDetectors/ForwardSimulation/ForwardRegionMgField/CMakeLists.txt b/ForwardDetectors/ForwardSimulation/ForwardRegionMgField/CMakeLists.txt index cace318da5ffb1225706a018181842e05781ddb1..c8521a440393a8e4054e01b65be4724a72439f5f 100644 --- a/ForwardDetectors/ForwardSimulation/ForwardRegionMgField/CMakeLists.txt +++ b/ForwardDetectors/ForwardSimulation/ForwardRegionMgField/CMakeLists.txt @@ -23,7 +23,7 @@ atlas_add_component( ForwardRegionMgField src/*.cxx src/components/*.cxx INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} GaudiKernel AthenaBaseComps MagFieldInterfaces PathResolver ) + LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} GaudiKernel AthenaBaseComps MagFieldInterfaces PathResolver ForwardRegionGeoModelLib ) # Install files from the package: atlas_install_runtime( share/*.dat ) diff --git a/ForwardDetectors/ZDC/ZdcRec/src/ZdcRecChannelToolV2.cxx b/ForwardDetectors/ZDC/ZdcRec/src/ZdcRecChannelToolV2.cxx index cbae6914fb23b906694e3999fc9d3821d0de1338..4753bff93338018bad8e0c5f516954046cf01f8f 100644 --- a/ForwardDetectors/ZDC/ZdcRec/src/ZdcRecChannelToolV2.cxx +++ b/ForwardDetectors/ZDC/ZdcRec/src/ZdcRecChannelToolV2.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /* @@ -337,10 +337,6 @@ int ZdcRecChannelToolV2::makeWaveformFromDigits(xAOD::ZdcModule& module) const //================================================================================================== int ZdcRecChannelToolV2::makeRawFromDigits(xAOD::ZdcModuleContainer& ChannelCollection) const { - - Identifier id; - - msg(MSG::DEBUG) << "--> ZDC : ZdcRecChannelToolV2 ChannelCollection size " << ChannelCollection.size() << endmsg ; return 0; } diff --git a/Generators/AtlasHepMC/AtlasHepMC/GenEvent.h b/Generators/AtlasHepMC/AtlasHepMC/GenEvent.h index 8d574751cca9e9726311b607f39145300772d794..27bb413999ee7f89afe8b59f9b5e9334d77f5a85 100644 --- a/Generators/AtlasHepMC/AtlasHepMC/GenEvent.h +++ b/Generators/AtlasHepMC/AtlasHepMC/GenEvent.h @@ -3,6 +3,93 @@ */ #ifndef ATLASHEPMC_GENEVENT_H #define ATLASHEPMC_GENEVENT_H +#ifdef HEPMC3 +#undef private +#undef protected +#include "HepMC3/GenEvent.h" +#include "HepMC3/GenHeavyIon.h" +#include "HepMC3/PrintStreams.h" +#include "AtlasHepMC/GenVertex.h" +#include "AtlasHepMC/GenParticle.h" +namespace HepMC3 +{ +inline std::vector<HepMC3::GenParticlePtr>::const_iterator begin(HepMC3::GenEvent& e){ return e.particles().begin(); } +inline std::vector<HepMC3::GenParticlePtr>::const_iterator end(HepMC3::GenEvent& e){ return e.particles().end(); } +inline std::vector<HepMC3::ConstGenParticlePtr>::const_iterator begin(const HepMC3::GenEvent& e){ return e.particles().begin(); } +inline std::vector<HepMC3::ConstGenParticlePtr>::const_iterator end(const HepMC3::GenEvent& e){ return e.particles().end(); } +} + +namespace HepMC { +using Print=HepMC3::Print; +using GenHeavyIon=HepMC3::GenHeavyIon; +using GenEvent=HepMC3::GenEvent; + +inline std::vector<HepMC3::GenParticlePtr>::const_iterator begin(HepMC3::GenEvent& e){ return e.particles().begin(); } +inline std::vector<HepMC3::GenParticlePtr>::const_iterator end(HepMC3::GenEvent& e){ return e.particles().end(); } +inline std::vector<HepMC3::ConstGenParticlePtr>::const_iterator begin(const HepMC3::GenEvent& e){ return e.particles().begin(); } +inline std::vector<HepMC3::ConstGenParticlePtr>::const_iterator end(const HepMC3::GenEvent& e){ return e.particles().end(); } + +inline GenEvent* newGenEvent(const int signal_process_id, const int event_number ){ GenEvent* e= new GenEvent(); +std::shared_ptr<HepMC3::IntAttribute> signal_process_id_A = std::make_shared<HepMC3::IntAttribute>(signal_process_id); +e->add_attribute("signal_process_id",signal_process_id_A); +e->set_event_number(event_number); +return e; +} + +inline GenVertexPtr barcode_to_vertex(const GenEvent* e, int id ){ +auto vertices=((GenEvent*)e)->vertices(); +for (auto v: vertices) +{ +auto barcode_attr=e->attribute<HepMC3::IntAttribute>("barcode"); +if (!barcode_attr) continue; +if (barcode_attr->value()==id) return v; +} +if (-id>0&&-id<(int)vertices.size()) return vertices[-id]; +return HepMC3::GenVertexPtr(); +} + +inline GenParticlePtr barcode_to_particle(const GenEvent* e, int id ){ +auto particles=((GenEvent*)e)->particles(); +for (auto p: particles) +{ +auto barcode_attr=p->attribute<HepMC3::IntAttribute>("barcode"); +if (!barcode_attr) continue; +if (barcode_attr->value()==id) return p; +} +if (id>0&&id<(int)particles.size()) return particles[id]; +return HepMC3::GenParticlePtr(); +} + + +inline int signal_process_id(const GenEvent evt) { +std::shared_ptr<HepMC3::IntAttribute> A_signal_process_id=evt.attribute<HepMC3::IntAttribute>("signal_process_id"); + return A_signal_process_id?(A_signal_process_id->value()):0; +} +inline int signal_process_id(const GenEvent* evt) { +std::shared_ptr<HepMC3::IntAttribute> A_signal_process_id=evt->attribute<HepMC3::IntAttribute>("signal_process_id"); + return A_signal_process_id?(A_signal_process_id->value()):0; +} +namespace Print { +inline void line(std::ostream& os,const GenEvent& e){e.print(os);} +inline void line(std::ostream& os,const GenEvent* e){e->print(os);} +} +inline bool valid_beam_particles(const GenEvent* e){return e->valid_beam_particles();} + +inline void set_signal_process_id(GenEvent* e, const int i=0) { std::shared_ptr<HepMC3::IntAttribute> signal_process_id = std::make_shared<HepMC3::IntAttribute>(i); + e->add_attribute("signal_process_id",signal_process_id); } +inline void set_random_states(GenEvent* e, std::vector<long int>& a) { + e->add_attribute("random_states",std::make_shared<HepMC3::VectorLongIntAttribute>(a)); +} +template <class T> void set_signal_process_vertex(GenEvent* e, T v){ +if (!v) return; +if (v->parent_event()!=e) return; +v->add_attribute("signal_process_vertex",std::make_shared<HepMC3::IntAttribute>(1)); +} +inline ConstGenVertexPtr signal_process_vertex(const GenEvent* e) { for (auto v: e->vertices()) if (v->attribute<HepMC3::IntAttribute>("signal_process_vertex")) return v; return nullptr; } +inline GenVertexPtr signal_process_vertex(GenEvent* e) { for (auto v: e->vertices()) if (v->attribute<HepMC3::IntAttribute>("signal_process_vertex")) return v; return nullptr; } +inline bool valid_beam_particles(const GenEvent* e){ if (!e) return false; if (e->beams().size()!=2) return false; return true;} +} +#else #include "HepMC/GenEvent.h" #include "HepMC/GenVertex.h" #include "AtlasHepMC/GenVertex.h" @@ -38,3 +125,4 @@ inline bool valid_beam_particles(const GenEvent* e){return e->valid_beam_particl } #include "AtlasHepMC/SimpleVector.h" #endif +#endif diff --git a/Generators/AtlasHepMC/AtlasHepMC/GenEvent_fwd.h b/Generators/AtlasHepMC/AtlasHepMC/GenEvent_fwd.h index cea90d473a2737490e24494654f1b7ae4cb2c3a0..e7113d8ee86a94273a938281cd1164e0bc5a9e81 100644 --- a/Generators/AtlasHepMC/AtlasHepMC/GenEvent_fwd.h +++ b/Generators/AtlasHepMC/AtlasHepMC/GenEvent_fwd.h @@ -3,7 +3,14 @@ */ #ifndef ATLASHEPMC_GENEVENTFWD_H #define ATLASHEPMC_GENEVENTFWD_H +#ifdef HEPMC3 +namespace HepMC3 { class GenEvent; } +namespace HepMC { +using GenEvent=HepMC3::GenEvent; +} +#else namespace HepMC { class GenEvent; } #endif +#endif diff --git a/Generators/AtlasHepMC/AtlasHepMC/GenParticle.h b/Generators/AtlasHepMC/AtlasHepMC/GenParticle.h index d96e0e501729257f36efc86a34610d2c8f131ff6..a90880fb7d094f547919245be529a11697da3c7a 100644 --- a/Generators/AtlasHepMC/AtlasHepMC/GenParticle.h +++ b/Generators/AtlasHepMC/AtlasHepMC/GenParticle.h @@ -3,6 +3,35 @@ */ #ifndef ATLASHEPMC_GENPARTICLE_H #define ATLASHEPMC_GENPARTICLE_H +#ifdef HEPMC3 +#include "HepMC3/GenParticle.h" +#include "HepMC3/PrintStreams.h" +#include "AtlasHepMC/Polarization.h" +#include "AtlasHepMC/Flow.h" +namespace HepMC { +typedef HepMC3::GenParticlePtr GenParticlePtr; +typedef HepMC3::ConstGenParticlePtr ConstGenParticlePtr; +inline GenParticlePtr newGenParticlePtr(const HepMC3::FourVector &mom = HepMC3::FourVector::ZERO_VECTOR(), int pid = 0, int status = 0) { + return std::make_shared<HepMC3::GenParticle>(mom,pid,status); +} +inline GenParticlePtr newGenParticlePtr(const HepMC3::FourVector &mom, int pid , int status , HepMC::Flow fl, HepMC::Polarization pol) { + return std::make_shared<HepMC3::GenParticle>(mom,pid,status); +} +inline int barcode(GenParticlePtr p){ + std::shared_ptr<HepMC3::IntAttribute> barcode=p->attribute<HepMC3::IntAttribute>("barcode"); + return barcode?(barcode->value()):0; +} +inline int barcode(ConstGenParticlePtr p){ + std::shared_ptr<HepMC3::IntAttribute> barcode=p->attribute<HepMC3::IntAttribute>("barcode"); + return barcode?(barcode->value()):0; +} +inline int barcode(const HepMC3::GenParticle p){ + std::shared_ptr<HepMC3::IntAttribute> barcode=p.attribute<HepMC3::IntAttribute>("barcode"); + return barcode?(barcode->value()):0; +} +template <class T> void suggest_barcode(T p, int i){p->add_attribute("barcode",std::make_shared<HepMC3::IntAttribute>(i));} +} +#else #include "HepMC/GenParticle.h" namespace HepMC { typedef GenParticle* GenParticlePtr; @@ -12,6 +41,7 @@ inline GenParticlePtr newGenParticlePtr(const HepMC::FourVector &mom = HepMC::Fo } inline int barcode(GenParticle p) { return p.barcode(); } template <class T> inline int barcode(T p) { return p->barcode(); } +template <class T> void suggest_barcode(T p, int i){p->suggest_barcode(i);} inline void suggest_barcode(GenParticle p, int i){p.suggest_barcode(i);} template <class T> void suggest_barcode(T* p, int i){p->suggest_barcode(i);} namespace Print { @@ -20,3 +50,4 @@ inline void line(std::ostream& os,const GenParticle* p){p->print(os);} } } #endif +#endif diff --git a/Generators/AtlasHepMC/AtlasHepMC/GenParticle_fwd.h b/Generators/AtlasHepMC/AtlasHepMC/GenParticle_fwd.h index 15f0ac57861cc47993a7cf724f74579c20bb8a36..06e26fead4d681b2e6fb979afc8eab42ac9952d7 100644 --- a/Generators/AtlasHepMC/AtlasHepMC/GenParticle_fwd.h +++ b/Generators/AtlasHepMC/AtlasHepMC/GenParticle_fwd.h @@ -3,8 +3,16 @@ */ #ifndef ATLASHEPMC_GENPARTICLEFWD_H #define ATLASHEPMC_GENPARTICLEFWD_H +#ifdef HEPMC3 +#include "HepMC3/GenParticle_fwd.h" +namespace HepMC { +typedef HepMC3::GenParticlePtr GenParticlePtr; +typedef HepMC3::ConstGenParticlePtr ConstGenParticlePtr; +} +#else namespace HepMC { class GenParticle; typedef GenParticle* GenParticlePtr; } #endif +#endif diff --git a/Generators/AtlasHepMC/AtlasHepMC/GenRanges.h b/Generators/AtlasHepMC/AtlasHepMC/GenRanges.h index f07a1886e972f1b12bdb4eaa232bcafb03a47376..57349312ef42785f288cef5a067f239209d1da58 100644 --- a/Generators/AtlasHepMC/AtlasHepMC/GenRanges.h +++ b/Generators/AtlasHepMC/AtlasHepMC/GenRanges.h @@ -3,5 +3,9 @@ */ #ifndef ATLASHEPMC_GENRANGES_H #define ATLASHEPMC_GENRANGES_H +#ifdef HEPMC3 +#include "HepMC3/Version.h" +#else #include "HepMC/GenRanges.h" #endif +#endif diff --git a/Generators/AtlasHepMC/AtlasHepMC/GenVertex.h b/Generators/AtlasHepMC/AtlasHepMC/GenVertex.h index 8b7c2eb2e8d75e097aa4ca648f7c64ddef64553f..2130d84475ecf36d765e87adb11022d78bf7d954 100644 --- a/Generators/AtlasHepMC/AtlasHepMC/GenVertex.h +++ b/Generators/AtlasHepMC/AtlasHepMC/GenVertex.h @@ -3,12 +3,49 @@ */ #ifndef ATLASHEPMC_GENVERTEX_H #define ATLASHEPMC_GENVERTEX_H +#ifdef HEPMC3 +#include "HepMC3/GenVertex.h" +#include "HepMC3/PrintStreams.h" +namespace HepMC { +typedef HepMC3::GenVertexPtr GenVertexPtr; +typedef HepMC3::ConstGenVertexPtr ConstGenVertexPtr; +inline GenVertexPtr newGenVertexPtr(const HepMC3::FourVector &pos = HepMC3::FourVector::ZERO_VECTOR(),const int i=0) { + GenVertexPtr v=std::make_shared<HepMC3::GenVertex>(pos); + v->set_status(i); + return v; +} +inline int barcode(GenVertexPtr p){ + std::shared_ptr<HepMC3::IntAttribute> barcode=p->attribute<HepMC3::IntAttribute>("barcode"); + return barcode?(barcode->value()):0; +} +inline int barcode(ConstGenVertexPtr p){ + std::shared_ptr<HepMC3::IntAttribute> barcode=p->attribute<HepMC3::IntAttribute>("barcode"); + return barcode?(barcode->value()):0; +} +inline int barcode(HepMC3::GenVertex p){ + std::shared_ptr<HepMC3::IntAttribute> barcode=p.attribute<HepMC3::IntAttribute>("barcode"); + return barcode?(barcode->value()):0; +} + +inline std::vector<HepMC3::GenVertexPtr> DESCENDANTS(HepMC3::GenVertexPtr endvtx) +{ +return std::vector<HepMC3::GenVertexPtr>(); +} +inline std::vector<HepMC3::ConstGenVertexPtr> DESCENDANTS(HepMC3::ConstGenVertexPtr endvtx) +{ +return std::vector<HepMC3::ConstGenVertexPtr>(); +} +inline void* raw_pointer(GenVertexPtr p){ return p.get();} +} +#else #include "HepMC/GenVertex.h" namespace HepMC { typedef HepMC::GenVertex* GenVertexPtr; -typedef HepMC::GenVertex* ConstGenVertexPtr; +typedef HepMC::GenVertex* const ConstGenVertexPtr; inline GenVertexPtr newGenVertexPtr(const HepMC::FourVector &pos = HepMC::FourVector(0.0,0.0,0.0,0.0), const int i=0) { return new HepMC::GenVertex(pos,i); } +inline int barcode(ConstGenVertexPtr p){ return p->barcode();} } #endif +#endif diff --git a/Generators/AtlasHepMC/AtlasHepMC/GenVertex_fwd.h b/Generators/AtlasHepMC/AtlasHepMC/GenVertex_fwd.h index 2c98b4f9dafe17533e948790226012f9efb13b6e..680b4f2d6303d1b1757d0880d630288bad920d58 100644 --- a/Generators/AtlasHepMC/AtlasHepMC/GenVertex_fwd.h +++ b/Generators/AtlasHepMC/AtlasHepMC/GenVertex_fwd.h @@ -3,8 +3,16 @@ */ #ifndef ATLASHEPMC_GENVERTEXFWD_H #define ATLASHEPMC_GENVERTEXFWD_H +#ifdef HEPMC3 +#include "HepMC3/GenVertex_fwd.h" +namespace HepMC { +typedef HepMC3::GenVertexPtr GenVertexPtr; +typedef HepMC3::ConstGenVertexPtr ConstGenVertexPtr; +} +#else namespace HepMC { class GenVertex; typedef HepMC::GenVertex* GenVertexPtr; } #endif +#endif diff --git a/Generators/AtlasHepMC/AtlasHepMC/HEPEVT_Wrapper.h b/Generators/AtlasHepMC/AtlasHepMC/HEPEVT_Wrapper.h index 40434b23f35ef4cfec50a647bc722fd1bf2ea8b7..6c9e621462eb4b0c13dc35fcc45f8c1f8bfe7f85 100644 --- a/Generators/AtlasHepMC/AtlasHepMC/HEPEVT_Wrapper.h +++ b/Generators/AtlasHepMC/AtlasHepMC/HEPEVT_Wrapper.h @@ -3,5 +3,13 @@ */ #ifndef ATLASHEPMC_HEPEVTWRAPPER_H #define ATLASHEPMC_HEPEVTWRAPPER_H +#ifdef HEPMC3 +#include "HepMC3/HEPEVT_Wrapper.h" +namespace HepMC +{ +typedef HepMC3::HEPEVT_Wrapper HEPEVT_Wrapper; +} +#else #include "HepMC/HEPEVT_Wrapper.h" #endif +#endif diff --git a/Generators/AtlasHepMC/AtlasHepMC/HeavyIon.h b/Generators/AtlasHepMC/AtlasHepMC/HeavyIon.h index d5019486d16f499e78182cd4a15962da2d8b612f..36f5c2484fb8759666e85e2ef132ffb9464a6d9b 100644 --- a/Generators/AtlasHepMC/AtlasHepMC/HeavyIon.h +++ b/Generators/AtlasHepMC/AtlasHepMC/HeavyIon.h @@ -3,5 +3,14 @@ */ #ifndef ATLASHEPMC_HEAVYION_H #define ATLASHEPMC_HEAVYION_H +#ifdef HEPMC3 +#include "HepMC3/GenHeavyIon.h" +#include "HepMC3/PrintStreams.h" +namespace HepMC { +typedef HepMC3::GenHeavyIonPtr GenHeavyIonPtr; +typedef HepMC3::GenHeavyIon GenHeavyIon; +} +#else #include "HepMC/HeavyIon.h" #endif +#endif diff --git a/Generators/AtlasHepMC/AtlasHepMC/IO_AsciiParticles.h b/Generators/AtlasHepMC/AtlasHepMC/IO_AsciiParticles.h index f08aa07f05ccabcabe8d0bcc1f111ba17e2cbbe9..2988e277731d4aa02b1cfe4c1de7d94e4384bd23 100644 --- a/Generators/AtlasHepMC/AtlasHepMC/IO_AsciiParticles.h +++ b/Generators/AtlasHepMC/AtlasHepMC/IO_AsciiParticles.h @@ -3,5 +3,9 @@ */ #ifndef ATLASHEPMC_IOASCIIPARTICLES_H #define ATLASHEPMC_IOASCIIPARTICLES_H +#ifdef HEPMC3 +#include "HepMC3/Version.h" +#else #include "HepMC/IO_AsciiParticles.h" #endif +#endif diff --git a/Generators/AtlasHepMC/AtlasHepMC/IO_BaseClass.h b/Generators/AtlasHepMC/AtlasHepMC/IO_BaseClass.h index b41a56970177b93c0d3ec35e5f846b03172d385a..26a0e105b4a2a62271601735386ecf824f8556e2 100644 --- a/Generators/AtlasHepMC/AtlasHepMC/IO_BaseClass.h +++ b/Generators/AtlasHepMC/AtlasHepMC/IO_BaseClass.h @@ -3,5 +3,9 @@ */ #ifndef ATLASHEPMC_IOBASECLASS_H #define ATLASHEPMC_IOBASECLASS_H +#ifdef HEPMC3 +#include "HepMC3/Version.h" +#else #include "HepMC/IO_BaseClass.h" #endif +#endif diff --git a/Generators/AtlasHepMC/AtlasHepMC/IO_GenEvent.h b/Generators/AtlasHepMC/AtlasHepMC/IO_GenEvent.h index 145f50b91cba9e6635fda35b5afdb07cb19cb55d..93d4a0254f7efefc55187cf11e8dde33f47eeda9 100644 --- a/Generators/AtlasHepMC/AtlasHepMC/IO_GenEvent.h +++ b/Generators/AtlasHepMC/AtlasHepMC/IO_GenEvent.h @@ -3,5 +3,18 @@ */ #ifndef ATLASHEPMC_IOGENEVENT_H #define ATLASHEPMC_IOGENEVENT_H +#ifdef HEPMC3 +#include "HepMC3/Version.h" +#include "HepMC3/Reader.h" +#include "HepMC3/Writer.h" +#include "HepMC3/ReaderAsciiHepMC2.h" +#include "HepMC3/WriterAsciiHepMC2.h" +namespace HepMC +{ +typedef HepMC3::WriterAsciiHepMC2 WriterAsciiHepMC2; +typedef HepMC3::ReaderAsciiHepMC2 ReaderAsciiHepMC2; +} +#else #include "HepMC/IO_GenEvent.h" #endif +#endif diff --git a/Generators/AtlasHepMC/AtlasHepMC/IO_HEPEVT.h b/Generators/AtlasHepMC/AtlasHepMC/IO_HEPEVT.h index 95152b32ebc554585b71daefb2cb957261a980cd..681ae7f2bdcbfdc82888436f2d53e7d46eb47858 100644 --- a/Generators/AtlasHepMC/AtlasHepMC/IO_HEPEVT.h +++ b/Generators/AtlasHepMC/AtlasHepMC/IO_HEPEVT.h @@ -3,5 +3,10 @@ */ #ifndef ATLASHEPMC_IOHEPEVT_H #define ATLASHEPMC_IOHEPEVT_H +#ifdef HEPMC3 +#include "HepMC3/Version.h" +#include "HepMC3/HEPEVT_Wrapper.h" +#else #include "HepMC/IO_HEPEVT.h" #endif +#endif diff --git a/Generators/AtlasHepMC/AtlasHepMC/IO_HERWIG.h b/Generators/AtlasHepMC/AtlasHepMC/IO_HERWIG.h index 9eb2314399e0e3c51446b928f5a45d8891eebe16..f6567ecb4d4dc7de8727a8a11bf63c8ed36f9ac0 100644 --- a/Generators/AtlasHepMC/AtlasHepMC/IO_HERWIG.h +++ b/Generators/AtlasHepMC/AtlasHepMC/IO_HERWIG.h @@ -3,5 +3,9 @@ */ #ifndef ATLASHEPMC_IOHERWIG_H #define ATLASHEPMC_IOHERWIG_H +#ifdef HEPMC3 +#include "HepMC3/Version.h" +#else #include "HepMC/IO_HERWIG.h" #endif +#endif diff --git a/Generators/AtlasHepMC/AtlasHepMC/PdfInfo.h b/Generators/AtlasHepMC/AtlasHepMC/PdfInfo.h index bf074824222a744e0edee01cf54db14ced225ab5..7b2455445501118b5caac2fb057a54327ff9dab4 100644 --- a/Generators/AtlasHepMC/AtlasHepMC/PdfInfo.h +++ b/Generators/AtlasHepMC/AtlasHepMC/PdfInfo.h @@ -3,9 +3,18 @@ */ #ifndef ATLASHEPMC_PDFINFO_H #define ATLASHEPMC_PDFINFO_H +#ifdef HEPMC3 +#include "HepMC3/GenEvent.h" +#include "HepMC3/PrintStreams.h" +namespace HepMC +{ +typedef std::shared_ptr<HepMC3::GenPdfInfo> GenPdfInfoPtr; +} +#else #include "HepMC/PdfInfo.h" namespace HepMC { typedef HepMC::PdfInfo* GenPdfInfoPtr; } #endif +#endif diff --git a/Generators/AtlasHepMC/AtlasHepMC/Polarization.h b/Generators/AtlasHepMC/AtlasHepMC/Polarization.h index 65033c4dff71973bc28b9e8a489bedaeec155b5c..c637be312b2f081984b71f51e47ed4106728057e 100644 --- a/Generators/AtlasHepMC/AtlasHepMC/Polarization.h +++ b/Generators/AtlasHepMC/AtlasHepMC/Polarization.h @@ -3,6 +3,36 @@ */ #ifndef ATLASHEPMC_POLARIZATION_H #define ATLASHEPMC_POLARIZATION_H +#ifdef HEPMC3 +#include "HepMC3/GenParticle.h" +#include "HepMC3/Attribute.h" +namespace HepMC +{ +class Polarization { +public: +Polarization( const double a=0.0, const double b=0.0): m_theta(a), m_phi(b) {}; +~Polarization(){}; +double theta() const { return m_theta;} +double phi() const { return m_phi;} +bool is_defined() const { if (std::abs(m_theta)<0.00001&&std::abs(m_phi)<0.00001) return false; return true; } +private: +double m_theta; +double m_phi; +}; +inline Polarization polarization(HepMC3::GenParticlePtr a){ + std::shared_ptr<HepMC3::DoubleAttribute> phi_A =a->attribute<HepMC3::DoubleAttribute>("phi"); + std::shared_ptr<HepMC3::DoubleAttribute> theta_A=a->attribute<HepMC3::DoubleAttribute>("theta"); + double phi=(phi_A?phi_A->value():0.0); + double theta=(theta_A?theta_A->value():0.0); + return Polarization(theta,phi); +} +template<class T> void set_polarization( T a, Polarization b) +{ +a->add_attribute("phi",std::make_shared<HepMC3::DoubleAttribute>(b.phi())); +a->add_attribute("theta",std::make_shared<HepMC3::DoubleAttribute>(b.theta())); +} +} +#else #include "HepMC/Polarization.h" namespace HepMC { @@ -14,3 +44,4 @@ template<class T> Polarization polarization(T a) { } } #endif +#endif diff --git a/Generators/AtlasHepMC/AtlasHepMC/SimpleVector.h b/Generators/AtlasHepMC/AtlasHepMC/SimpleVector.h index fe7a493ae59628c22a0bd1f19eaf096fe0820490..d65497de6d753075da90b94f1c294fbd4eafd9cd 100644 --- a/Generators/AtlasHepMC/AtlasHepMC/SimpleVector.h +++ b/Generators/AtlasHepMC/AtlasHepMC/SimpleVector.h @@ -3,5 +3,14 @@ */ #ifndef ATLASHEPMC_SIMPLEVECTOR_H #define ATLASHEPMC_SIMPLEVECTOR_H +#ifdef HEPMC3 +#include "HepMC3/FourVector.h" +#include "HepMC3/PrintStreams.h" +namespace HepMC +{ +typedef HepMC3::FourVector FourVector; +} +#else #include "HepMC/SimpleVector.h" #endif +#endif diff --git a/Generators/AtlasHepMC/AtlasHepMC/WeightContainer.h b/Generators/AtlasHepMC/AtlasHepMC/WeightContainer.h index ec680f6373c70877463ee5da54d940865cedda41..5dd69b24860844deac773cef6c7509b6ef56b189 100644 --- a/Generators/AtlasHepMC/AtlasHepMC/WeightContainer.h +++ b/Generators/AtlasHepMC/AtlasHepMC/WeightContainer.h @@ -3,5 +3,9 @@ */ #ifndef ATLASHEPMC_WEIGHTCONTAINER_H #define ATLASHEPMC_WEIGHTCONTAINER_H +#ifdef HEPMC3 +#include "HepMC3/Version.h" +#else #include "HepMC/WeightContainer.h" #endif +#endif diff --git a/Generators/AtlasHepMC/CMakeLists.txt b/Generators/AtlasHepMC/CMakeLists.txt index a4e5b03554e4748b74d7a671fc3225cde3dad3ed..4a50fb1e304f35914bd39bfafeedef65aceee0b3 100644 --- a/Generators/AtlasHepMC/CMakeLists.txt +++ b/Generators/AtlasHepMC/CMakeLists.txt @@ -5,6 +5,30 @@ atlas_subdir( AtlasHepMC ) # External(s) needed by the package. find_package( HepMC COMPONENTS HepMC HepMCfio ) +if (HEPMC3_USE) +# Component(s) in the package. +atlas_add_library( AtlasHepMCLib + AtlasHepMC/*.h + INTERFACE + PUBLIC_HEADERS AtlasHepMC + INCLUDE_DIRS ${HEPMC3_INCLUDE_DIRS} + LINK_LIBRARIES ${HEPMC3_HepMC3_LIBRARY} ) + +atlas_add_library( AtlasHepMCfioLib + AtlasHepMC/*.h + INTERFACE + PUBLIC_HEADERS AtlasHepMC + INCLUDE_DIRS ${HEPMC3_INCLUDE_DIRS} + ) + +atlas_add_library( AtlasHepMCsearchLib + AtlasHepMC/*.h + INTERFACE + PUBLIC_HEADERS AtlasHepMC + INCLUDE_DIRS ${HEPMC3_INCLUDE_DIRS} + LINK_LIBRARIES ${HEPMC3_HepMC3search_LIBRARY} ) + +else() # Component(s) in the package. atlas_add_library( AtlasHepMCLib AtlasHepMC/*.h @@ -13,9 +37,16 @@ atlas_add_library( AtlasHepMCLib INCLUDE_DIRS ${HEPMC_INCLUDE_DIRS} LINK_LIBRARIES ${_HEPMC_HepMC_library} ) +atlas_add_library( AtlasHepMCsearchLib + AtlasHepMC/*.h + INTERFACE + PUBLIC_HEADERS AtlasHepMC + INCLUDE_DIRS ${HEPMC_INCLUDE_DIRS} + ) atlas_add_library( AtlasHepMCfioLib AtlasHepMC/*.h INTERFACE PUBLIC_HEADERS AtlasHepMC INCLUDE_DIRS ${HEPMC_INCLUDE_DIRS} LINK_LIBRARIES ${_HEPMC_HepMCfio_library} ) +endif() diff --git a/Generators/BoostAfterburner/src/BoostEvent.cxx b/Generators/BoostAfterburner/src/BoostEvent.cxx index fe526bb814a898b0c552cf8909666902fecaaa03..7fe551b3cb775a4ef546001b6aa77af606981192 100644 --- a/Generators/BoostAfterburner/src/BoostEvent.cxx +++ b/Generators/BoostAfterburner/src/BoostEvent.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "BoostAfterburner/BoostEvent.h" @@ -60,25 +60,24 @@ StatusCode BoostEvent::execute() for (McEventCollection::iterator itr = output_collection->begin(); itr!=output_collection->end(); itr++) { - for ( HepMC::GenEvent::particle_iterator particleItr = (*itr)->particles_begin(); - particleItr != (*itr)->particles_end(); particleItr++ ) { - CLHEP::HepLorentzVector momentum((*particleItr)->momentum().px(), - (*particleItr)->momentum().py(), - (*particleItr)->momentum().pz(), - (*particleItr)->momentum().e()); + for ( auto particle: **itr){ + CLHEP::HepLorentzVector momentum(particle->momentum().px(), + particle->momentum().py(), + particle->momentum().pz(), + particle->momentum().e()); momentum.boost(m_beta_x,m_beta_y,m_beta_z); - msg(MSG::VERBOSE) << std::setw(10) << (*particleItr)->momentum().perp() - << std::setw(10) << (*particleItr)->momentum().e() - << std::setw(10) << (*particleItr)->momentum().eta() - << std::setw(10) << (*particleItr)->momentum().phi() + msg(MSG::VERBOSE) << std::setw(10) << particle->momentum().perp() + << std::setw(10) << particle->momentum().e() + << std::setw(10) << particle->momentum().eta() + << std::setw(10) << particle->momentum().phi() << std::setw(10) << momentum.perp() << std::setw(10) << momentum.e() << std::setw(10) << momentum.eta() << std::setw(10) << momentum.phi() << endmsg; - (*particleItr)->set_momentum( HepMC::FourVector(momentum.px(),momentum.py(),momentum.pz(),momentum.e()) ); + particle->set_momentum( HepMC::FourVector(momentum.px(),momentum.py(),momentum.pz(),momentum.e()) ); } } diff --git a/Generators/CavernBkgGenerator/src/MuonBackgroundConverter.cxx b/Generators/CavernBkgGenerator/src/MuonBackgroundConverter.cxx index e88b5e57ee0c5a3d383842f9189f42efdfcf868b..1c1070e4d81a8e96331a93e2a508667e1de597c1 100644 --- a/Generators/CavernBkgGenerator/src/MuonBackgroundConverter.cxx +++ b/Generators/CavernBkgGenerator/src/MuonBackgroundConverter.cxx @@ -201,10 +201,7 @@ StatusCode MuonBackgroundConverter::callGenerator() //std::cout << evt << std::endl; // polarisation - double polX, polY, polZ; - polX = polY = polZ = 0.0; - HepMC::Polarization pol; - pol.set_normal3d( HepGeom::Normal3D<double>( polX, polY, polZ ) ); + HepMC::Polarization pol(0.0,0.0); m_polarization.push_back( pol ); // PDG id, vertex, kinematic variables diff --git a/Generators/CosmicGenerator/src/CosmicGenerator.cxx b/Generators/CosmicGenerator/src/CosmicGenerator.cxx index 72a334457c2e5ff1bbecc9ea5e9b22a1e5154d82..a8cd573dbe8fe264ace04008fc23f13bacee1dc8 100644 --- a/Generators/CosmicGenerator/src/CosmicGenerator.cxx +++ b/Generators/CosmicGenerator/src/CosmicGenerator.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // ------------------------------------------------------------- @@ -303,11 +303,7 @@ StatusCode CosmicGenerator::callGenerator() { ATH_MSG_VERBOSE( evt ); - double polx = 0; - double poly = 0; - double polz = 0; - HepMC::Polarization thePolarization; - thePolarization.set_normal3d(HepGeom::Normal3D<double>(polx,poly,polz)); + HepMC::Polarization thePolarization(0.0,0.0); m_polarization.push_back(thePolarization); // @@ -555,26 +551,8 @@ StatusCode CosmicGenerator::callGenerator() { m_fourPos.push_back(CLHEP::HepLorentzVector(x,z,y,t)); // Set the polarization. Realistically, this is going to be zero - // for most studies, but you never know... - double polx = 0; - double poly = 0; - double polz = 0; - //m_polarization.set_normal3d(HepGeom::Normal3D<double>(polx,poly,polz)); - HepMC::Polarization thePolarization; - - // Do we need to swap Y- and Z-axis for the PixelEndCap C Cosmic test ? - // if not...do nothing...if so, invert position of y- and z- coordinate - // - // well and don't forget about the direction of the incoming cosmic muon(s) either - // that means: y -> -y - // - if(!m_swapYZAxis){ - // thePolarization.set_normal3d(HepGeom::Normal3D<double>(polx,-poly,polz)); - thePolarization.set_normal3d(HepGeom::Normal3D<double>(polx,poly,polz)); - } - else - thePolarization.set_normal3d(HepGeom::Normal3D<double>(polx,polz,-poly)); - + // for most studies. + HepMC::Polarization thePolarization(0.0); m_polarization.push_back(thePolarization); @@ -627,10 +605,7 @@ StatusCode CosmicGenerator::callGenerator() { << m_fourMom.back().e() << ")" ); ATH_MSG_DEBUG( " (theta,phi) = (" << theta << "," << phi << "), " - << "polarization(x,y,z) = (" - << m_polarization.back().normal3d().x() << "," - << m_polarization.back().normal3d().y() << "," - << m_polarization.back().normal3d().z() << ")" ); + << "polarization(theta,phi) = ("<< m_polarization.back().theta() << ","<< m_polarization.back().phi() << ")" ); } return StatusCode::SUCCESS; diff --git a/Generators/Epos_i/src/Epos.cxx b/Generators/Epos_i/src/Epos.cxx index f8308215ac31dd459527de159964906a0fcb6da8..7bebdc257acc991904018c0b24776d1c77f1746b 100644 --- a/Generators/Epos_i/src/Epos.cxx +++ b/Generators/Epos_i/src/Epos.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // ---------------------------------------------------------------------- @@ -226,9 +226,14 @@ StatusCode Epos::genInitialize() epos_rndm_stream = "EPOS"; // setup HepMC +#ifdef HEPMC3 + /* This ifdef is used for consistency */ + /* HepMC3 does not need this setup */ +#else HepMC::HEPEVT_Wrapper::set_sizeof_int(sizeof( int )); HepMC::HEPEVT_Wrapper::set_sizeof_real( 8 ); HepMC::HEPEVT_Wrapper::set_max_number_entries(10000); // as used in crmc-aaa.f!!! +#endif m_events = 0; @@ -260,22 +265,6 @@ StatusCode Epos::callGenerator() crmc_f_( m_iout, m_ievent ,nParticles, impactParameter, m_partID[0], m_partPx[0], m_partPy[0], m_partPz[0], m_partEnergy[0], m_partMass[0], m_partStat[0] ); - // std::cout << "events " << m_events << " " << m_ievent << std::endl; - // HepMC::HEPEVT_Wrapper::print_hepevt(); - - /* for (int i=1;i<=50;++i){ - std::cout << "wrapper gen " << i << " " << HepMC::HEPEVT_Wrapper::number_entries() << " " << HepMC::HEPEVT_Wrapper::px(i)<<" " << - HepMC::HEPEVT_Wrapper::py(i) << " " << HepMC::HEPEVT_Wrapper::pz(i) << " " << HepMC::HEPEVT_Wrapper::e(i) << " " << HepMC::HEPEVT_Wrapper::m(i) << " " << HepMC::HEPEVT_Wrapper::id(i) << " " << HepMC::HEPEVT_Wrapper::status(i) << std::endl; - }*/ - - - // debug printout - /* std::cout << "parameters "<< m_iout << " " << m_ievent << " " << impactParameter << std::endl; - std::cout << "n particles " << nParticles << std::endl; - for (int i=0; i<nParticles; i++){ - std::cout << "part " << i << " " << m_partID[i] << " " << m_partStat[i] << std::endl; - std::cout << "part x " << m_partPx[i]<< " " << m_partPy[i] << " " << m_partPz[i] << " " << m_partEnergy[i] <<" " << m_partMass[i] << std::endl; - }*/ @@ -321,12 +310,16 @@ StatusCode Epos::fillEvt( HepMC::GenEvent* evt ) HepMC::HEPEVT_Wrapper::set_event_number(m_events); +#ifdef HEPMC3 + HepMC::HEPEVT_Wrapper::HEPEVT_to_GenEvent(evt); +#else HepMC::IO_HEPEVT hepio; hepio.set_trust_mothers_before_daughters(0); hepio.set_print_inconsistency_errors(0); hepio.fill_next_event(evt); +#endif // evt->print(); @@ -337,16 +330,34 @@ StatusCode Epos::fillEvt( HepMC::GenEvent* evt ) std::vector<HepMC::GenParticlePtr> beams; - for (HepMC::GenEvent::particle_const_iterator p = evt->particles_begin(); p != evt->particles_end(); ++p) { - if ((*p)->status() == 4) { - beams.push_back(*p); - } - } + for (auto p: *evt) { + if (p->status() == 4) { + beams.push_back(p); + } + } + if (beams.size()>=2) { evt->set_beam_particles(beams[0], beams[1]); + } // Heavy Ion and Signal ID from Epos to HepMC +#ifdef HEPMC3 + HepMC::GenHeavyIonPtr ion= std::make_shared<HepMC::GenHeavyIon>(); + ion->Ncoll_hard=cevt_.kohevt; + ion->Npart_proj=cevt_.npjevt; + ion->Npart_targ=cevt_.ntgevt; + ion->Ncoll=cevt_.kolevt; + ion->spectator_neutrons=cevt_.npnevt + cevt_.ntnevt; + ion->spectator_protons=cevt_.nppevt + cevt_.ntpevt; + ion->N_Nwounded_collisions=-1; + ion->Nwounded_N_collisions=-1; + ion->Nwounded_Nwounded_collisions=-1; + ion->impact_parameter= cevt_.bimevt; + ion->event_plane_angle=cevt_.phievt; + ion->eccentricity=-1; //c2evt_.fglevt, //correct name but not defined + ion->sigma_inel_NN=1e9*hadr5_.sigine; +#else HepMC::HeavyIon ion(cevt_.kohevt, cevt_.npjevt, cevt_.ntgevt, @@ -360,6 +371,7 @@ StatusCode Epos::fillEvt( HepMC::GenEvent* evt ) cevt_.phievt, -1, //c2evt_.fglevt, //correct name but not defined 1e9*hadr5_.sigine); +#endif evt->set_heavy_ion(ion); diff --git a/Generators/EvgenProdTools/CMakeLists.txt b/Generators/EvgenProdTools/CMakeLists.txt index 4b5d58785d534a73ab4308640a45fc4480bcc347..9fc1f78f57cb2e8a1ab7f3fd54fe05f609f6e2f0 100644 --- a/Generators/EvgenProdTools/CMakeLists.txt +++ b/Generators/EvgenProdTools/CMakeLists.txt @@ -26,7 +26,7 @@ atlas_add_library( EvgenProdToolsLib src/*.cxx PUBLIC_HEADERS EvgenProdTools INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} AtlasHepMCLib AthenaBaseComps TruthHelper GeneratorModulesLib + LINK_LIBRARIES ${ROOT_LIBRARIES} AtlasHepMCLib AthenaBaseComps TruthHelper GeneratorModulesLib GenInterfacesLib PRIVATE_LINK_LIBRARIES AthenaKernel EventInfo GaudiKernel TruthUtils ) atlas_add_component( EvgenProdTools diff --git a/Generators/EvgenProdTools/src/SimTimeEstimate.cxx b/Generators/EvgenProdTools/src/SimTimeEstimate.cxx index c45a2aa3487bfea3a15ba1b0d6f9009e3b92184a..1a3d6f223b6e57bb23369f5aaca45797d5f0e085 100644 --- a/Generators/EvgenProdTools/src/SimTimeEstimate.cxx +++ b/Generators/EvgenProdTools/src/SimTimeEstimate.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef XAOD_ANALYSIS @@ -28,19 +28,19 @@ StatusCode SimTimeEstimate::execute() m_particleEtas.clear(); m_particleEnergies.clear(); // Check particles - for (HepMC::GenEvent::particle_const_iterator pitr = itr->particles_begin(); pitr != itr->particles_end(); ++pitr ) + for (auto part: *itr) { // Only use stable particles - if ((*pitr)->status()!=1) continue; + if (part->status()!=1) continue; // Only use particles that are interacting - if (!(MC::isSimInteracting(*pitr))) continue; + if (!(MC::isSimInteracting(part))) continue; // Grab the momentum - const HepMC::FourVector pmom = (*pitr)->momentum(); + const HepMC::FourVector pmom = part->momentum(); // Only count particles with finite eta if (pmom.perp()==0 || fabs(pmom.eta())>m_etaMax) continue; m_particleEtas.push_back(pmom.eta()); // add ID of particle to list - m_particleIDs.push_back(abs((*pitr)->pdg_id())); + m_particleIDs.push_back(abs(part->pdg_id())); // add energy per particle to get the distribution: m_particleEnergies.push_back(pmom.e()); @@ -50,7 +50,7 @@ StatusCode SimTimeEstimate::execute() // it decays. This algorithm will always be a little tricky // in those cases, but better to *overestimate* the sim time. - if(std::find(m_pidsToSkip.begin(), m_pidsToSkip.end(), abs((*pitr)->pdg_id())) != m_pidsToSkip.end()) continue; + if(std::find(m_pidsToSkip.begin(), m_pidsToSkip.end(), abs(part->pdg_id())) != m_pidsToSkip.end()) continue; // Add in the total energy m_total_Energy += pmom.e(); m_eventEnergy += pmom.e(); diff --git a/Generators/GeneratorFilters/GeneratorFilters/BSubstruct.h b/Generators/GeneratorFilters/GeneratorFilters/BSubstruct.h index 4ab32c7eb9a5e82538f91591a5ca6d811251df02..c5fd3002fc98b2e0ab96d758d3c6c1b3406bcc40 100644 --- a/Generators/GeneratorFilters/GeneratorFilters/BSubstruct.h +++ b/Generators/GeneratorFilters/GeneratorFilters/BSubstruct.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef GENERATORFILTERS_BSUBSTRUCTURE_H @@ -9,8 +9,6 @@ #include "xAODJet/Jet.h" class TH1; -typedef std::vector<HepMC::ConstGenParticlePtr> Particles; - class BSubstruct : public GenFilter{ public: @@ -31,7 +29,7 @@ private: * Recursively calls itself to return a list of all particles earlier in the * decay chain that are c or b-flavoured. */ - Particles ancestorCBs(HepMC::ConstGenParticlePtr p)const; + std::vector<HepMC::ConstGenParticlePtr> ancestorCBs(HepMC::ConstGenParticlePtr p)const; /// the delta-r between two vectors at y, phi double deltaR(double y1, double phi1, double y2, double phi2)const; @@ -45,7 +43,7 @@ private: double deltaPhi(double phi1, double phi2)const; void fillHistos(TH1 *phihisto, TH1 *rHisto, TH1 *nHisto, TH1 *bHisto, - const Particles &bHadrons, double weight); + const std::vector<HepMC::ConstGenParticlePtr> &bHadrons, double weight); /// Count of events input for filtering size_t m_nEvents; @@ -85,7 +83,6 @@ private: // Do we store histograms bool m_doHistos; - const static double TWOPI; TH1 *m_h_nBPass; TH1 *m_h_nBAll; diff --git a/Generators/GeneratorFilters/src/ATauFilter.cxx b/Generators/GeneratorFilters/src/ATauFilter.cxx index 443f1f8cebf8ce10477e0b29e5f439fa0765fe97..1eb9a7ff62e505c766db7ce8b61d0dd754925949 100644 --- a/Generators/GeneratorFilters/src/ATauFilter.cxx +++ b/Generators/GeneratorFilters/src/ATauFilter.cxx @@ -74,60 +74,59 @@ StatusCode ATauFilter::filterEvent() { for (itr = events()->begin(); itr!=events()->end(); ++itr) { // Loop over all particles in the event const HepMC::GenEvent* genEvt = (*itr); - for (HepMC::GenEvent::particle_const_iterator pitr=genEvt->particles_begin(); pitr!=genEvt->particles_end(); ++pitr ) { + for (auto part: *genEvt){ // Look for the first tau with genstat != 3 which has not a tau as daughter fsr = 0; - if ( (*pitr)->end_vertex()!= 0 ) { - HepMC::GenVertex::particles_out_const_iterator itr = (*pitr)->end_vertex()->particles_out_const_begin(); - for ( ; itr != (*pitr)->end_vertex()->particles_out_const_end(); itr++ ) { - if ( (*pitr)->pdg_id() == (*itr)->pdg_id() ) fsr = 1; + if ( part->end_vertex()!= 0 ) { + for ( auto itr = part->end_vertex()->particles_out_const_begin(); itr != part->end_vertex()->particles_out_const_end(); itr++ ) { + if ( part->pdg_id() == (*itr)->pdg_id() ) fsr = 1; } } - if ( ( (*pitr)->pdg_id() == 15 ) && ( tau == 0 ) && ( (*pitr)->status() != 3 ) && ( fsr == 0 ) ) { - tau = (*pitr); - ATH_MSG_DEBUG("Found tau with barcode " << tau->barcode() << " status " << (*pitr)->status()); + if ( ( part->pdg_id() == 15 ) && ( tau == 0 ) && ( part->status() != 3 ) && ( fsr == 0 ) ) { + tau = part; + ATH_MSG_DEBUG("Found tau with barcode " << tau->barcode() << " status " << part->status()); } // Look for the first atau with genstat != 3 which has not a tau as daughter - if ( ( (*pitr)->pdg_id() == -15 ) && ( atau == 0 ) && ( (*pitr)->status() != 3 ) && ( fsr == 0 ) ) { - atau = (*pitr); - ATH_MSG_DEBUG("Found atau with barcode " << atau->barcode() << " status " << (*pitr)->status()); + if ( ( part->pdg_id() == -15 ) && ( atau == 0 ) && ( part->status() != 3 ) && ( fsr == 0 ) ) { + atau = part; + ATH_MSG_DEBUG("Found atau with barcode " << atau->barcode() << " status " << part->status()); } // If tau was already found look for his nu - if ( ( tau != 0 ) && ( (*pitr)->pdg_id() == 16 ) ) { - if ( tau->end_vertex() == (*pitr)->production_vertex() ) { - ATH_MSG_DEBUG("Found nutau with barcode " << HepMC::barcode(*pitr) << " and pdg_id " << - (*pitr)->pdg_id() << " pt=" << (*pitr)->momentum().perp()); - nutau = (*pitr); + if ( ( tau != 0 ) && ( part->pdg_id() == 16 ) ) { + if ( tau->end_vertex() == part->production_vertex() ) { + ATH_MSG_DEBUG("Found nutau with barcode " << HepMC::barcode(part) << " and pdg_id " << + part->pdg_id() << " pt=" << part->momentum().perp()); + nutau = part; } } // If atau was already found look for his anu - if ( ( atau != 0 ) && ( (*pitr)->pdg_id() == -16 ) ) { - if ( atau->end_vertex() == (*pitr)->production_vertex() ) { - ATH_MSG_DEBUG("Found anutau with barcode " << HepMC::barcode(*pitr) << " and pdg_id " << - (*pitr)->pdg_id() << " pt=" << (*pitr)->momentum().perp()); - anutau = (*pitr); + if ( ( atau != 0 ) && ( part->pdg_id() == -16 ) ) { + if ( atau->end_vertex() == part->production_vertex() ) { + ATH_MSG_DEBUG("Found anutau with barcode " << HepMC::barcode(part) << " and pdg_id " << + part->pdg_id() << " pt=" << part->momentum().perp()); + anutau = part; } } // if tau was already found look for his lepton - if ( ( tau != 0 ) && ( ( (*pitr)->pdg_id() == 13 ) || ( (*pitr)->pdg_id() == 11 ) ) ) { - if ( tau->end_vertex() == (*pitr)->production_vertex() ) { - ATH_MSG_DEBUG("Found tau-lepton with barcode " << HepMC::barcode(*pitr) << " and pdg_id " << - (*pitr)->pdg_id() << " pt=" << (*pitr)->momentum().perp()); - taulep = (*pitr); + if ( ( tau != 0 ) && ( ( part->pdg_id() == 13 ) || ( part->pdg_id() == 11 ) ) ) { + if ( tau->end_vertex() == part->production_vertex() ) { + ATH_MSG_DEBUG("Found tau-lepton with barcode " <<HepMC::barcode(part) << " and pdg_id " << + part->pdg_id() << " pt=" << part->momentum().perp()); + taulep = part; } } // If atau was already found look for his alepton - if ( ( atau != 0 ) && ( ( (*pitr)->pdg_id() == -13 ) || ( (*pitr)->pdg_id() == -11 ) ) ) { - if ( atau->end_vertex() == (*pitr)->production_vertex() ) { - ATH_MSG_DEBUG("Found atau-lepton with barcode " << HepMC::barcode(*pitr) << " and pdg_id " << - (*pitr)->pdg_id() << " pt=" << (*pitr)->momentum().perp()); - ataulep = (*pitr); + if ( ( atau != 0 ) && ( ( part->pdg_id() == -13 ) || ( part->pdg_id() == -11 ) ) ) { + if ( atau->end_vertex() == part->production_vertex() ) { + ATH_MSG_DEBUG("Found atau-lepton with barcode " << HepMC::barcode(part) << " and pdg_id " << + part->pdg_id() << " pt=" << part->momentum().perp()); + ataulep = part; } } } diff --git a/Generators/GeneratorFilters/src/BSubstruct.cxx b/Generators/GeneratorFilters/src/BSubstruct.cxx index 8fe8c53f78733d4d41ca9d83b194b33628d663a8..1179941b42c765298327e0e7be070b65426538c0 100644 --- a/Generators/GeneratorFilters/src/BSubstruct.cxx +++ b/Generators/GeneratorFilters/src/BSubstruct.cxx @@ -88,8 +88,8 @@ inline double BSubstruct::deltaR(const xAOD::Jet* jet1, const xAOD::Jet* jet2) c } -inline Particles BSubstruct::ancestorCBs(HepMC::ConstGenParticlePtr p) const { - Particles parentBs; +inline std::vector<HepMC::ConstGenParticlePtr> BSubstruct::ancestorCBs(HepMC::ConstGenParticlePtr p) const { + std::vector<HepMC::ConstGenParticlePtr> parentBs; auto vtx = p->production_vertex(); // If the particle has no production vertex then can only assume it is beam or similar @@ -102,7 +102,7 @@ inline Particles BSubstruct::ancestorCBs(HepMC::ConstGenParticlePtr p) const { for (HepMC::GenVertex::particles_in_const_iterator parent = vtx->particles_in_const_begin(); parent != vtx->particles_in_const_end(); ++parent) { if (hasCBQuark((*parent)->pdg_id())) parentBs.push_back(*parent); - Particles ancestors = ancestorCBs(*parent); + std::vector<HepMC::ConstGenParticlePtr> ancestors = ancestorCBs(*parent); parentBs.insert(parentBs.end(), ancestors.begin(), ancestors.end()); } return parentBs; @@ -110,14 +110,14 @@ inline Particles BSubstruct::ancestorCBs(HepMC::ConstGenParticlePtr p) const { void BSubstruct::fillHistos(TH1* phiHisto, TH1* rHisto, TH1* nHisto, TH1* bHisto, - const Particles& bHadrons, double weight) { + const std::vector<HepMC::ConstGenParticlePtr>& bHadrons, double weight) { if (!m_doHistos) return; - for (Particles::const_iterator bHad1 = bHadrons.begin(); bHad1 != bHadrons.end(); ++bHad1) { + for (auto bHad1 = bHadrons.begin(); bHad1 != bHadrons.end(); ++bHad1) { if (bHisto != 0) { bHisto->Fill((*bHad1)->momentum().phi(), weight); } - Particles::const_iterator bHad2 = bHad1; + auto bHad2 = bHad1; ++bHad2; while (bHad2 != bHadrons.end()) { const double dPhi = deltaPhi((*bHad1)->momentum().phi(), (*bHad2)->momentum().phi()); @@ -179,11 +179,11 @@ StatusCode BSubstruct::filterEvent() { } // Look for c or b-hadrons that are in the same decay chain as each other and remove the first one - for (Particles::reverse_iterator bHad = bHadrons.rbegin(); bHad != bHadrons.rend(); ++bHad) { + for (auto bHad = bHadrons.rbegin(); bHad != bHadrons.rend(); ++bHad) { if ((*bHad) == 0) continue; - Particles ancestors = ancestorCBs(*bHad); - for (Particles::const_iterator ancestor = ancestors.begin(); ancestor != ancestors.end(); ++ancestor) { - for (Particles::iterator p = bHadrons.begin(); p != bHadrons.end(); ++p) { + std::vector<HepMC::ConstGenParticlePtr> ancestors = ancestorCBs(*bHad); + for (auto ancestor = ancestors.begin(); ancestor != ancestors.end(); ++ancestor) { + for (auto p = bHadrons.begin(); p != bHadrons.end(); ++p) { if((*p)==0 || (*p)==(*bHad)) continue; if((*ancestor) == (*p)) (*p) = 0; } @@ -191,12 +191,12 @@ StatusCode BSubstruct::filterEvent() { } // Remove the null pointers and any duplicates - Particles::iterator p = bHadrons.begin(); + auto p = bHadrons.begin(); while (p != bHadrons.end()) { if ((*p)==0) { p = bHadrons.erase(p); } else { - Particles::iterator p2 = p; + auto p2 = p; ++p2; while (p2 != bHadrons.end()) { if ((*p)==(*p2)) { @@ -232,7 +232,7 @@ StatusCode BSubstruct::filterEvent() { gotJet = true; size_t nBs = 0; - for (Particles::const_iterator bHad = bHadrons.begin(); bHad != bHadrons.end(); ++bHad) { + for (auto bHad = bHadrons.begin(); bHad != bHadrons.end(); ++bHad) { if (deltaR(*bHad, *jet) < m_drMatch) ++nBs; } diff --git a/Generators/Herwig7_i/src/Herwig7.cxx b/Generators/Herwig7_i/src/Herwig7.cxx index f1a9e256653080163b0b35d69226b10cf709dcdd..1ee1a7173e59d23ef7a6bcf67b8ed6afe71a5814 100644 --- a/Generators/Herwig7_i/src/Herwig7.cxx +++ b/Generators/Herwig7_i/src/Herwig7.cxx @@ -215,7 +215,12 @@ StatusCode Herwig7::fillEvt(HepMC::GenEvent* evt) { double pdf1 = pdfs.first.xfx(sub->incoming().first ->dataPtr(), scale, x1); double pdf2 = pdfs.first.xfx(sub->incoming().second->dataPtr(), scale, x2); // Create the PDFinfo object +#ifdef HEPMC3 + HepMC3::GenPdfInfoPtr pdfi = std::shared_ptr<HepMC3::GenPdfInfo>(); + pdfi->set(id1, id2, x1, x2, Q, pdf1, pdf2); +#else HepMC::PdfInfo pdfi(id1, id2, x1, x2, Q, pdf1, pdf2); +#endif evt->set_pdf_info(pdfi); ATH_MSG_DEBUG("Added PDF info to HepMC"); diff --git a/Generators/Hijing_i/src/Hijing.cxx b/Generators/Hijing_i/src/Hijing.cxx index cfa22100cc07f30429ad29c69fb91923530109ea..346f0e2097af1a79245e921a4a6f3bfb6cc14cea 100644 --- a/Generators/Hijing_i/src/Hijing.cxx +++ b/Generators/Hijing_i/src/Hijing.cxx @@ -280,6 +280,22 @@ Hijing::fillEvt(HepMC::GenEvent* evt) float sigmainel = m_hiparnt.hint1(12); + #ifdef HEPMC3 + HepMC::GenHeavyIonPtr ion= std::make_shared<HepMC::GenHeavyIon>(); + ion->Ncoll_hard=static_cast<int>(jatt); + ion->Npart_proj=static_cast<int>(np); + ion->Npart_targ=static_cast<int>(nt); + ion->Ncoll=static_cast<int>(n0+n10+n01+n11); + ion->N_Nwounded_collisions=static_cast<int>(n01); + ion->Nwounded_N_collisions=static_cast<int>(n10); + ion->Nwounded_Nwounded_collisions=static_cast<int>(n11); + ion->spectator_neutrons=-1; + ion->spectator_protons=-1; + ion->impact_parameter= b; + ion->event_plane_angle=bphi; + ion->event_plane_angle=-1; + ion->sigma_inel_NN=sigmainel; +#else HepMC::HeavyIon ion ( static_cast<int>(jatt), // Ncoll_hard @@ -298,6 +314,7 @@ Hijing::fillEvt(HepMC::GenEvent* evt) evt->set_heavy_ion(ion); std::cout << " heavy ion " << evt->heavy_ion() << std::endl; +#endif // Did we keep decay history? // @@ -309,13 +326,9 @@ Hijing::fillEvt(HepMC::GenEvent* evt) // Vectors that will keep track of where particles originate from and die // - std::vector<int> partOriginVertex_vec; - std::vector<int> partDecayVertex_vec; - std::vector<HepMC::GenParticlePtr> particleHepPartPtr_vec; - - partOriginVertex_vec.assign(numHijingPart, 0); - partDecayVertex_vec.assign(numHijingPart, -1); - particleHepPartPtr_vec.assign(numHijingPart, (HepMC::GenParticle*) 0); + std::vector<int> partOriginVertex_vec(numHijingPart, 0); + std::vector<int> partDecayVertex_vec(numHijingPart, -1); + std::vector<HepMC::GenParticlePtr> particleHepPartPtr_vec(numHijingPart, nullptr); // Vector that will keep pointers to generated vertices // @@ -476,8 +489,13 @@ Hijing::fillEvt(HepMC::GenEvent* evt) << ", " << vertexPtrVec[parentDecayIndex]->position().z() << ", associated daughter IDs = "; +#ifdef HEPMC3 + auto vertexPtrVec_particles_out_const_begin=vertexPtrVec[parentDecayIndex]->particles_out().begin(); + auto vertexPtrVec_particles_out_const_end=vertexPtrVec[parentDecayIndex]->particles_out().end(); +#else auto vertexPtrVec_particles_out_const_begin=vertexPtrVec[parentDecayIndex]->particles_out_const_begin(); auto vertexPtrVec_particles_out_const_end=vertexPtrVec[parentDecayIndex]->particles_out_const_end(); +#endif for (auto iter = vertexPtrVec_particles_out_const_begin; iter != vertexPtrVec_particles_out_const_end; iter++) @@ -768,13 +786,13 @@ Hijing::fillEvt(HepMC::GenEvent* evt) // std::cout <<"random="<<ranz <<std::endl; if (ranz < 0.5) { // std::cout <<"flip="<<ranz <<std::endl; - for(HepMC::GenEvent::particle_const_iterator pitr= evt->particles_begin(); pitr != evt->particles_end(); ++pitr){ - tmpmom= (*pitr)->momentum(); + for(auto pitr: *evt){ + tmpmom= pitr->momentum(); tmpmom.setX(-tmpmom.x()); tmpmom.setY(-tmpmom.y()); tmpmom.setZ(-tmpmom.z()); tmpmom.setT(tmpmom.t()); - (*pitr)->set_momentum(tmpmom); + pitr->set_momentum(tmpmom); } } } diff --git a/Generators/Photospp_i/CMakeLists.txt b/Generators/Photospp_i/CMakeLists.txt index 69d10d511288b5a7dfa5c2b67a9729c61222fe63..fa85facc811e14021e8adc743cde305f5c96125e 100644 --- a/Generators/Photospp_i/CMakeLists.txt +++ b/Generators/Photospp_i/CMakeLists.txt @@ -16,7 +16,11 @@ atlas_depends_on_subdirs( # External dependencies: find_package( CLHEP ) +if (HEPMC3_USE) +find_package( Photospp COMPONENTS Photospp PhotosppHepMC3 ) +else() find_package( Photospp COMPONENTS Photospp PhotosppHepMC ) +endif() # Remove the --as-needed linker flags: atlas_disable_as_needed() diff --git a/Generators/Photospp_i/src/Photospp_i.cxx b/Generators/Photospp_i/src/Photospp_i.cxx index 4daaf6ef4eef6d7275c72ccbb89f652b7fe3c02b..f1879752ba34752229f2462ec17ca6aec0e81262 100644 --- a/Generators/Photospp_i/src/Photospp_i.cxx +++ b/Generators/Photospp_i/src/Photospp_i.cxx @@ -7,7 +7,14 @@ #include "Photos/Photos.h" +#ifdef HEPMC3 +#include "Photos/PhotosHepMC3Event.h" +namespace Photospp { +using PhotosHepMCEvent=PhotosHepMC3Event; +} +#else #include "Photos/PhotosHepMCEvent.h" +#endif #include "Photos/Log.h" #include "GeneratorObjects/McEventCollection.h" diff --git a/Generators/QGSJet_i/src/QGSJet.cxx b/Generators/QGSJet_i/src/QGSJet.cxx index 4b2940d1cd874516999cebb846fc403022b0e4fa..0e9fbc10debda57ecca1050a439b468a30e05b6e 100644 --- a/Generators/QGSJet_i/src/QGSJet.cxx +++ b/Generators/QGSJet_i/src/QGSJet.cxx @@ -222,9 +222,14 @@ StatusCode QGSJet::genInitialize() qgsjet_rndm_stream = "QGSJet"; // setup HepMC +#ifdef HEPMC3 + /* This ifdef is used for consistency */ + /* HepMC3 Does not need a setup here */ +#else HepMC::HEPEVT_Wrapper::set_sizeof_int(sizeof( int )); HepMC::HEPEVT_Wrapper::set_sizeof_real( 8 ); HepMC::HEPEVT_Wrapper::set_max_number_entries(10000); // as used in crmc-aaa.f!!! +#endif m_events = 0; @@ -299,12 +304,16 @@ StatusCode QGSJet::fillEvt( HepMC::GenEvent* evt ) HepMC::HEPEVT_Wrapper::set_event_number(m_events); +#ifdef HEPMC3 + HepMC::HEPEVT_Wrapper::HEPEVT_to_GenEvent(evt); +#else HepMC::IO_HEPEVT hepio; hepio.set_trust_mothers_before_daughters(0); hepio.set_print_inconsistency_errors(0); hepio.fill_next_event(evt); +#endif HepMC::set_random_states(evt, m_seeds ); evt->weights().push_back(1.0); @@ -312,13 +321,15 @@ StatusCode QGSJet::fillEvt( HepMC::GenEvent* evt ) std::vector<HepMC::GenParticlePtr> beams; - for (HepMC::GenEvent::particle_const_iterator p = evt->particles_begin(); p != evt->particles_end(); ++p) { - if ((*p)->status() == 4) { - beams.push_back(*p); + for (auto p: *evt) { + if (p->status() == 4) { + beams.push_back(p); } } + if (beams.size()>=2){ evt->set_beam_particles(beams[0], beams[1]); + } int sig_id = -1; switch (int(c2evt_.typevt)) diff --git a/Generators/Rivet_i/src/Rivet_i.cxx b/Generators/Rivet_i/src/Rivet_i.cxx index 515e1fd366bba95ce9ded7327cff950e44c16980..ed05856340f3666ddea37dcf607b980b14591695 100644 --- a/Generators/Rivet_i/src/Rivet_i.cxx +++ b/Generators/Rivet_i/src/Rivet_i.cxx @@ -225,7 +225,7 @@ StatusCode Rivet_i::finalize() { /// Helper function to sort GenParticles by descending energy /// @todo Move into GeneratorUtils (with many friends) -bool cmpGenParticleByEDesc(const HepMC::GenParticle* a, const HepMC::GenParticle* b) { +bool cmpGenParticleByEDesc(const HepMC::GenParticlePtr a, const HepMC::GenParticlePtr b) { return a->momentum().e() > b->momentum().e(); } @@ -239,7 +239,7 @@ inline std::vector<std::string> split(const std::string& input, const std::strin } const HepMC::GenEvent* Rivet_i::checkEvent(const HepMC::GenEvent* event) { - std::vector<HepMC::GenParticle*> beams; + std::vector<HepMC::GenParticlePtr> beams; HepMC::GenEvent* modEvent = new HepMC::GenEvent(*event); // overwrite the HEPMC dummy event number with the proper ATLAS event number diff --git a/Generators/Rivet_i/src/Rivet_i.h b/Generators/Rivet_i/src/Rivet_i.h index 852c9b626cd799556371108ec10b6f50f7dec628..37143176d27d26a9905a8516dc5decfc24d6db36 100644 --- a/Generators/Rivet_i/src/Rivet_i.h +++ b/Generators/Rivet_i/src/Rivet_i.h @@ -9,6 +9,7 @@ #include "GaudiKernel/ServiceHandle.h" #include "Rivet/AnalysisHandler.hh" +#include "AtlasHepMC/GenEvent.h" #include <vector> #include <string> diff --git a/Generators/Tauolapp_i/src/TauolaPP.cxx b/Generators/Tauolapp_i/src/TauolaPP.cxx index 02c25bf2f516de7e59e3daa8f79d217b17d558aa..535e731b248f450008f7ed24a4f6ce14061bcd42 100644 --- a/Generators/Tauolapp_i/src/TauolaPP.cxx +++ b/Generators/Tauolapp_i/src/TauolaPP.cxx @@ -7,7 +7,16 @@ // Tauola header files #include "Tauola/Log.h" #include "Tauola/Tauola.h" +#ifdef HEPMC3 +#include "Tauola/TauolaHepMC3Event.h" +namespace Tauolapp +{ +using TauolaHepMCEvent=TauolaHepMC3Event; +using TauolaHepMCParticle=TauolaHepMC3Particle; +} +#else #include "Tauola/TauolaHepMCEvent.h" +#endif #include "Tauola/f_Variables.h" diff --git a/Generators/TrackRecordGenerator/src/TrackRecordGenerator.cxx b/Generators/TrackRecordGenerator/src/TrackRecordGenerator.cxx index 1bff952ed34bf1538d1a58176efd9264bdb06770..7cff32d53711289f15e0431672da6f4136b0fc73 100644 --- a/Generators/TrackRecordGenerator/src/TrackRecordGenerator.cxx +++ b/Generators/TrackRecordGenerator/src/TrackRecordGenerator.cxx @@ -160,8 +160,7 @@ StatusCode TrackRecordGenerator::callGenerator() { m_fourMom.push_back( particle4Momentum ); m_pdgCode.push_back(iterTTR.GetPDGCode()); - HepMC::Polarization thePolarization; - thePolarization.set_normal3d(HepGeom::Normal3D<double>(0,0,0)); + HepMC::Polarization thePolarization(0.0,0.0); m_polarization.push_back(thePolarization); if (m_stopParticles){ diff --git a/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/src/AddTRTMomConstr.cxx b/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/src/AddTRTMomConstr.cxx index d9e89f77eaad6f14fbce42bb01d020fff4bff1f4..310ccd8bae084a9fe648aa36e5baf86f38077d57 100644 --- a/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/src/AddTRTMomConstr.cxx +++ b/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/src/AddTRTMomConstr.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // @file AddTRTMomConstr.cxx @@ -178,7 +178,8 @@ bool AddTRTMomConstr::accept( const Trk::Track& track ) { float chisqpdof = track.fitQuality()->chiSquared() / track.fitQuality()->numberDoF() ; if( m_selChiSqPerDOFMin > 0 && chisqpdof > m_selChiSqPerDOFMin ) rc = false ; - const Trk::TrackSummary* summary = m_trackSummaryTool->createSummary( *pTrack ) ; + std::unique_ptr<const Trk::TrackSummary> summary + = m_trackSummaryTool->summary( *pTrack ) ; if( summary->get(Trk::numberOfPixelHits) < m_selNHitPIXMin ) { ++m_nRejectPIX ; rc = false; @@ -212,7 +213,6 @@ bool AddTRTMomConstr::accept( const Trk::Track& track ) { << "\n\t nTRT = " << summary->get(Trk::numberOfTRTHits) ) ; ATH_MSG_DEBUG( "leaving accept(.)" ) ; - delete summary; return rc ; } // accept(.) diff --git a/InnerDetector/InDetAlignment/InDetAlignNtupleTools/src/SimpleIDNtupleTool.cxx b/InnerDetector/InDetAlignment/InDetAlignNtupleTools/src/SimpleIDNtupleTool.cxx index 0082ffc3fc8078a2800d00642398cd996c74d743..803d454f56133bad465de2236f28ca42fefd38b7 100644 --- a/InnerDetector/InDetAlignment/InDetAlignNtupleTools/src/SimpleIDNtupleTool.cxx +++ b/InnerDetector/InDetAlignment/InDetAlignNtupleTools/src/SimpleIDNtupleTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "TrkEventPrimitives/FitQuality.h" @@ -255,7 +255,8 @@ namespace InDet { m_xvtx = aMeasPer->position().x(); m_yvtx = aMeasPer->position().y(); m_zvtx = aMeasPer->position().z(); - const Trk::TrackSummary* summary = m_trackSumTool->createSummary((*alignTrack)); + std::unique_ptr<const Trk::TrackSummary> summary = + m_trackSumTool->summary((*alignTrack)); if (not summary) ATH_MSG_ERROR("Could not get Trk::TrackSummary"); else { // hits @@ -309,7 +310,6 @@ namespace InDet { ATH_MSG_DEBUG(" - chi2 propability : " << m_chi2prob); } } - delete summary; } // store information for all hits on this track, including diff --git a/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/share/AdditionalVertexing.py b/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/share/AdditionalVertexing.py index 2bacc70405fc044fa6a714526ec95687a562ae5c..556676f766fd8537b2c24a97f96be1a0c70640d4 100644 --- a/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/share/AdditionalVertexing.py +++ b/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/share/AdditionalVertexing.py @@ -231,17 +231,6 @@ def GeneralVertexer(system='Combined', setup=None,tracksName=None, suffix=""): selectiontype = 0, do3dSplitting = InDetFlags.doPrimaryVertex3DFinding()) - elif vxSetup == 'DefaultVKalVrtFinding': - # - # --- load vkal vertex finder tool - # - from InDetVKalPriVxFinderTool.InDetVKalPriVxFinderTool import InDet__InDetVKalPriVxFinderTool - InDetPriVxFinderTool_vx = InDet__InDetVKalPriVxFinderTool(name = "InDetVKalPriVxFinder_"+system+"_"+vxSetup+suffix, - TrackSummaryTool = InDetTrackSummaryTool, - FitterTool = InDetVxFitterTool, - BeamConstraint = 0) - if InDetFlags.useBeamConstraint(): - InDetPriVxFinderTool_vx.BeamConstraint = 1 #Add additional finder tools elif vxSetup == 'InDetPriVxFinderFastFinder':# not the official name diff --git a/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/share/AdditionalVertexing_old.py b/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/share/AdditionalVertexing_old.py index 178522a0503b1dd46a7157a56ae3c5dcc651206a..fbc4b41a2b6abae7658b31fb8f639749ed80f7b2 100644 --- a/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/share/AdditionalVertexing_old.py +++ b/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/share/AdditionalVertexing_old.py @@ -256,17 +256,6 @@ elif InDetFlags.primaryVertexSetup() == 'AdaptiveMultiFinding': selectiontype = 0, do3dSplitting = InDetFlags.doPrimaryVertex3DFinding()) -elif InDetFlags.primaryVertexSetup() == 'DefaultVKalVrtFinding': - # - # --- load vkal vertex finder tool - # - from InDetVKalPriVxFinderTool.InDetVKalPriVxFinderTool import InDet__InDetVKalPriVxFinderTool - InDetPriVxFinderTool_SCT = InDet__InDetVKalPriVxFinderTool(name = "InDetVKalPriVxFinder_SCT", - TrackSummaryTool = InDetTrackSummaryTool, - FitterTool = InDetVxFitterTool, - BeamConstraint = 0) - if InDetFlags.useBeamConstraint(): - InDetPriVxFinderTool_SCT.BeamConstraint = 1 ToolSvc += InDetPriVxFinderTool_SCT if (InDetFlags.doPrintConfigurables()): diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/SCT_ConditionsTools/ISCT_ByteStreamErrorsTool.h b/InnerDetector/InDetConditions/SCT_ConditionsTools/SCT_ConditionsTools/ISCT_ByteStreamErrorsTool.h index 215c436d3dd76723bc2d3923c711825531c8e09c..a437be460d4bf6e243c1f1f90525c6ef96d11343 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsTools/SCT_ConditionsTools/ISCT_ByteStreamErrorsTool.h +++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/SCT_ConditionsTools/ISCT_ByteStreamErrorsTool.h @@ -1,7 +1,7 @@ // -*- C++ -*- /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /** @@ -30,20 +30,26 @@ class IdentifierHash; **/ namespace SCT_ByteStreamErrors { //!< @brief for cases when error doe snot need to be accumulated - inline IDCInDetBSErrContainer::ErrorCode makeError( ErrorType errType ) { return IDCInDetBSErrContainer::ErrorCode{1} << errType; } + inline IDCInDetBSErrContainer::ErrorCode makeError(ErrorType errType) { + return IDCInDetBSErrContainer::ErrorCode{1} << errType; + } //!< @brief helper to be used in clients to fetch error information - inline bool hasError(IDCInDetBSErrContainer::ErrorCode errWord, ErrorType errType ) { return errWord & makeError( errType ); } + inline bool hasError(IDCInDetBSErrContainer::ErrorCode errWord, ErrorType errType) { + return errWord & makeError(errType); + } - //!< @brief helper to set the error: @example errors[hashId] = addError( errors[hashId], PixelByteStreamErrors::Invalid ) - inline void addError(IDCInDetBSErrContainer::ErrorCode& errWord, ErrorType errType ) { errWord |= makeError( errType ); } + //!< @brief helper to set the error: @example errors[hashId] = addError(errors[hashId], SCT_ByteStreamErrors::BCIDError) + inline void addError(IDCInDetBSErrContainer::ErrorCode& errWord, ErrorType errType) { + errWord |= makeError(errType); + } } class ISCT_ByteStreamErrorsTool: virtual public ISCT_ConditionsTool { - public: +public: //@name Tool methods //@{ @@ -63,7 +69,7 @@ class ISCT_ByteStreamErrorsTool: virtual public ISCT_ConditionsTool { virtual unsigned int abcdErrorChips(const Identifier& moduleId) const =0; virtual unsigned int abcdErrorChips(const Identifier& moduleId, const EventContext& ctx) const =0; - private: +private: }; diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ByteStreamErrorsTool.cxx b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ByteStreamErrorsTool.cxx index 134e539d4f6dd960759a2cc6ea28301c602d3503..c38560ea296e3dd181b4b524658f18c88272d218 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ByteStreamErrorsTool.cxx +++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ByteStreamErrorsTool.cxx @@ -25,24 +25,16 @@ SCT_ByteStreamErrorsTool::SCT_ByteStreamErrorsTool(const std::string& type, cons /** Initialize */ StatusCode SCT_ByteStreamErrorsTool::initialize() { - StatusCode sc = detStore()->retrieve(m_sct_id, "SCT_ID") ; - if (sc.isFailure()) { - ATH_MSG_FATAL("Cannot retrieve SCT ID helper!"); - return StatusCode::FAILURE; - } + ATH_CHECK(detStore()->retrieve(m_sct_id, "SCT_ID")); m_cntx_sct = m_sct_id->wafer_context(); - sc = m_config.retrieve(); - if (sc.isFailure()) { - ATH_MSG_FATAL("Cannot retrieve ConfigurationConditionsTool!"); - return StatusCode::FAILURE; - } + ATH_CHECK(m_config.retrieve()); // Read (Cond)Handle Keys ATH_CHECK(m_bsIDCErrContainerName.initialize()); ATH_CHECK(m_SCTDetEleCollKey.initialize()); - return sc; + return StatusCode::SUCCESS; } /** Finalize */ @@ -76,29 +68,29 @@ const IDCInDetBSErrContainer* SCT_ByteStreamErrorsTool::getContainer(const Event m_nRetrievalFailure++; if (m_nRetrievalFailure<=3) { ATH_MSG_INFO("SCT_ByteStreamErrorsTool Failed to retrieve BS error container " - << m_bsIDCErrContainerName.key() + << m_bsIDCErrContainerName.key() << " from StoreGate."); if (m_nRetrievalFailure==3) { - ATH_MSG_INFO("SCT_ByteStreamErrorsTool This message on retrieval failure of " << m_bsIDCErrContainerName.key() << " is suppressed."); + ATH_MSG_INFO("SCT_ByteStreamErrorsTool This message on retrieval failure of " << m_bsIDCErrContainerName.key() << " is suppressed."); } } return nullptr; } - ATH_MSG_VERBOSE( "SCT_ByteStreamErrorsTool IDC Container fetched " << m_bsIDCErrContainerName.key() ); + ATH_MSG_VERBOSE("SCT_ByteStreamErrorsTool IDC Container fetched " << m_bsIDCErrContainerName.key()); return idcErrCont.cptr(); } /////////////////////////////////////////////////////////////////////////// SCT_ByteStreamErrorsTool::IDCCacheEntry* SCT_ByteStreamErrorsTool::getCacheEntry(const EventContext& ctx) const { - IDCCacheEntry* cacheEntry = m_eventCache.get( ctx ); - if( cacheEntry->needsUpdate( ctx ) ) { - auto idcErrContPtr = getContainer( ctx ); - if ( idcErrContPtr == nullptr ) { // missing or not, the cache needs to be reset - cacheEntry->reset( ctx.evt(), nullptr ); + IDCCacheEntry* cacheEntry{m_eventCache.get(ctx)}; + if (cacheEntry->needsUpdate(ctx)) { + auto idcErrContPtr{getContainer(ctx)}; + if (idcErrContPtr == nullptr) { // missing or not, the cache needs to be reset + cacheEntry->reset(ctx.evt(), nullptr); } else { - cacheEntry->reset( ctx.evt(), idcErrContPtr->cache() ); + cacheEntry->reset(ctx.evt(), idcErrContPtr->cache()); } - ATH_MSG_VERBOSE( "SCT_ByteStreamErrorsTool Cache for the event reset " << cacheEntry->eventId << " with IDC container" << idcErrContPtr ); + ATH_MSG_VERBOSE("SCT_ByteStreamErrorsTool Cache for the event reset " << cacheEntry->eventId << " with IDC container" << idcErrContPtr); } return cacheEntry; } @@ -111,19 +103,19 @@ bool SCT_ByteStreamErrorsTool::isGood(const IdentifierHash& elementIdHash, const EventContext& ctx) const { { std::lock_guard<std::mutex> lock{m_cacheMutex}; - ATH_MSG_VERBOSE("SCT_ByteStreamErrorsTool isGood called for " << elementIdHash ); - auto idcCachePtr = getCacheEntry(ctx)->IDCCache; - if ( idcCachePtr == nullptr ) { - ATH_MSG_VERBOSE("SCT_ByteStreamErrorsTool No cache! " ); + ATH_MSG_VERBOSE("SCT_ByteStreamErrorsTool isGood called for " << elementIdHash); + auto idcCachePtr{getCacheEntry(ctx)->IDCCache}; + if (idcCachePtr == nullptr) { + ATH_MSG_VERBOSE("SCT_ByteStreamErrorsTool No cache! "); return true; } - auto errorCode = idcCachePtr->retrieve(elementIdHash); + auto errorCode{idcCachePtr->retrieve(elementIdHash)}; - for(auto badError : SCT_ByteStreamErrors::BadErrors) { - if(errorCode == badError) { - ATH_MSG_VERBOSE("SCT_ByteStreamErrorsTool Bad Error " << errorCode << " for ID " << elementIdHash ); - return false; + for (auto badError : SCT_ByteStreamErrors::BadErrors) { + if (errorCode == badError) { + ATH_MSG_VERBOSE("SCT_ByteStreamErrorsTool Bad Error " << errorCode << " for ID " << elementIdHash); + return false; } } } // end of cache operations protection via m_cacheMutex, following code has own protection @@ -270,16 +262,16 @@ SCT_ByteStreamErrorsTool::getChip(const Identifier& stripId, const EventContext& std::set<IdentifierHash> SCT_ByteStreamErrorsTool::getErrorSet(int errorType, const EventContext& ctx) const { - ATH_MSG_VERBOSE( "SCT_ByteStreamErrorsTool getErrorSet " << errorType ); + ATH_MSG_VERBOSE("SCT_ByteStreamErrorsTool getErrorSet " << errorType); std::set<IdentifierHash> result; if (errorType>=0 and errorType<SCT_ByteStreamErrors::NUM_ERROR_TYPES) { - auto idcErrCont = getContainer( ctx ); - if ( idcErrCont != nullptr ) { - const std::vector<std::pair<size_t, uint64_t>> errorcodesforView = idcErrCont->getAll(); + auto idcErrCont{getContainer(ctx)}; + if (idcErrCont != nullptr) { + const std::vector<std::pair<size_t, uint64_t>> errorcodesforView{idcErrCont->getAll()}; for (const auto& [hashId, errCode] : errorcodesforView) { - if ( SCT_ByteStreamErrors::hasError( errCode, static_cast<SCT_ByteStreamErrors::ErrorType>( errorType ) ) ) { - result.insert(hashId); - } + if (SCT_ByteStreamErrors::hasError(errCode, static_cast<SCT_ByteStreamErrors::ErrorType>(errorType))) { + result.insert(hashId); + } } } } @@ -300,27 +292,26 @@ SCT_ByteStreamErrorsTool::getErrorSet(int errorType) const { StatusCode SCT_ByteStreamErrorsTool::fillData(const EventContext& ctx) const { + ATH_MSG_VERBOSE("SCT_ByteStreamErrorsTool fillData"); - ATH_MSG_VERBOSE( "SCT_ByteStreamErrorsTool fillData "); - - const IDCInDetBSErrContainer* idcErrCont = getContainer( ctx ); - if ( idcErrCont == nullptr ) { + const IDCInDetBSErrContainer* idcErrCont{getContainer(ctx)}; + if (idcErrCont == nullptr) { return StatusCode::SUCCESS; } - auto cacheEntry = getCacheEntry( ctx ); + auto cacheEntry{getCacheEntry(ctx)}; /** OK, so we found the StoreGate container, now lets iterate * over it to populate the sets of errors owned by this Tool. */ ATH_MSG_VERBOSE("SCT_ByteStreamErrorsTool size of error container is " << idcErrCont->maxSize()); - const std::vector<std::pair<size_t, uint64_t>> errorcodesforView = idcErrCont->getAll(); + const std::vector<std::pair<size_t, uint64_t>> errorcodesforView{idcErrCont->getAll()}; for (const auto& [ hashId, errCode ] : errorcodesforView) { Identifier wafer_id{m_sct_id->wafer_id(hashId)}; Identifier module_id{m_sct_id->module_id(wafer_id)}; - if ( errCode == uint64_t{0} ) { + if (errCode == uint64_t{0}) { // That means this hashId was decoded but had no error // In such case we want to fill the cache also with zero so we do not have to fill the cache again for a given view // (see logic in: getErrorCodeWithCacheUpdate) @@ -331,7 +322,7 @@ SCT_ByteStreamErrorsTool::fillData(const EventContext& ctx) const { } - ATH_MSG_VERBOSE( "SCT_ByteStreamErrorsTool filling event cache for module " << module_id << " ec " << errCode ); + ATH_MSG_VERBOSE("SCT_ByteStreamErrorsTool filling event cache for module " << module_id << " ec " << errCode); const int side{m_sct_id->side(m_sct_id->wafer_id(hashId))}; // Each bit of errCode represents each SCT_ByteStreamErrors for one wafer @@ -359,13 +350,13 @@ SCT_ByteStreamErrorsTool::fillData(const EventContext& ctx) const { /////////////////////////////////////////////////////////////////////////////// unsigned int SCT_ByteStreamErrorsTool::tempMaskedChips(const Identifier& moduleId, const EventContext& ctx) const { - ATH_MSG_VERBOSE( "SCT_ByteStreamErrorsTool tempMaskedChips "); + ATH_MSG_VERBOSE("SCT_ByteStreamErrorsTool tempMaskedChips"); std::lock_guard<std::mutex> lock{m_cacheMutex}; - auto cacheEntry = getCacheEntry(ctx); - if ( cacheEntry->IDCCache == nullptr ) return 0; + auto cacheEntry{getCacheEntry(ctx)}; + if (cacheEntry->IDCCache == nullptr) return 0; auto [status, v_tempMaskedChips] = getErrorCodeWithCacheUpdate(moduleId, ctx, cacheEntry->tempMaskedChips); - if ( status.isFailure() ) { + if (status.isFailure()) { ATH_MSG_ERROR("SCT_ByteStreamErrorsTool Failure getting temp masked chip errors"); } return v_tempMaskedChips; // 12 bits are used. @@ -378,13 +369,13 @@ unsigned int SCT_ByteStreamErrorsTool::tempMaskedChips(const Identifier& moduleI } unsigned int SCT_ByteStreamErrorsTool::abcdErrorChips(const Identifier& moduleId, const EventContext& ctx) const { - ATH_MSG_VERBOSE( "SCT_ByteStreamErrorsTool abcdErrorChips "); + ATH_MSG_VERBOSE("SCT_ByteStreamErrorsTool abcdErrorChips"); std::lock_guard<std::mutex> lock{m_cacheMutex}; - auto cacheEntry = getCacheEntry(ctx); - if ( cacheEntry->IDCCache == nullptr ) return 0; + auto cacheEntry{getCacheEntry(ctx)}; + if (cacheEntry->IDCCache == nullptr) return 0; auto [status, v_abcdErrorChips] = getErrorCodeWithCacheUpdate(moduleId, ctx, cacheEntry->abcdErrorChips); - if ( status.isFailure() ) { + if (status.isFailure()) { ATH_MSG_ERROR("SCT_ByteStreamErrorsTool Failure getting ABCD chip errors"); } return v_abcdErrorChips; // 12 bits are used. @@ -396,11 +387,11 @@ unsigned int SCT_ByteStreamErrorsTool::abcdErrorChips(const Identifier& moduleId return abcdErrorChips(moduleId, ctx); } -std::pair<StatusCode, unsigned int> SCT_ByteStreamErrorsTool::getErrorCodeWithCacheUpdate( const Identifier& moduleId, const EventContext& ctx, - std::map<Identifier, unsigned int>& whereExected ) const { - ATH_MSG_VERBOSE( "SCT_ByteStreamErrorsTool getErrorCodeWithCacheUpdate " << moduleId ); - auto it{ whereExected.find( moduleId ) }; - if ( it != whereExected.end() ) return std::make_pair(StatusCode::SUCCESS, it->second); +std::pair<StatusCode, unsigned int> SCT_ByteStreamErrorsTool::getErrorCodeWithCacheUpdate(const Identifier& moduleId, const EventContext& ctx, + std::map<Identifier, unsigned int>& whereExected) const { + ATH_MSG_VERBOSE("SCT_ByteStreamErrorsTool getErrorCodeWithCacheUpdate " << moduleId); + auto it{whereExected.find(moduleId)}; + if (it != whereExected.end()) return std::make_pair(StatusCode::SUCCESS, it->second); // even if there are no errors for this module at all filled // we want the entry of value 0 so we know we walked over it and do not need to invoke filling again @@ -413,8 +404,8 @@ std::pair<StatusCode, unsigned int> SCT_ByteStreamErrorsTool::getErrorCodeWithCa return std::make_pair(StatusCode::FAILURE, 0); } // handle situation when the cache does not contain desired datum after the update - it = whereExected.find( moduleId ); - if ( it == whereExected.end() ) { + it = whereExected.find(moduleId); + if (it == whereExected.end()) { ATH_MSG_ERROR("After fillData in abcdErrorChips, cache does not have an infomation about the " << moduleId); ATH_MSG_ERROR("Likely cause is a request for for different region"); std::make_pair(StatusCode::FAILURE, 0); diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ByteStreamErrorsTool.h b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ByteStreamErrorsTool.h index 2a0584c56d791dfc527eb8427e964c1b3adfaeea..599e245289e6c98e277839ac89ac080061fa345e 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ByteStreamErrorsTool.h +++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ByteStreamErrorsTool.h @@ -8,7 +8,7 @@ * @file SCT_ByteStreamErrorsTool.h * header file for tool that keeps track of errors in the bytestream. * @author Susumu.Oda@cern.ch -**/ + **/ #ifndef SCT_ByteStreamErrorsTool_h #define SCT_ByteStreamErrorsTool_h @@ -35,10 +35,10 @@ ///STL includes #include <array> #include <atomic> +#include <functional> #include <map> #include <mutex> #include <vector> -#include <functional> /** forward declarations */ class SCT_ID; @@ -81,8 +81,8 @@ public: virtual bool isGood(const IdentifierHash& elementIdHash) const override; virtual bool isGood(const IdentifierHash& elementIdHash, const EventContext& ctx) const override; - std::set<IdentifierHash> getErrorSet(int errorType, const EventContext& ctx) const override; // Used by SCTRawDataProviderTool and others - std::set<IdentifierHash> getErrorSet(int errorType) const override; // Used by SCTRawDataProviderTool and others + virtual std::set<IdentifierHash> getErrorSet(int errorType, const EventContext& ctx) const override; // Used by SCTRawDataProviderTool and others + virtual std::set<IdentifierHash> getErrorSet(int errorType) const override; // Used by SCTRawDataProviderTool and others virtual unsigned int tempMaskedChips(const Identifier& moduleId, const EventContext& ctx) const override; // Internally used virtual unsigned int tempMaskedChips(const Identifier& moduleId) const override; @@ -95,17 +95,16 @@ private: ToolHandle<ISCT_ConfigurationConditionsTool> m_config{this, "ConfigTool", "SCT_ConfigurationConditionsTool/InDetSCT_ConfigurationConditionsTool", "Tool to retrieve SCT Configuration Tool"}; - const SCT_ID* m_sct_id{nullptr}; - IdContext m_cntx_sct; - SG::ReadHandleKey<IDCInDetBSErrContainer> m_bsIDCErrContainerName{this, "IDCByteStreamErrContainer", "SCT_ByteStreamErrs", "SCT BS error key for IDC variant"}; SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"}; + const SCT_ID* m_sct_id{nullptr}; + IdContext m_cntx_sct; mutable std::mutex m_cacheMutex{}; struct IDCCacheEntry { - EventContext::ContextEvt_t eventId = EventContext::INVALID_CONTEXT_EVT; // invalid event ID for the start - const IDCInDetBSErrContainer_Cache* IDCCache = nullptr; + EventContext::ContextEvt_t eventId{EventContext::INVALID_CONTEXT_EVT}; // invalid event ID for the start + const IDCInDetBSErrContainer_Cache* IDCCache{nullptr}; // infomations in granularity of Chips // misisng value mean that the map need updating // 0 as the value denotes no error @@ -114,14 +113,14 @@ private: std::map<Identifier, unsigned int> tempMaskedChips; std::map<Identifier, unsigned int> abcdErrorChips; - void reset( EventContext::ContextEvt_t evtId, const IDCInDetBSErrContainer_Cache* cache) { + void reset(EventContext::ContextEvt_t evtId, const IDCInDetBSErrContainer_Cache* cache) { eventId = evtId; - IDCCache = cache; + IDCCache = cache; tempMaskedChips.clear(); abcdErrorChips.clear(); } - bool needsUpdate( const EventContext& ctx) const { + bool needsUpdate(const EventContext& ctx) const { return eventId != ctx.evt() or eventId == EventContext::INVALID_CONTEXT_EVT; } @@ -156,7 +155,7 @@ private: * Method that returns BS Error code from the map passed @rag where-Expected * If the information is initially missing, the cache update is triggered **/ - std::pair<StatusCode, unsigned int> getErrorCodeWithCacheUpdate( const Identifier& id, const EventContext& ctx, std::map<Identifier, unsigned int>& whereExected ) const; + std::pair<StatusCode, unsigned int> getErrorCodeWithCacheUpdate(const Identifier& id, const EventContext& ctx, std::map<Identifier, unsigned int>& whereExected) const; }; diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorManager.h b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorManager.h index cb9e35342c786cccfa5e9ad129c5f82d35d2aaf1..8978d64411f7c8a7cf7f5e7266d784aff23567e4 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorManager.h +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorManager.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -22,8 +22,9 @@ #include "CLHEP/Geometry/Transform3D.h" -#include <string> #include <map> +#include <memory> +#include <string> class StoreGateSvc; class Identifier; @@ -117,7 +118,7 @@ class SiNumerology; GeoVAlignmentStore* alignStore=nullptr) const; /** Access to module design */ - void addDesign(const SiDetectorDesign *); + void addDesign(std::unique_ptr<const SiDetectorDesign>&&); int numDesigns() const; const SiDetectorDesign * getDesign(int i) const; @@ -126,7 +127,7 @@ class SiNumerology; SiNumerology & numerology() {return m_numerology;} /** Set SiCommonItems */ - void setCommonItems(const SiCommonItems* commonItems); + void setCommonItems(std::unique_ptr<const SiCommonItems>&& commonItems); private: //** Prevent copy and assignment */ @@ -144,8 +145,8 @@ class SiNumerology; std::string m_tag; SiNumerology m_numerology; - std::vector< const SiDetectorDesign *> m_designs; - const SiCommonItems* m_commonItems{nullptr}; + std::vector<std::unique_ptr<const SiDetectorDesign>> m_designs; + std::unique_ptr<const SiCommonItems> m_commonItems; }; diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorManager.cxx b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorManager.cxx index cd03cc6013fbb1e67f50f4f6f334e24da70a59e6..c9615b82e5749e468c45b8a2dc3134f1b9120078 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorManager.cxx +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorManager.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ @@ -33,10 +33,6 @@ namespace InDetDD SiDetectorManager::~SiDetectorManager() { - for (const SiDetectorDesign* design : m_designs) { - delete design; - } - delete m_commonItems; } const std::string& SiDetectorManager::tag() const @@ -139,9 +135,9 @@ namespace InDetDD } } - void SiDetectorManager::addDesign(const SiDetectorDesign * design) + void SiDetectorManager::addDesign(std::unique_ptr<const SiDetectorDesign>&& design) { - m_designs.push_back(design); + m_designs.push_back(std::move(design)); } int SiDetectorManager::numDesigns() const @@ -152,12 +148,12 @@ namespace InDetDD const SiDetectorDesign* SiDetectorManager::getDesign(int i) const { - return m_designs[i]; + return m_designs[i].get(); } - void SiDetectorManager::setCommonItems(const SiCommonItems* commonItems) + void SiDetectorManager::setCommonItems(std::unique_ptr<const SiCommonItems>&& commonItems) { - m_commonItems = commonItems; + m_commonItems = std::move(commonItems); } }// namespace InDetDD diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/DBM_Module.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/DBM_Module.cxx index 095ed9c37c9f2a47df6d477471257427f4b4f139..15fa038d8f6ff6d23e50f4339d8b1e6cbaaf1d3e 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/DBM_Module.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/DBM_Module.cxx @@ -40,7 +40,7 @@ DBM_Module::DBM_Module() { std::shared_ptr<const PixelDiodeMatrix> fullMatrix = makeMatrix(phiPitch, etaPitch, etaPitchLong, etaPitchLongEnd, circuitsPhi, circuitsEta, diodeRowPerCirc, diodeColPerCirc); - PixelModuleDesign *p_dbmdesign = new PixelModuleDesign(thickness, + std::unique_ptr<PixelModuleDesign> p_dbmdesign = std::make_unique<PixelModuleDesign>(thickness, circuitsPhi, circuitsEta, cellColPerCirc, @@ -51,9 +51,9 @@ DBM_Module::DBM_Module() { InDetDD::electrons, readoutSide); - m_design = p_dbmdesign; + m_design = p_dbmdesign.get(); - m_DDmgr->addDesign(m_design); + m_DDmgr->addDesign(std::move(p_dbmdesign)); } diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelSiCrystal.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelSiCrystal.cxx index 4df506d766e26e01791397a78a9b52bd213207e3..bf0c6299849654b4cc5288dbbd8779a3b25e3633 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelSiCrystal.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelSiCrystal.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // @@ -61,7 +61,7 @@ GeoPixelSiCrystal::GeoPixelSiCrystal(bool isBLayer, bool isModule3D) std::shared_ptr<const PixelDiodeMatrix> fullMatrix = makeMatrix(phiPitch, etaPitch, etaPitchLong, etaPitchLongEnd, circuitsPhi, circuitsEta, diodeRowPerCirc, diodeColPerCirc); - PixelModuleDesign *p_barrelDesign2 = new PixelModuleDesign(thickness, + std::unique_ptr<PixelModuleDesign> p_barrelDesign2 = std::make_unique<PixelModuleDesign>(thickness, circuitsPhi, circuitsEta, cellColPerCirc, @@ -125,9 +125,9 @@ GeoPixelSiCrystal::GeoPixelSiCrystal(bool isBLayer, bool isModule3D) } - m_design = p_barrelDesign2; + m_design = p_barrelDesign2.get(); - m_DDmgr->addDesign(m_design); + m_DDmgr->addDesign(std::move(p_barrelDesign2)); } diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorDC1DC2.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorDC1DC2.cxx index 2189e8c48221558d1f6ba470c548c3c1cb979701..3d60f10212cd3495dc6455c2b570dda25b060d16 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorDC1DC2.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorDC1DC2.cxx @@ -1208,7 +1208,7 @@ GeoPixelSiCrystal::GeoPixelSiCrystal(bool isBLayer) { std::shared_ptr<const PixelDiodeMatrix> fullMatrix = PixelDiodeMatrix::construct(PixelDiodeMatrix::phiDir, nullptr, singleRow, DiodeRowPerCirc, nullptr); - PixelModuleDesign *p_barrelDesign2 = new PixelModuleDesign(thickness, + std::unique_ptr<PixelModuleDesign> p_barrelDesign2 = std::make_unique<PixelModuleDesign>(thickness, CircPerCol, CircPerRow, CellColPerCirc, @@ -1257,9 +1257,9 @@ GeoPixelSiCrystal::GeoPixelSiCrystal(bool isBLayer) { } - m_design = p_barrelDesign2; + m_design = p_barrelDesign2.get(); - m_DDmgr->addDesign(m_design); + m_DDmgr->addDesign(std::move(p_barrelDesign2)); } GeoVPhysVol* GeoPixelSiCrystal::Build() { diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactory.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactory.cxx index b2e979b9888246909a53785ba4053cf2570e9a9a..778a81bb754d924ac6620f80fcd56ff9687fd6f3 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactory.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactory.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "PixelDetectorFactory.h" @@ -61,11 +61,11 @@ PixelDetectorFactory::PixelDetectorFactory(const PixelGeoModelAthenaComps * athe // Create SiCommonItems ans store it in geometry manager. // These are items that are shared by all elements - SiCommonItems * commonItems = new SiCommonItems(athenaComps->getIdHelper()); - m_geometryManager->setCommonItems(commonItems); + std::unique_ptr<SiCommonItems> commonItems{std::make_unique<SiCommonItems>(athenaComps->getIdHelper())}; + m_geometryManager->setCommonItems(commonItems.get()); // Add SiCommonItems to PixelDetectorManager to hold and delete it. - m_detectorManager->setCommonItems(commonItems); + m_detectorManager->setCommonItems(std::move(commonItems)); // Determine if initial layer and tag from the id dict are consistent bool initialLayoutIdDict = (m_detectorManager->tag() == "initial_layout"); diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactoryDC2.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactoryDC2.cxx index efa19afbe19791b3ceb2379b726f2545fce2ccd5..709bb24f4a1f028b46517468a5d60ec39e50ea41 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactoryDC2.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactoryDC2.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ @@ -51,8 +51,10 @@ PixelDetectorFactoryDC2::PixelDetectorFactoryDC2(const PixelGeoModelAthenaComps // Create SiCommonItems ans store it in geometry manager. // These are items that are shared by all elements - SiCommonItems * commonItems = new SiCommonItems(athenaComps->getIdHelper()); - geometryManager->setCommonItems(commonItems); + std::unique_ptr<SiCommonItems> commonItems{std::make_unique<SiCommonItems>(athenaComps->getIdHelper())}; + geometryManager->setCommonItems(commonItems.get()); + + m_detectorManager->setCommonItems(std::move(commonItems)); bool initialLayoutIdDict = (m_detectorManager->tag() == "initial_layout"); if (geometryManager->InitialLayout() != initialLayoutIdDict ) { diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactorySR1.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactorySR1.cxx index f2bd5a297391688ed83948d379737b87babf5b52..9cd82676e1132e6fa4216880aaab2b69f6dae38d 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactorySR1.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactorySR1.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "PixelDetectorFactorySR1.h" @@ -54,8 +54,10 @@ PixelDetectorFactorySR1::PixelDetectorFactorySR1(const PixelGeoModelAthenaComps // Create SiCommonItems ans store it in geometry manager. // These are items that are shared by all elements - SiCommonItems * commonItems = new SiCommonItems(athenaComps->getIdHelper()); - m_geometryManager->setCommonItems(commonItems); + std::unique_ptr<SiCommonItems> commonItems{std::make_unique<SiCommonItems>(athenaComps->getIdHelper())}; + m_geometryManager->setCommonItems(commonItems.get()); + + m_detectorManager->setCommonItems(std::move(commonItems)); // Determine if initial layer and tag from the id dict are consistent bool initialLayoutIdDict = (m_detectorManager->tag() == "initial_layout"); diff --git a/InnerDetector/InDetDetDescr/PixelReadoutGeometry/PixelReadoutGeometry/PixelDetectorManager.h b/InnerDetector/InDetDetDescr/PixelReadoutGeometry/PixelReadoutGeometry/PixelDetectorManager.h index 5954b00277dff9c645d7301236adb13d0dc87ece..8af16653bcc2bb614de4ace91d35df560c55bcb3 100755 --- a/InnerDetector/InDetDetDescr/PixelReadoutGeometry/PixelReadoutGeometry/PixelDetectorManager.h +++ b/InnerDetector/InDetDetDescr/PixelReadoutGeometry/PixelReadoutGeometry/PixelDetectorManager.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -162,9 +162,9 @@ namespace InDetDD { // data members std::vector<PVLink> m_volume; SiDetectorElementCollection m_elementCollection; - typedef std::map<Identifier, ExtendedAlignableTransform *> AlignableTransformMap; + typedef std::map<Identifier, std::unique_ptr<ExtendedAlignableTransform>> AlignableTransformMap; std::vector< AlignableTransformMap > m_higherAlignableTransforms; - std::vector< ExtendedAlignableTransform *> m_alignableTransforms; + std::vector< std::unique_ptr<ExtendedAlignableTransform> > m_alignableTransforms; const PixelID* m_idHelper; // Helpful function for debugging of transforms diff --git a/InnerDetector/InDetDetDescr/PixelReadoutGeometry/PixelReadoutGeometry/PixelModuleDesign.h b/InnerDetector/InDetDetDescr/PixelReadoutGeometry/PixelReadoutGeometry/PixelModuleDesign.h index 400f00af8ae849c02d0bf446efd3552ee4d9813e..cfb57df01ae11bb7af86cc45c3d189c121b04829 100755 --- a/InnerDetector/InDetDetDescr/PixelReadoutGeometry/PixelReadoutGeometry/PixelModuleDesign.h +++ b/InnerDetector/InDetDetDescr/PixelReadoutGeometry/PixelReadoutGeometry/PixelModuleDesign.h @@ -22,11 +22,11 @@ // Other includes #include "CxxUtils/CachedUniquePtr.h" #include "InDetIdentifier/PixelID.h" +#include "TrkSurfaces/RectangleBounds.h" #include <memory> namespace Trk{ - class RectangleBounds; class SurfaceBounds; } diff --git a/InnerDetector/InDetDetDescr/PixelReadoutGeometry/src/PixelDetectorManager.cxx b/InnerDetector/InDetDetDescr/PixelReadoutGeometry/src/PixelDetectorManager.cxx index 20247f9e09a28f33af40ac3f10e9694174876765..2316a666c8bed4ab7ca654eae4ad9dc418f43f8e 100755 --- a/InnerDetector/InDetDetDescr/PixelReadoutGeometry/src/PixelDetectorManager.cxx +++ b/InnerDetector/InDetDetDescr/PixelReadoutGeometry/src/PixelDetectorManager.cxx @@ -54,19 +54,6 @@ namespace InDetDD { for (size_t i=0; i < m_volume.size(); i++) { m_volume[i]->unref(); } - - for (size_t j=0; j < m_higherAlignableTransforms.size(); j++){ - AlignableTransformMap::iterator iterMap; - for (iterMap = m_higherAlignableTransforms[j].begin(); - iterMap != m_higherAlignableTransforms[j].end(); - ++iterMap) { - delete iterMap->second; - } - } - - for (size_t k=0; k < m_alignableTransforms.size(); k++){ - delete m_alignableTransforms[k]; - } } @@ -217,7 +204,7 @@ namespace InDetDD { if (frame == InDetDD::global) { - return setAlignableTransformGlobalDelta(m_alignableTransforms[idHash], delta, alignStore); + return setAlignableTransformGlobalDelta(m_alignableTransforms[idHash].get(), delta, alignStore); } else if (frame == InDetDD::local) { @@ -229,10 +216,10 @@ namespace InDetDD { if( m_isLogical ){ //Ensure cache is up to date and use the alignment corrected local to global transform element->setCache(); - return setAlignableTransformLocalDelta(m_alignableTransforms[idHash], element->transform(), delta, alignStore); + return setAlignableTransformLocalDelta(m_alignableTransforms[idHash].get(), element->transform(), delta, alignStore); } else //Use default local to global transform - return setAlignableTransformLocalDelta(m_alignableTransforms[idHash], element->defTransform(), delta, alignStore); + return setAlignableTransformLocalDelta(m_alignableTransforms[idHash].get(), element->defTransform(), delta, alignStore); } else { // other not supported msg(MSG::WARNING) << "Frames other than global or local are not supported." << endmsg; @@ -255,7 +242,7 @@ namespace InDetDD { if (iter == m_higherAlignableTransforms[index].end()) return false; // Its a global transform - return setAlignableTransformGlobalDelta(iter->second, delta, alignStore); + return setAlignableTransformGlobalDelta((iter->second).get(), delta, alignStore); } } @@ -287,13 +274,13 @@ namespace InDetDD { if (level == 0) { IdentifierHash idHash = m_idHelper->wafer_hash(id); if (idHash.is_valid()) { - m_alignableTransforms[idHash]= new ExtendedAlignableTransform(transform, child); + m_alignableTransforms[idHash]= std::make_unique<ExtendedAlignableTransform>(transform, child); } } else { // Higher levels are saved in a map. NB the index is level-1 as level=0 is treated above. int index = level - FIRST_HIGHER_LEVEL; if (index >= static_cast<int>(m_higherAlignableTransforms.size())) m_higherAlignableTransforms.resize(index+1); - m_higherAlignableTransforms[index][id] = new ExtendedAlignableTransform(transform, child); + m_higherAlignableTransforms[index][id] = std::make_unique<ExtendedAlignableTransform>(transform, child); } } } @@ -551,7 +538,7 @@ namespace InDetDD { // now we need to get the original alignment delta to apply this additional // shift to - ExtendedAlignableTransform* eat = m_alignableTransforms[idHash]; + ExtendedAlignableTransform* eat = m_alignableTransforms[idHash].get(); const GeoTrf::Transform3D* currentDelta = alignStore->getDelta(eat->alignableTransform()); if (currentDelta == nullptr) { ATH_MSG_ERROR("Have IBL Dist for element which does not have an alignment delta." diff --git a/InnerDetector/InDetDetDescr/PixelReadoutGeometry/src/PixelModuleDesign.cxx b/InnerDetector/InDetDetDescr/PixelReadoutGeometry/src/PixelModuleDesign.cxx index 24d6d8dca53b945cf3e236729309b63eb419b200..6b88b06e9aa33ce864712b5d8621f3e8a83219b1 100755 --- a/InnerDetector/InDetDetDescr/PixelReadoutGeometry/src/PixelModuleDesign.cxx +++ b/InnerDetector/InDetDetDescr/PixelReadoutGeometry/src/PixelModuleDesign.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -16,7 +16,6 @@ #include "Identifier/Identifier.h" #include "InDetReadoutGeometry/SiCellId.h" #include "InDetReadoutGeometry/SiReadoutCellId.h" -#include "TrkSurfaces/RectangleBounds.h" #include <cmath> diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_GeometryManager.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_GeometryManager.h index 00f34f8ee4ae451ca6b486576b228f4fdb456cb5..1ca2dfa998c859a9d41da7036ab0931678b7efb2 100644 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_GeometryManager.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_GeometryManager.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GeoModel_SCT_GeometryManager_H @@ -41,6 +41,7 @@ public: // To be passed to detector element. const InDetDD::SiCommonItems * commonItems() const; + void setCommonItems(const InDetDD::SiCommonItems* commonItems); const SCT_BarrelParameters * barrelParameters() const; const SCT_BarrelModuleParameters * barrelModuleParameters() const; @@ -56,7 +57,7 @@ private: SCT_Options m_options; const SCT_GeoModelAthenaComps * m_athenaComps; - InDetDD::SiCommonItems * m_commonItems; + const InDetDD::SiCommonItems * m_commonItems; SCT_DataBase* m_rdb; std::unique_ptr<SCT_BarrelParameters> m_barrelParameters; diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorFactory.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorFactory.cxx index a9768b1f18f85b42fd4c8499c8a9433f74b587fe..bf0223e215cc090f974e27ed73a77f9f827b9650 100644 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorFactory.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorFactory.cxx @@ -78,12 +78,16 @@ SCT_DetectorFactory::SCT_DetectorFactory(const SCT_GeoModelAthenaComps * athenaC // Create the material manager m_materials = std::make_unique<SCT_MaterialManager>(m_db.get()); + // Create the Si common items + std::unique_ptr<InDetDD::SiCommonItems> commonItems{std::make_unique<InDetDD::SiCommonItems>(athenaComps->getIdHelper())}; + // Create the geometry manager. m_geometryManager = std::make_unique<SCT_GeometryManager>(m_db.get()); m_geometryManager->setOptions(options); + m_geometryManager->setCommonItems(commonItems.get()); // Add SiCommonItems to SCT_DetectorManager to hold and delete it. - m_detectorManager->setCommonItems(m_geometryManager->commonItems()); + m_detectorManager->setCommonItems(std::move(commonItems)); m_useDynamicAlignFolders = options.dynamicAlignFolders(); diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdSensor.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdSensor.cxx index 1cd186388e2b7c647aa58d76b8841e1ec322ead4..7c3e2567b2437308380846df41da6834c1b74aeb 100644 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdSensor.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdSensor.cxx @@ -172,8 +172,6 @@ const GeoLogVol * SCT_FwdSensor::preBuild() // Make the moduleside design for this sensor makeDesign(); - m_detectorManager->addDesign(m_design); - return sensorLog; } @@ -279,7 +277,7 @@ void SCT_FwdSensor::makeDesign() int readoutSide = +1; // m_design will be owned and deleted by SCT_DetectorManager - m_design = new SCT_ForwardModuleSideDesign(m_thicknessN, + std::unique_ptr<SCT_ForwardModuleSideDesign> design = std::make_unique<SCT_ForwardModuleSideDesign>(m_thicknessN, crystals, diodes, cells, @@ -294,6 +292,8 @@ void SCT_FwdSensor::makeDesign() etaCenter, phiCenter, readoutSide); + m_design = design.get(); + m_detectorManager->addDesign(std::move(design)); // // Flags to signal if axis can be swapped. diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_GeometryManager.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_GeometryManager.cxx index 1b30a9a0adc4d3e78610469bf0fbe11f5bebfbe7..b64ebca2e32079db0693dda7066d175cb2ae8a09 100644 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_GeometryManager.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_GeometryManager.cxx @@ -17,11 +17,10 @@ SCT_GeometryManager::SCT_GeometryManager(SCT_DataBase* rdb) : m_athenaComps{rdb->athenaComps()}, + m_commonItems{nullptr}, m_rdb{rdb} { // This class uses reference counting. Should not be delete'd in destructor. - m_commonItems = new InDetDD::SiCommonItems(m_athenaComps->getIdHelper()); - m_barrelParameters = std::make_unique<SCT_BarrelParameters>(m_rdb); m_barrelModuleParameters = std::make_unique<SCT_BarrelModuleParameters>(m_rdb); m_forwardParameters = std::make_unique<SCT_ForwardParameters>(m_rdb); @@ -65,6 +64,12 @@ SCT_GeometryManager::commonItems() const return m_commonItems; } +void +SCT_GeometryManager::setCommonItems(const InDetDD::SiCommonItems* commonItems) +{ + m_commonItems = commonItems; +} + const SCT_BarrelParameters * SCT_GeometryManager::barrelParameters() const { diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Sensor.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Sensor.cxx index 92262a09defaf3ea5f8fa6baeb85d482422d46e9..92b518668eb09b049cdcaa25b515b0172b8fa46e 100644 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Sensor.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Sensor.cxx @@ -64,8 +64,6 @@ SCT_Sensor::preBuild() // Make the moduleside design for this sensor makeDesign(); - m_detectorManager->addDesign(m_design); - return sensorLog; } @@ -105,7 +103,7 @@ SCT_Sensor::makeDesign() int readoutSide = +1; // m_design will be owned and deleted by SCT_DetectorManager - m_design = new SCT_BarrelModuleSideDesign(m_thickness, + std::unique_ptr<SCT_BarrelModuleSideDesign> design = std::make_unique<SCT_BarrelModuleSideDesign>(m_thickness, crystals, diodes, cells, @@ -118,6 +116,9 @@ SCT_Sensor::makeDesign() xPhiStripPatternCenter, totalDeadLength, readoutSide); + m_design = design.get(); + m_detectorManager->addDesign(std::move(design)); + // // Flags to signal if axis can be swapped. // For rectangular detector these are all true. diff --git a/InnerDetector/InDetDigitization/PixelDigitization/CMakeLists.txt b/InnerDetector/InDetDigitization/PixelDigitization/CMakeLists.txt index ffcbb486feeb225131774d58b76cc901bb1ce382..f4aec89fd5b52bb50c4010cd6ccfc51aec94155d 100644 --- a/InnerDetector/InDetDigitization/PixelDigitization/CMakeLists.txt +++ b/InnerDetector/InDetDigitization/PixelDigitization/CMakeLists.txt @@ -42,7 +42,7 @@ atlas_add_component( PixelDigitization src/*.cxx src/components/*.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaBaseComps GaudiKernel CommissionEvent AthenaKernel PileUpToolsLib StoreGateLib SGtests Identifier GeneratorObjects PixelConditionsData SiPropertiesToolLib InDetIdentifier InDetReadoutGeometry PixelReadoutGeometry SiDigitization InDetRawData InDetSimData InDetSimEvent HitManagement PathResolver ) + LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaBaseComps GaudiKernel CommissionEvent AthenaKernel PileUpToolsLib StoreGateLib SGtests Identifier GeneratorObjects PixelConditionsData SiPropertiesToolLib InDetIdentifier InDetReadoutGeometry PixelReadoutGeometry SiDigitization InDetRawData InDetSimData InDetSimEvent HitManagement PathResolver PixelCablingLib InDetConditionsSummaryService ) # Install files from the package: atlas_install_python_modules( python/*.py ) diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/CMakeLists.txt b/InnerDetector/InDetDigitization/SCT_Digitization/CMakeLists.txt index 9b54e68095ab818cd6eece1ca98e7df9c04db241..99da0ad9e2ee583895491a8ed68148ab17bea59d 100644 --- a/InnerDetector/InDetDigitization/SCT_Digitization/CMakeLists.txt +++ b/InnerDetector/InDetDigitization/SCT_Digitization/CMakeLists.txt @@ -40,7 +40,7 @@ atlas_add_component( SCT_Digitization src/*.cxx src/components/*.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} CommissionEvent AthenaBaseComps AthenaKernel PileUpToolsLib Identifier xAODEventInfo GaudiKernel SiDigitization InDetRawData InDetSimEvent HitManagement GeneratorObjects SiPropertiesToolLib InDetIdentifier InDetReadoutGeometry SCT_ReadoutGeometry InDetSimData ) + LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} CommissionEvent AthenaBaseComps AthenaKernel PileUpToolsLib Identifier xAODEventInfo GaudiKernel SiDigitization InDetRawData InDetSimEvent HitManagement GeneratorObjects SiPropertiesToolLib InDetIdentifier InDetReadoutGeometry SCT_ReadoutGeometry InDetSimData InDetConditionsSummaryService SCT_ConditionsToolsLib SCT_ModuleDistortionsLib ) atlas_add_test( SCT_DigitizationMT_test SCRIPT Digi_tf.py --inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DigitizationTests/HITS.04919495._001041.pool.root.1 --conditionsTag default:OFLCOND-RUN12-SDR-25 --digiSeedOffset1 170 --digiSeedOffset2 170 --geometryVersion ATLAS-R2-2015-03-01-00 --DataRunNumber 222525 --outputRDOFile mc15_2015_ttbar.RDO.pool.root --preInclude HITtoRDO:SimulationJobOptions/preInclude.SCTOnlyConfig.py,Digitization/ForceUseOfAlgorithms.py --postInclude Digitization/FixDataDependenciesForMT.py --skipEvents 0 --maxEvents 100 --athenaopts=--threads=10 diff --git a/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTProcessingOfStraw.cxx b/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTProcessingOfStraw.cxx index 2a5154bc67f6b7301e977c4e5b8fe599627ba574..5e1969bc034b4f6af146a234e87538a747e9ab3d 100644 --- a/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTProcessingOfStraw.cxx +++ b/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTProcessingOfStraw.cxx @@ -780,8 +780,6 @@ void TRTProcessingOfStraw::ClustersToDeposits (MagField::AtlasFieldCache& fieldC //________________________________________________________________________________ Amg::Vector3D TRTProcessingOfStraw::getGlobalPosition ( int hitID, const TimedHitPtr<TRTUncompressedHit> *theHit ) { - Identifier IdStraw; - const int mask(0x0000001F); int word_shift(5); int trtID, ringID, moduleID, layerID, strawID; diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/CMakeLists.txt b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/CMakeLists.txt index 8f3e63f96d16469556043e84310c8911394b5fd5..20f9493414f8aa5153d05ffec31f3b23d8ac7e8e 100644 --- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/CMakeLists.txt +++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/CMakeLists.txt @@ -58,7 +58,7 @@ foreach( name atlas_add_test( ${name} SOURCES test/${name}.cxx - LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} + LINK_LIBRARIES AtlasHepMCLib IdDict IdDictParser InDetEventAthenaPool TestTools ENVIRONMENT "JOBOPTSEARCHPATH=${CMAKE_CURRENT_SOURCE_DIR}/share" PROPERTIES TIMEOUT 300 ) diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetCompetingRIOsOnTrack/CompetingSCT_ClustersOnTrackCnv_p1.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetCompetingRIOsOnTrack/CompetingSCT_ClustersOnTrackCnv_p1.cxx index 268a83fd6d889f75aaac49f6d4961f866aa4e7e2..eef3a18654177b49d30be7044403513f009b7288 100644 --- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetCompetingRIOsOnTrack/CompetingSCT_ClustersOnTrackCnv_p1.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetCompetingRIOsOnTrack/CompetingSCT_ClustersOnTrackCnv_p1.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "InDetCompetingRIOsOnTrack/CompetingSCT_ClustersOnTrack.h" @@ -17,15 +17,15 @@ CompetingSCT_ClustersOnTrackCnv_p1::persToTrans( const InDet::CompetingSCT_Clust std::vector< TPObjRef >::const_iterator it = persObj->m_containedChildRots.begin(), itE = persObj->m_containedChildRots.end(); - auto containedChildRots = new std::vector< const InDet::SCT_ClusterOnTrack * >; + std::vector< const InDet::SCT_ClusterOnTrack * > containedChildRots; for (; it!=itE;it++) { ITPConverterFor<Trk::MeasurementBase> *rotCnv = 0; const InDet::SCT_ClusterOnTrack* mcot = dynamic_cast<const InDet::SCT_ClusterOnTrack*>(createTransFromPStore(&rotCnv, *it, log)); - containedChildRots->push_back( mcot ); + containedChildRots.push_back( mcot ); } - *transObj = InDet::CompetingSCT_ClustersOnTrack (containedChildRots, + *transObj = InDet::CompetingSCT_ClustersOnTrack (std::move(containedChildRots), nullptr); fillTransFromPStore( &m_cRotCnv, persObj->m_competingROT, transObj, log ); } diff --git a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/CMakeLists.txt b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/CMakeLists.txt index cc2823f983d9c54cd05ba81a54a9e1976c5fc373..a4970c31bac10a0e7efe0d91478d22a1dd07fb06 100644 --- a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/CMakeLists.txt +++ b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/CMakeLists.txt @@ -45,5 +45,5 @@ atlas_add_component( PixelRawDataByteStreamCnv LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} ByteStreamData GaudiKernel InDetRawData AthenaBaseComps AthContainers StoreGateLib ByteStreamCnvSvcBaseLib InDetIdentifier InDetReadoutGeometry PixelReadoutGeometry IRegionSelector - xAODEventInfo TrigSteeringEvent InDetByteStreamErrors PixelConditionsData PixelRawDataByteStreamCnvLib ) + xAODEventInfo TrigSteeringEvent InDetByteStreamErrors PixelConditionsData PixelRawDataByteStreamCnvLib PixelCablingLib PixelConditionsToolsLib ) diff --git a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.cxx b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.cxx index a3fb4946519762f62a45d4d39d2de9da38644b43..bb6e6616afc5d49b865109c9eeb9f921359e5347 100644 --- a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.cxx +++ b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.cxx @@ -44,8 +44,8 @@ inline bool isDBM( uint32_t robId ) { return ((robId>>16) & 0xFF)==0x15; } PixelRodDecoder::PixelRodDecoder ( const std::string& type, const std::string& name,const IInterface* parent ) : AthAlgTool(type,name,parent), - m_is_ibl_present(false), - m_pixelCabling("PixelCablingSvc",name) + m_pixelCabling("PixelCablingSvc",name), + m_is_ibl_present(false) { declareInterface< IPixelRodDecoder >( this ); } @@ -111,7 +111,7 @@ StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, IPixelRD ATH_MSG_DEBUG("Entering PixelRodDecoder"); #endif - Identifier invalidPixelId = Identifier(); // used by Cabling for an invalid entry + const Identifier invalidPixelId = Identifier(); // used by Cabling for an invalid entry Identifier pixelId; uint64_t onlineId(0); @@ -328,8 +328,7 @@ StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, IPixelRD if (mLink < 0x8) ++nFragmentsPerFE[mLink]; } - - else { // decode Pixel header word. Data format: 001PtlbxdnnnnnnnMMMMLLLLBBBBBBBB + else { // this is Pixels detector decode header word. Data format: 001PtlbxdnnnnnnnMMMMLLLLBBBBBBBB (NOT IBL OR PIXEL) ATH_MSG_VERBOSE( "Decoding Pixel header word: 0x" << std::hex << rawDataWord << std::dec ); @@ -338,59 +337,13 @@ StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, IPixelRD mLink = decodeModule(rawDataWord); // decode Pixel link (module): n //mLVL1IDskip = decodeL1IDskip(rawDataWord); // decode Pixel skipped LVL1ID: M -- temporarily removed - /* - // If decoding fragment from same FE as previous one, do LVL1ID and BCID checks - if (mLink == prevLinkNum) { - - // Check that L1ID is the same for all fragments - if (mLVL1ID != prevLVL1ID && prevLVL1ID != 0x3FFF) { - ATH_MSG_WARNING("In ROB " << std::hex << robId << ": got header with LVL1ID unequal to previous one (LVL1ID = 0x" - << mLVL1ID << ", prevLVL1ID = 0x" << prevLVL1ID << ")" << std::dec); - } - // Check that BCIDs are consecutive - if ((mBCID != prevBCID + 1) && prevBCID != 0x3FFF && prevBCID != mBCID_max_pix) { - ATH_MSG_WARNING("In ROB " << std::hex << robId << ": got header with non-consecutive BCIDs (BCID = 0x" - << mBCID << ", prevBCID = 0x" << prevBCID << ")" << std::dec); - } - } - else { // If decoding new FE, check BCID offset - offsetBCID_ROB_FE = static_cast<int>(mBCID) - robBCID; - if (offsetBCID_ROB_FE != prevOffsetBCID_ROB_FE && (offsetBCID_ROB_FE != 0x3FFF && prevOffsetBCID_ROB_FE != 0x3FFF)) { - ATH_MSG_WARNING("In ROB 0x" << std::hex << robId << std::dec << ": got FE header with unexpected BCID offset" - << " wrt to ROB header (offset = " << offsetBCID_ROB_FE << ", expected " << prevOffsetBCID_ROB_FE << ")"); - } - // Check that first fragment from each FE starts at the same BCID - if (mBCID != prevStartingBCID && prevStartingBCID != 0x3FFF) { - ATH_MSG_WARNING("In ROB 0x" << std::hex << robId << ": BCID starts at different value than in previous FE (BCID = 0x" << mBCID - << ", prev starting BCID = 0x" << prevStartingBCID << ")" << std::dec); - } - prevStartingBCID = mBCID; - } - */ - - uint32_t headererror = decodeHeaderErrors(rawDataWord); // get link (module) header errors - if (headererror != 0) { // only treatment for header errors now, FIXME + const uint32_t headerError = decodeHeaderErrors(rawDataWord); // get link (module) header errors + if ( headerError != 0 ) { sc = StatusCode::RECOVERABLE; - errorcode = errorcode | (headererror << 20); //encode error as HHHHMMMMMMMMFFFFFFFFTTTT for header, flagword, trailer errors - if (headererror & (1 << 3)) { - m_errors->addPreambleError(); - PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::Preamble ); - } - if (headererror & (1 << 2)) { - m_errors->addTimeOutError(); - PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::TimeOut ); - } - if (headererror & (1 << 1)) { - m_errors->addLVL1IDError(); - PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::LVL1ID ); - } - if (headererror & (1 << 0)) { - m_errors->addBCIDError(); - PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::BCID ); - } + errorcode = errorcode | (headerError << 20); //encode error as HHHHMMMMMMMMFFFFFFFFTTTT for header, flagword, trailer errors + checkHeaderErrors( bsErrCode, headerError ); } - } - + } // end of detector type decoding // Get onlineId onlineId = pixCabling->getOnlineIdFromRobId(robId, mLink); @@ -833,55 +786,19 @@ StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, IPixelRD // mSkippedTrigTrailer = decodeSkippedTrigTrailer_IBL(rawDataWord); // decode skipped trigger counter bits => M -- temporarily removed - uint32_t trailererror = decodeTrailerErrors_IBL(rawDataWord); // => E cPpl bzhv // taking all errors together. - - // Create a copy without the useless 'c' bit - uint32_t trailererror_noC = 0; - trailererror_noC = (trailererror & 0x7F) | ((trailererror & 0x100) >> 1); + const uint32_t trailerError = decodeTrailerErrors_IBL(rawDataWord); // => E cPpl bzhv // taking all errors together. // Insert trailer errors into errorcode (except the 'c' bit) // CCC CCCC CCCC CCCC CCCC EPpl bzhv - errorcode = errorcode | trailererror_noC; + const uint32_t trailerError_noC = (trailerError & 0x7F) | ((trailerError & 0x100) >> 1); + errorcode = errorcode | trailerError_noC; - // Add errors to errorsvc - if (trailererror & (1 << 8)) { // time out error bit => E - m_errors->addTimeOutError(); - PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::TimeOut ); - } - if (trailererror & (1 << 7)) // condensed mode bit => W + checkTrailerErrorsIBL( bsErrCode, trailerError ); + if (trailerError & (1 << 7)) // condensed mode bit => W if (!receivedCondensedWords) { generalwarning("In ROB 0x" << std::hex << robId << ", link 0x" << mLink << ": condensed mode bit is set, but no condensed words received" << std::dec); - } - if (trailererror & (1 << 6)) {// link masked by PPC => P - m_errors->addLinkMaskedByPPC(); - PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::LinkMaskedByPPC ); - } - if (trailererror & (1 << 5)) { // preamble error bit => p - m_errors->addPreambleError(); - PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::Preamble ); - } - if (trailererror & (1 << 4)) { // LVL1 error bit => l - m_errors->addLVL1IDError(); - PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::LVL1ID ); - } - if (trailererror & (1 << 3)) {// BCID error bit => b - m_errors->addBCIDError(); - PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::BCID ); - } - if (trailererror & (1 << 2)) { // trailer error bit => z - m_errors->addTrailerError(); - PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::Trailer ); - } - if (trailererror & (1 << 1)) { // header/trailer limit error=> h - m_errors->addLimitError(); - PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::Limit ); - } - if (trailererror & (1 << 0)) { // data overflow error=> v - m_errors->addInvalidIdentifier(); - PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::Invalid ); - } - + } // Write the error word to the service if (offlineIdHash != 0xffffffff && errorcode) { m_errors->setFeErrorCode(offlineIdHash, (mLink & 0x1), errorcode); @@ -921,26 +838,13 @@ StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, IPixelRD ATH_MSG_VERBOSE( "Decoding Pixel trailer word: 0x" << std::hex << rawDataWord << std::dec ); - uint32_t trailererror = decodeTrailerErrors(rawDataWord); // creating link (module) trailer error variable + const uint32_t trailerError = decodeTrailerErrors(rawDataWord); // creating link (module) trailer error variable //mBitFlips = decodeTrailerBitflips(rawDataWord); -- temporarily removed - if (trailererror != 0) { + if (trailerError != 0) { sc = StatusCode ::RECOVERABLE; - errorcode = errorcode | trailererror; //encode error as HHHHMMMMMMMMFFFFFFFFTTTT for header, flagword, trailer errors - //for now just sum all trailer errors - if (trailererror & (1 << 3)) - m_errors->addTrailerError(); - if (trailererror & (1 << 2)) - m_errors->addTrailerError(); - if (trailererror & (1 << 1)) - m_errors->addTrailerError(); - if (trailererror & (1 << 0)) - m_errors->addTrailerError(); - // TODO, above looks like a bug, compared to previous meaning of trailer error bits. For the sake of consistency reproduce it. - if ( trailererror & 0xf ) { - PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::Trailer ); - } - + errorcode = errorcode | trailerError; //encode error as HHHHMMMMMMMMFFFFFFFFTTTT for header, flagword, trailer errors + checkTrailerErrors( bsErrCode, trailerError); } } if ( offlineIdHash != 0xffffffff ) { // now write the error word to the service @@ -1072,44 +976,12 @@ StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, IPixelRD } // end of switch } // end of loop over ROD - if (corruptionError) { - //Set EventInfo error - const xAOD::EventInfo* eventInfo=nullptr; - ATH_CHECK(evtStore()->retrieve(eventInfo)); - if (!eventInfo->updateErrorState(xAOD::EventInfo::Pixel,xAOD::EventInfo::Error)) { - ATH_MSG_WARNING(" cannot set EventInfo error state for Pixel " ); - } - if (!eventInfo->updateEventFlagBit(xAOD::EventInfo::Pixel,0x1)) { //FIXME an enum at some appropriate place to indicating 0x1 as - ATH_MSG_WARNING(" cannot set flag bit for Pixel " ); - } - } // end if corruption error + ATH_CHECK( updateEventInfoIfEventCorruted( corruptionError ) ); - // Verify that all active IBL FEs sent the same number of headers + // Verify that all active IBL FEs sent the same number of headers if (isIBLModule || isDBMModule) { - unsigned int nFrags = 0; - for (unsigned int i = 0; i < 8; ++i) { - if (nFrags == 0) { - if (nFragmentsPerFE[i] != 0) nFrags = nFragmentsPerFE[i]; // set nFrags on first non-zero occurence - } - else { - if (nFragmentsPerFE[i] != 0 && nFragmentsPerFE[i] != nFrags) { - // Got unequal number of headers per FE for same ROD, this means trouble. - // Print value for each FE - char tempstr[20]; - std::string errmsg; - for (unsigned int j = 0; j < 8; ++j) { - if (nFragmentsPerFE[j] != 0) { - sprintf(tempstr, "FE %d: %d ", j, nFragmentsPerFE[j]); - errmsg.append(tempstr); - } - } - generalwarning("In ROB 0x" << std::hex << robId << ": got unequal number of headers per FE" << std::dec); - generalwarning("[FE number] : [# headers] - " << errmsg); - break; - } - } - } + checkUnequalNumberOfHeaders( nFragmentsPerFE, robId ); } if (sc == StatusCode::RECOVERABLE) { @@ -1850,3 +1722,121 @@ uint32_t PixelRodDecoder::treatmentFEFlagInfo(unsigned int serviceCode, unsigned } +void PixelRodDecoder::checkHeaderErrors( uint64_t& bsErrorCode, uint32_t headerError ) const { + if (headerError != 0) { // only treatment for header errors now, FIXME + if (headerError & (1 << 3)) { + m_errors->addPreambleError(); + PixelByteStreamErrors::addError( bsErrorCode, PixelByteStreamErrors::Preamble ); + } + if (headerError & (1 << 2)) { + m_errors->addTimeOutError(); + PixelByteStreamErrors::addError( bsErrorCode, PixelByteStreamErrors::TimeOut ); + } + if (headerError & (1 << 1)) { + m_errors->addLVL1IDError(); + PixelByteStreamErrors::addError( bsErrorCode, PixelByteStreamErrors::LVL1ID ); + } + if (headerError & (1 << 0)) { + m_errors->addBCIDError(); + PixelByteStreamErrors::addError( bsErrorCode, PixelByteStreamErrors::BCID ); + } + } +} + + +StatusCode PixelRodDecoder::updateEventInfoIfEventCorruted( bool isCorrupted ) const { + if ( not isCorrupted ) + return StatusCode::SUCCESS; + //Set EventInfo error + const xAOD::EventInfo* eventInfo=nullptr; + ATH_CHECK(evtStore()->retrieve(eventInfo)); + if (!eventInfo->updateErrorState(xAOD::EventInfo::Pixel,xAOD::EventInfo::Error)) { + ATH_MSG_WARNING(" cannot set EventInfo error state for Pixel " ); + } + if (!eventInfo->updateEventFlagBit(xAOD::EventInfo::Pixel,0x1)) { //FIXME an enum at some appropriate place to indicating 0x1 as + ATH_MSG_WARNING(" cannot set flag bit for Pixel " ); + } + return StatusCode::SUCCESS; +} + + +void PixelRodDecoder::checkUnequalNumberOfHeaders( const unsigned int nFragmentsPerFE[8], uint32_t robId ) const { + unsigned int nFrags = 0; + bool foundIssue = false; + for (unsigned int i = 0; i < 8; ++i) { + if (nFrags == 0) { + if (nFragmentsPerFE[i] != 0) + nFrags = nFragmentsPerFE[i]; // set nFrags on first non-zero occurence + } else { + if (nFragmentsPerFE[i] != 0 && nFragmentsPerFE[i] != nFrags) { + foundIssue = true; + } + } + } + if ( not foundIssue ) + return; + + // Got unequal number of headers per FE for same ROD, this means trouble. + // Print value for each FE + std::string errmsg; + for (unsigned int j = 0; j < 8; ++j) { + if (nFragmentsPerFE[j] != 0) { + errmsg += "FE "+ std::to_string(j) + " " +std::to_string(nFragmentsPerFE[j]) + " "; + } + } + generalwarning("In ROB 0x" << std::hex << robId << ": got unequal number of headers per FE" << std::dec); + generalwarning("[FE number] : [# headers] - " << errmsg); +} + +void PixelRodDecoder::checkTrailerErrors( uint64_t& bsErrorCode, uint32_t trailerError ) const { + //for now just sum all trailer errors + if (trailerError & (1 << 3)) + m_errors->addTrailerError(); + if (trailerError & (1 << 2)) + m_errors->addTrailerError(); + if (trailerError & (1 << 1)) + m_errors->addTrailerError(); + if (trailerError & (1 << 0)) + m_errors->addTrailerError(); + + if ( trailerError & 0xF ) { + PixelByteStreamErrors::addError( bsErrorCode, PixelByteStreamErrors::Trailer ); + } +} + +void PixelRodDecoder::checkTrailerErrorsIBL( uint64_t& bsErrorCode, uint32_t trailerError ) const { + // Add errors to errorsvc + if (trailerError & (1 << 8)) { // time out error bit => E + m_errors->addTimeOutError(); + PixelByteStreamErrors::addError( bsErrorCode, PixelByteStreamErrors::TimeOut ); + } + + if (trailerError & (1 << 6)) {// link masked by PPC => P + m_errors->addLinkMaskedByPPC(); + PixelByteStreamErrors::addError( bsErrorCode, PixelByteStreamErrors::LinkMaskedByPPC ); + } + if (trailerError & (1 << 5)) { // preamble error bit => p + m_errors->addPreambleError(); + PixelByteStreamErrors::addError( bsErrorCode, PixelByteStreamErrors::Preamble ); + } + if (trailerError & (1 << 4)) { // LVL1 error bit => l + m_errors->addLVL1IDError(); + PixelByteStreamErrors::addError( bsErrorCode, PixelByteStreamErrors::LVL1ID ); + } + if (trailerError & (1 << 3)) {// BCID error bit => b + m_errors->addBCIDError(); + PixelByteStreamErrors::addError( bsErrorCode, PixelByteStreamErrors::BCID ); + } + if (trailerError & (1 << 2)) { // trailer error bit => z + m_errors->addTrailerError(); + PixelByteStreamErrors::addError( bsErrorCode, PixelByteStreamErrors::Trailer ); + } + if (trailerError & (1 << 1)) { // header/trailer limit error=> h + m_errors->addLimitError(); + PixelByteStreamErrors::addError( bsErrorCode, PixelByteStreamErrors::Limit ); + } + if (trailerError & (1 << 0)) { // data overflow error=> v + m_errors->addInvalidIdentifier(); + PixelByteStreamErrors::addError( bsErrorCode, PixelByteStreamErrors::Invalid ); + } +} diff --git a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.h b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.h index e5a15c2f32e894a14ef258dec6f7975fef796331..8589c5b99f923538f4d904b1f0e24b803231578a 100644 --- a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.h +++ b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.h @@ -46,10 +46,6 @@ class PixelRodDecoder : virtual public IPixelRodDecoder, public AthAlgTool { StatusCode StoreBSError() const override; - inline void setDet( const eformat::SubDetector det ); - bool m_is_ibl_present; - bool m_is_ibl_module; - bool m_is_dbm_module; uint32_t getDataType(unsigned int rawDataWord, bool link_start) const; // determine module word type @@ -133,15 +129,14 @@ class PixelRodDecoder : virtual public IPixelRodDecoder, public AthAlgTool { private: mutable std::atomic_uint m_masked_errors{}; mutable std::atomic_uint m_numGenWarnings{}; - unsigned m_maxNumGenWarnings{200}; // Maximum number of general warnings to print + const unsigned m_maxNumGenWarnings{200}; // Maximum number of general warnings to print mutable std::atomic_uint m_numBCIDWarnings{}; - unsigned m_maxNumBCIDWarnings{50}; // Maximum number of BCID and LVL1ID warnings to print + const unsigned m_maxNumBCIDWarnings{50}; // Maximum number of BCID and LVL1ID warnings to print BooleanProperty m_checkDuplicatedPixel{this, "CheckDuplicatedPixel", true, "Check duplicated pixels in fillCollection method"}; ServiceHandle<IPixelCablingSvc> m_pixelCabling; const PixelID* m_pixel_id=nullptr; - eformat::SubDetector m_det{eformat::SubDetector()}; ToolHandle<IPixelByteStreamErrorsTool> m_errors {this, "PixelByteStreamErrorsTool", "PixelByteStreamErrorsTool", "Tool for PixelByteStreamError"}; @@ -160,11 +155,25 @@ class PixelRodDecoder : virtual public IPixelRodDecoder, public AthAlgTool { //! checks if data words do not look like header & trailer markers, return true if so, this is sign of data corruption bool checkDataWordsCorruption( uint32_t word ) const; + + //!< flags concerning the detector configuration; set at config time + bool m_is_ibl_present; + bool m_is_ibl_module; + bool m_is_dbm_module; + + //!< if there are errors in the header, save info in error word and (for now) report to BS error tool + void checkHeaderErrors( uint64_t& bsErrorWord, uint32_t headerWord ) const; + + //!< if there are errors in the trailer, save info in error word and (for now) report to BS error tool + void checkTrailerErrors( uint64_t& bsErrorWord, uint32_t headerWord ) const; + void checkTrailerErrorsIBL( uint64_t& bsErrorWord, uint32_t headerWord ) const; + + //!< if the flag is set to true appropriate bits are set in event info + StatusCode updateEventInfoIfEventCorruted( bool isCorrupted ) const; + + //!< checks if all FEs have sent the same number of headers, if not, generate warning message + void checkUnequalNumberOfHeaders( const unsigned int nFragmentsPerFE[8], uint32_t robId ) const; }; -inline void PixelRodDecoder::setDet( const eformat::SubDetector det ) -{ - m_det = det; -} #endif diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCT_RodDecoder.cxx b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCT_RodDecoder.cxx index 9efdfee05fdb2e6333c6392dbae515c5cd5139d2..d46040e03c9328eeeb0283cea9250b2a7951c3f2 100644 --- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCT_RodDecoder.cxx +++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCT_RodDecoder.cxx @@ -79,78 +79,78 @@ StatusCode SCT_RodDecoder::finalize() << m_lastExpHitNumber << " last consecutive strips with hit in expanded mode"); if (m_headErrorBCID > 0) { - ATH_MSG_INFO("SCT BytestreamCnv summary: header-> " - << m_headErrorLvl1ID << " LVL1d errors found"); + ATH_MSG_INFO("SCT BytestreamCnv summary: header-> " + << m_headErrorLvl1ID << " LVL1d errors found"); } if (m_headErrorTimeout > 0) { - ATH_MSG_INFO("SCT BytestreamCnv summary: header-> " - << m_headErrorTimeout << " timeout errors found"); + ATH_MSG_INFO("SCT BytestreamCnv summary: header-> " + << m_headErrorTimeout << " timeout errors found"); } if (m_headErrorFormatter > 0) { - ATH_MSG_INFO("SCT BytestreamCnv summary: header-> " - << m_headErrorFormatter << " formatter errors found"); + ATH_MSG_INFO("SCT BytestreamCnv summary: header-> " + << m_headErrorFormatter << " formatter errors found"); } if (m_headErrorPreamble > 0) { - ATH_MSG_INFO("SCT BytestreamCnv summary: header-> " - << m_headErrorPreamble << " preamble errors found"); + ATH_MSG_INFO("SCT BytestreamCnv summary: header-> " + << m_headErrorPreamble << " preamble errors found"); } if (m_maskedLinkNumber > 0) { - ATH_MSG_INFO("SCT BytestreamCnv summary: header-> " - << m_maskedLinkNumber << " masked links found"); + ATH_MSG_INFO("SCT BytestreamCnv summary: header-> " + << m_maskedLinkNumber << " masked links found"); } if (m_trailerErrorOverflow > 0) { - ATH_MSG_INFO("SCT BytestreamCnv summary: trailer-> " - << m_trailerErrorOverflow << " trailer data overflow errors found"); + ATH_MSG_INFO("SCT BytestreamCnv summary: trailer-> " + << m_trailerErrorOverflow << " trailer data overflow errors found"); } if (m_trailerErrorLimit > 0) { - ATH_MSG_INFO("SCT BytestreamCnv summary: trailer-> " - << m_trailerErrorLimit << " header trailer limit errors found"); + ATH_MSG_INFO("SCT BytestreamCnv summary: trailer-> " + << m_trailerErrorLimit << " header trailer limit errors found"); } if (m_trailerErrorBit > 0) { - ATH_MSG_INFO("SCT BytestreamCnv summary: trailer-> " - << m_trailerErrorBit << " trailer bit errors found"); + ATH_MSG_INFO("SCT BytestreamCnv summary: trailer-> " + << m_trailerErrorBit << " trailer bit errors found"); } if (m_configDataBit > 0) { - ATH_MSG_INFO("SCT BytestreamCnv summary: raw Data-> " - << m_configDataBit << " raw data found: Config data mode"); + ATH_MSG_INFO("SCT BytestreamCnv summary: raw Data-> " + << m_configDataBit << " raw data found: Config data mode"); } if (m_flagErrorBit > 0) { - ATH_MSG_INFO("SCT BytestreamCnv summary: flag-> " - << m_flagErrorBit << " module link flag bit errors found"); + ATH_MSG_INFO("SCT BytestreamCnv summary: flag-> " + << m_flagErrorBit << " module link flag bit errors found"); } if (m_condHit1Error > 0) { - ATH_MSG_INFO("SCT BytestreamCnv summary: hit-> " - << m_condHit1Error << " 1st hit error found in condensed mode"); + ATH_MSG_INFO("SCT BytestreamCnv summary: hit-> " + << m_condHit1Error << " 1st hit error found in condensed mode"); } if (m_condHit2Error > 0) { - ATH_MSG_INFO("SCT BytestreamCnv summary: hit-> " - << m_condHit2Error << " 2nd hit error found in condensed mode"); + ATH_MSG_INFO("SCT BytestreamCnv summary: hit-> " + << m_condHit2Error << " 2nd hit error found in condensed mode"); } if (m_chipNumberError > 0) { - ATH_MSG_INFO("SCT BytestreamCnv summary: hit-> " - << m_chipNumberError << " Chip number > 5 error found"); + ATH_MSG_INFO("SCT BytestreamCnv summary: hit-> " + << m_chipNumberError << " Chip number > 5 error found"); } if (m_unknownDataFormat > 0) { - ATH_MSG_INFO("SCT BytestreamCnv summary: unknown data-> " - << m_unknownDataFormat << " Unknown data format found"); + ATH_MSG_INFO("SCT BytestreamCnv summary: unknown data-> " + << m_unknownDataFormat << " Unknown data format found"); } if (m_rodClockErrorNumber > 0) { - ATH_MSG_INFO("SCT BytestreamCnv summary: ROD status word-> " - << m_rodClockErrorNumber << " ROD clock errors found"); + ATH_MSG_INFO("SCT BytestreamCnv summary: ROD status word-> " + << m_rodClockErrorNumber << " ROD clock errors found"); } if (m_maskedRODNumber > 0) { - ATH_MSG_INFO("SCT BytestreamCnv summary: ROB status word-> " - << m_maskedRODNumber << " masked RODs found"); + ATH_MSG_INFO("SCT BytestreamCnv summary: ROB status word-> " + << m_maskedRODNumber << " masked RODs found"); } if (m_truncatedRODNumber > 0) { - ATH_MSG_INFO("SCT BytestreamCnv summary: ROB status word-> " - << m_truncatedRODNumber << " truncated ROBFragments"); + ATH_MSG_INFO("SCT BytestreamCnv summary: ROB status word-> " + << m_truncatedRODNumber << " truncated ROBFragments"); } ATH_MSG_INFO("Number of SCT hits in ByteStream-> " << m_nHits); @@ -174,11 +174,11 @@ StatusCode SCT_RodDecoder::finalize() **/ class SCT_RodDecoderErrorsHelper { public: - SCT_RodDecoderErrorsHelper( IDCInDetBSErrContainer& idcContainer ) + SCT_RodDecoderErrorsHelper(IDCInDetBSErrContainer& idcContainer) : errorsIDC{ idcContainer } {} ~SCT_RodDecoderErrorsHelper() { - for ( auto [id, err]: accumulatedErrors ) { - errorsIDC.setOrDrop( id, err ); + for (auto [id, err]: accumulatedErrors) { + errorsIDC.setOrDrop(id, err); } } void noerror(const IdentifierHash id) { @@ -200,7 +200,7 @@ StatusCode SCT_RodDecoder::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROB IDCInDetBSErrContainer& errorsIDC, const std::vector<IdentifierHash>* vecHash) const { - SCT_RodDecoderErrorsHelper errs( errorsIDC ); // on destruction will fill the IDC + SCT_RodDecoderErrorsHelper errs{errorsIDC}; // on destruction will fill the IDC const uint32_t robID{robFrag.rod_source_id()}; // Determine whether this data was generated using the ROD simulator const uint32_t rodDataType{robFrag.rod_detev_type()}; @@ -774,7 +774,7 @@ StatusCode SCT_RodDecoder::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROB ATH_MSG_DEBUG("ABCD error and online ID have different side information for hash " << currentLinkIDHash << ". " << sideABCDError << " from ABCD error and " << currentLinkIDHash.value()%2 << " from online ID"); currentLinkIDHash = (currentLinkIDHash.value()/2)*2+sideABCDError; - errs.noerror(currentLinkIDHash); + errs.noerror(currentLinkIDHash); } // Chip should be 0-5 or 8-13. if (chip%8>=N_CHIPS_PER_SIDE) { @@ -915,7 +915,7 @@ int SCT_RodDecoder::makeRDO(int strip, int groupSize, int timeBin, ISCT_RDO_Container& rdoIDCont, CacheHelper& cache, const std::vector<int>& errorHit, - SCT_RodDecoderErrorsHelper & errs) const + SCT_RodDecoderErrorsHelper& errs) const { if (((strip & 0x7f) + (groupSize-1) >= N_STRIPS_PER_CHIP) or (strip<0) or (strip>=N_STRIPS_PER_SIDE)) { ATH_MSG_WARNING("Cluster with " << groupSize << " strips, starting at strip " << strip @@ -944,7 +944,7 @@ int SCT_RodDecoder::makeRDO(int strip, int groupSize, int timeBin, } } - if(rdoIDCont.hasExternalCache() and rdoIDCont.tryAddFromCache(collIDHash)){ + if (rdoIDCont.hasExternalCache() and rdoIDCont.tryAddFromCache(collIDHash)) { ATH_MSG_DEBUG("Hash already in collection - cache hit " << collIDHash); return 0; } @@ -977,7 +977,7 @@ int SCT_RodDecoder::makeRDO(int strip, int groupSize, int timeBin, ATH_MSG_DEBUG(" Collection ID = " << collIDHash << " does not exist, create it "); // Create new collection sctRDOColl = new SCT_RDO_Collection(collIDHash); - errs.noerror( collIDHash ); // make sure the error information is filled for this ID + errs.noerror(collIDHash); // make sure the error information is filled for this ID sctRDOColl->setIdentifier(collID); StatusCode sc{rdoIDCont.addCollection(sctRDOColl, collIDHash)}; ATH_MSG_DEBUG("Adding " << collIDHash); diff --git a/InnerDetector/InDetExample/InDetBeamSpotExample/share/VxSplitValTemplate.py b/InnerDetector/InDetExample/InDetBeamSpotExample/share/VxSplitValTemplate.py index 0acff42648934fe0a951c54eaf822864d7e18f20..7db9e525c08ffead89ddf5d269c35e61a8418843 100644 --- a/InnerDetector/InDetExample/InDetBeamSpotExample/share/VxSplitValTemplate.py +++ b/InnerDetector/InDetExample/InDetBeamSpotExample/share/VxSplitValTemplate.py @@ -470,15 +470,6 @@ elif InDetFlags.primaryVertexSetup() == 'AdaptiveMultiFinding': selectiontype = 0, do3dSplitting = InDetFlags.doPrimaryVertex3DFinding()) -elif InDetFlags.primaryVertexSetup() == 'DefaultVKalVrtFinding': - # - # load vkal vertex finder tool - # - from InDetVKalPriVxFinderTool.InDetVKalPriVxFinderTool import InDet__InDetVKalPriVxFinderTool - InDetPriVxFinderTool = InDet__InDetVKalPriVxFinderTool(name = "InDetVKalPriVxFinder", - TrackSummaryTool = InDetTrackSummaryTool, - FitterTool = InDetVxFitterTool, - BeamConstraint = InDetFlags.useBeamConstraint()) ToolSvc += InDetPriVxFinderTool if InDetFlags.doPrintConfigurables: diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTErrMonAlg.cxx b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTErrMonAlg.cxx index a29a4483fa03afe8e46c3bc859ee220ad3ed94cf..bc7f213eef47b25805f46d28b5762120db3bf611 100644 --- a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTErrMonAlg.cxx +++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTErrMonAlg.cxx @@ -281,7 +281,8 @@ SCTErrMonAlg::fillByteStreamErrors(const EventContext& ctx) const { } // Coverage check is time consuming and run at the first event of each lumi block. - if (m_coverageCheck and m_firstEventOfLB[pEvent->lumiBlock()]) { + if (m_coverageCheck and + (not m_coverageCheckOnlyFirtsEventOfLB or m_firstEventOfLB[pEvent->lumiBlock()])) { m_firstEventOfLB[pEvent->lumiBlock()] = false; ATH_MSG_DEBUG("Detector Coverage calculation starts" ); diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTErrMonAlg.h b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTErrMonAlg.h index 8e07f89dbd60d25bb58d9085a31e46c0e448e935..99c57e2d233effc7f55f00b4503bb0edebc2e9d5 100644 --- a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTErrMonAlg.h +++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTErrMonAlg.h @@ -92,6 +92,7 @@ class SCTErrMonAlg : public AthMonitorAlgorithm { BooleanProperty m_makeConfHisto{this, "MakeConfHisto", true}; BooleanProperty m_coverageCheck{this, "CoverageCheck", true}; + BooleanProperty m_coverageCheckOnlyFirtsEventOfLB{this, "CoverageCheckOnlyFirtsEventOfLB", true}; BooleanProperty m_useDCS{this, "UseDCS", true}; BooleanProperty m_doPerLumiErrors{this, "DoPerLumiErrors", true, "Do lumi block 2D error histos"}; diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTTracksMonAlg.cxx b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTTracksMonAlg.cxx index 8b3b28245f38e9fcc365d3a75b80a4daa7afe284..9997ee98a6b0e0cda8174e23cbea0cf603ba57ae 100644 --- a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTTracksMonAlg.cxx +++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTTracksMonAlg.cxx @@ -95,13 +95,9 @@ ATH_MSG_DEBUG("SCTTracksMonAlg::fillHistograms()"); int local_scthits{0}; int scthits_on_trk{0}; // Breaks out of loop if track has less than 3 sct hits - std::unique_ptr<const Trk::TrackSummary> trkSum = std::make_unique<const Trk::TrackSummary>(*(track->trackSummary())); + std::unique_ptr<const Trk::TrackSummary> trkSum = m_trackSummaryTool->summary (*track); if (trkSum==nullptr) { - trkSum.reset(m_trackSummaryTool->createSummary(*track)); //creates new object on heap - if (trkSum==nullptr) { - ATH_MSG_WARNING("Trk::TrackSummary is null and cannot be created by " << m_trackSummaryTool.name()); - continue; - } + ATH_MSG_WARNING("Trk::TrackSummary is null and cannot be created by " << m_trackSummaryTool.name()); } if (trkSum) { diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/src/TRTOverlay.cxx b/InnerDetector/InDetRawAlgs/InDetOverlay/src/TRTOverlay.cxx index c7b73f5877aeb62cc718c56c574ca69049d46308..0b6a8f1b013a685559468385154db13da03c5a10 100644 --- a/InnerDetector/InDetRawAlgs/InDetOverlay/src/TRTOverlay.cxx +++ b/InnerDetector/InDetRawAlgs/InDetOverlay/src/TRTOverlay.cxx @@ -147,15 +147,13 @@ StatusCode TRTOverlay::overlayContainer(const TRT_RDO_Container *bkgContainer, TRT_RDO_Container *outputContainer, const InDetSimDataCollection *signalSDOCollection) const { - // Get all the hashes for the signal container - const std::vector<IdentifierHash> signalHashes = signalContainer->GetAllCurrentHashes(); // There are some use cases where background is empty if (!bkgContainer) { // Only loop through the signal collections and copy them over - for (const IdentifierHash &hashId : signalHashes) { + for (const auto &[hashId, ptr] : signalContainer->GetAllHashPtrPair()) { // Copy the signal collection - std::unique_ptr<TRT_RDO_Collection> signalCollection = Overlay::copyCollection(hashId, signalContainer->indexFindPtr(hashId)); + std::unique_ptr<TRT_RDO_Collection> signalCollection = Overlay::copyCollection(hashId, ptr); if (outputContainer->addCollection(signalCollection.get(), hashId).isFailure()) { ATH_MSG_ERROR("Adding signal Collection with hashId " << hashId << " failed"); @@ -176,21 +174,21 @@ StatusCode TRTOverlay::overlayContainer(const TRT_RDO_Container *bkgContainer, // Retrieve the occupancy map std::map<int, double> occupancyMap = m_TRT_LocalOccupancyTool->getDetectorOccupancy(bkgContainer); - // Get all the hashes for the background container - const std::vector<IdentifierHash> bkgHashes = bkgContainer->GetAllCurrentHashes(); // The MC signal container should typically be smaller than bkgContainer, // because the latter contains all the noise, minimum bias and pile up. // Thus we firstly iterate over signal hashes and store them in a map. - std::map<IdentifierHash, bool> overlapMap; - for (const IdentifierHash &hashId : signalHashes) { - overlapMap.emplace(hashId, false); + std::vector < std::pair<IdentifierHash, bool> > overlapMap; + overlapMap.reserve(signalContainer->numberOfCollections()); + for (const auto &[hashId, ptr] : signalContainer->GetAllHashPtrPair()) { + overlapMap.emplace_back(hashId, false); } // Now loop through the background hashes and copy unique ones over - for (const IdentifierHash &hashId : bkgHashes) { - auto search = overlapMap.find(hashId); - if (search == overlapMap.end()) { + for (const auto &[hashId, ptr] : bkgContainer->GetAllHashPtrPair()) { + auto search = std::lower_bound( overlapMap.begin(), overlapMap.end(), hashId, + [](const std::pair<IdentifierHash, bool> &lhs, IdentifierHash rhs) -> bool { return lhs.first < rhs; } ); + if (search == overlapMap.end() || search->first != hashId) { // Copy the background collection std::unique_ptr<TRT_RDO_Collection> bkgCollection = Overlay::copyCollection(hashId, bkgContainer->indexFindPtr(hashId)); diff --git a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/CMakeLists.txt b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/CMakeLists.txt index 90332a3b9a07e9805cea252f96592bb40c7ae7df..2572ba80199fe8fc041b24907b38141c231f183c 100644 --- a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/CMakeLists.txt +++ b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/CMakeLists.txt @@ -30,7 +30,7 @@ atlas_depends_on_subdirs( PUBLIC atlas_add_component( InDetPrepRawDataFormation src/*.cxx src/components/*.cxx - LINK_LIBRARIES AthenaBaseComps StoreGateLib SGtests IRegionSelector Identifier GaudiKernel InDetRawData InDetPrepRawData SiClusterizationToolLib TrigSteeringEvent AtlasDetDescr InDetIdentifier InDetReadoutGeometry InDetByteStreamErrors AthViews) + LINK_LIBRARIES AthenaBaseComps StoreGateLib SGtests IRegionSelector Identifier GaudiKernel InDetRawData InDetPrepRawData SiClusterizationToolLib TrigSteeringEvent AtlasDetDescr InDetIdentifier InDetReadoutGeometry InDetByteStreamErrors AthViews SCT_ConditionsData TRT_DriftCircleToolLib ) # Install files from the package: atlas_install_headers( InDetPrepRawDataFormation ) diff --git a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/PixelClusterization.cxx b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/PixelClusterization.cxx index f6560df5b1205ee7407b0ec22b8ab62aa8be41d0..bf694c1e3ed653d2e7fb9c9036426575935eb41e 100644 --- a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/PixelClusterization.cxx +++ b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/PixelClusterization.cxx @@ -138,7 +138,7 @@ namespace InDet{ const COLLECTION* RDO_Collection(*rdoCollections); if (!RDO_Collection || RDO_Collection->empty()) continue; PixelClusterContainer::IDC_WriteHandle lock = clusterContainer->getWriteHandle(rdoCollections.hashId()); - if( lock.alreadyPresent() ) continue; + if( lock.OnlineAndPresentInAnotherView() ) continue; // Use one of the specific clustering AlgTools to make clusters std::unique_ptr<PixelClusterCollection> clusterCollection (m_clusteringTool->clusterize(*RDO_Collection, *m_idHelper)); @@ -172,7 +172,7 @@ namespace InDet{ if (!RDO_Collection) continue; PixelClusterContainer::IDC_WriteHandle lock = clusterContainer->getWriteHandle(listOfPixIds[i]); - if( lock.alreadyPresent() ) continue; + if( lock.OnlineAndPresentInAnotherView() ) continue; // Use one of the specific clustering AlgTools to make clusters std::unique_ptr<PixelClusterCollection> clusterCollection (m_clusteringTool->clusterize(*RDO_Collection, *m_idHelper)); diff --git a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/SCT_Clusterization.cxx b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/SCT_Clusterization.cxx index d4304456c733894681100bec6082d536be5fd0b5..0392d0aa6d5161b0fba8f77f16f7e6ce85abf6cd 100644 --- a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/SCT_Clusterization.cxx +++ b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/SCT_Clusterization.cxx @@ -119,7 +119,7 @@ namespace InDet { const InDetRawDataCollection<SCT_RDORawData>* rd{*rdoCollections}; ATH_MSG_DEBUG("RDO collection size=" << rd->size() << ", Hash=" << rd->identifyHash()); SCT_ClusterContainer::IDC_WriteHandle lock{clusterContainer->getWriteHandle(rdoCollections.hashId())}; - if (lock.alreadyPresent()) { + if (lock.OnlineAndPresentInAnotherView()) { ATH_MSG_DEBUG("Item already in cache , Hash=" << rd->identifyHash()); continue; } @@ -187,7 +187,7 @@ namespace InDet { SCT_ClusterContainer::IDC_WriteHandle lock{clusterContainer->getWriteHandle(listOfSCTIds[i])}; - if (lock.alreadyPresent()) { + if (lock.OnlineAndPresentInAnotherView()) { ATH_MSG_DEBUG("Item already in cache , Hash=" << listOfSCTIds[i]); continue; } diff --git a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/TRT_RIO_Maker.cxx b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/TRT_RIO_Maker.cxx index b5351ac681a4282614e476d39e0b4ed7a0ede5e3..0008dcf25499700fa4a942159bcbb53a2a6ebe8a 100644 --- a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/TRT_RIO_Maker.cxx +++ b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/TRT_RIO_Maker.cxx @@ -96,7 +96,7 @@ namespace InDet { for(const auto& rdoCollections : *rdoContainer) { const InDetRawDataCollection<TRT_RDORawData>* currentCollection(rdoCollections); InDet::TRT_DriftCircleContainer::IDC_WriteHandle lock = rioContainer->getWriteHandle(currentCollection->identifyHash()); - if( lock.alreadyPresent() ) continue; + if( lock.OnlineAndPresentInAnotherView() ) continue; std::unique_ptr<TRT_DriftCircleCollection> p_rio(m_driftcircle_tool->convert(m_mode_rio_production, currentCollection, ctx, m_trtBadChannels)); if(p_rio && !p_rio->empty()) { @@ -120,7 +120,7 @@ namespace InDet { const InDetRawDataCollection<TRT_RDORawData>* RDO_Collection (rdoContainer->indexFindPtr(id)); if (!RDO_Collection) continue; InDet::TRT_DriftCircleContainer::IDC_WriteHandle lock = rioContainer->getWriteHandle(id); - if( lock.alreadyPresent() ) continue; + if( lock.OnlineAndPresentInAnotherView() ) continue; // Use one of the specific clustering AlgTools to make clusters std::unique_ptr<TRT_DriftCircleCollection> p_rio(m_driftcircle_tool->convert(m_mode_rio_production, diff --git a/InnerDetector/InDetRecAlgs/InDetZVTOP_Alg/CMakeLists.txt b/InnerDetector/InDetRecAlgs/InDetZVTOP_Alg/CMakeLists.txt deleted file mode 100644 index 9c0c0da0f630868c6d7f4a4fb7308211985466ea..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetRecAlgs/InDetZVTOP_Alg/CMakeLists.txt +++ /dev/null @@ -1,26 +0,0 @@ -################################################################################ -# Package: InDetZVTOP_Alg -################################################################################ - -# Declare the package name: -atlas_subdir( InDetZVTOP_Alg ) - -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Control/AthenaBaseComps - GaudiKernel - Tracking/TrkEvent/TrkParticleBase - PRIVATE - InnerDetector/InDetRecTools/InDetRecToolInterfaces - Tracking/TrkEvent/TrkTrack - Tracking/TrkEvent/VxVertex ) - -# Component(s) in the package: -atlas_add_component( InDetZVTOP_Alg - src/*.cxx - src/components/*.cxx - LINK_LIBRARIES AthenaBaseComps GaudiKernel TrkParticleBase InDetRecToolInterfaces TrkTrack VxVertex ) - -# Install files from the package: -atlas_install_headers( InDetZVTOP_Alg ) - diff --git a/InnerDetector/InDetRecAlgs/InDetZVTOP_Alg/InDetZVTOP_Alg/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetRecAlgs/InDetZVTOP_Alg/InDetZVTOP_Alg/ATLAS_CHECK_THREAD_SAFETY deleted file mode 100644 index ba4b2e20a5e4cac3d465c61c20c866c1e2328a44..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetRecAlgs/InDetZVTOP_Alg/InDetZVTOP_Alg/ATLAS_CHECK_THREAD_SAFETY +++ /dev/null @@ -1 +0,0 @@ -InnerDetector/InDetRecAlgs/InDetZVTOP_Alg diff --git a/InnerDetector/InDetRecAlgs/InDetZVTOP_Alg/InDetZVTOP_Alg/InDetZVTOP_Alg.h b/InnerDetector/InDetRecAlgs/InDetZVTOP_Alg/InDetZVTOP_Alg/InDetZVTOP_Alg.h deleted file mode 100755 index 7828c716660085ece136bcab01c27ff45849cad5..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetRecAlgs/InDetZVTOP_Alg/InDetZVTOP_Alg/InDetZVTOP_Alg.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/////////////////////////////////////////////////////////////////// -// InDetZVTOP_Alg.h, (c) ATLAS Detector software -// begin : 30-10-2006 -// authors : Tatjana Lenz -// email : tatjana.lenz@cern.ch -// changes : -/////////////////////////////////////////////////////////////////// - -#ifndef INDETZVTOP_ALG_H -#define INDETZVTOP_ALG_H - -// Gaudi includes -#include "AthenaBaseComps/AthAlgorithm.h" -#include "GaudiKernel/ToolHandle.h" -#include "TrkParticleBase/TrackParticleBase.h" -namespace InDet -{ - - /** @class InDetZVTOP_Alg - ---Topological Vertex Finder --- - This Algorithm reconstructs a set of topological vertices each - associated with an independent subset of the charged tracks. - Vertices are reconstructed by associating tracks with 3D spatial regions - according to the vertex probability function which is based on the trajectories - and position resolution of the tracks. - - Docu: "A Topological Vertex Reconstruction Algorithm for Hadronic Jets" - by David J. Jackson, SLAC-PUB-7215, December 1996 - - @author Tatjana Lenz <tatjana.lenz@cern.ch> - */ - - class IVertexFinder; - - class InDetZVTOP_Alg : public AthAlgorithm - { - public: - - /** Standard Athena-Algorithm Constructor */ - InDetZVTOP_Alg(const std::string& name, ISvcLocator* pSvcLocator); - /** Default Destructor */ - ~InDetZVTOP_Alg(); - - /** standard Athena-Algorithm method */ - StatusCode initialize(); - /** standard Athena-Algorithm method */ - StatusCode execute(); - /** standard Athena-Algorithm method */ - StatusCode finalize(); - - private: - - /** member variables for algorithm properties: */ - - std::string m_tracksName; //!< Name of track container in StoreGate - std::string m_vxCollectionOutputName; //!< Name of output container to store results - - ToolHandle <IVertexFinder> m_VertexFinderTool; - - - }; -} // end of namespace - -#endif diff --git a/InnerDetector/InDetRecAlgs/InDetZVTOP_Alg/doc/packagedoc.h b/InnerDetector/InDetRecAlgs/InDetZVTOP_Alg/doc/packagedoc.h deleted file mode 100644 index fc896bb881af3051de31871f6c35cc724ac3df33..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetRecAlgs/InDetZVTOP_Alg/doc/packagedoc.h +++ /dev/null @@ -1,19 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/** -@page InDetZVTOP_Alg_page ZVTOP_Algs Package - -contains: <br> -- ConversionFinder.cxx <br> - -@author Tatjana Lenz <tatjana.lenz@cern.ch> - -@section InDetZVTOP_Alg_ZVTOP_AlgsIntro Introduction - -ZVTOP_Algs is a package which contains algorithm to reconstruct vertices. The only job is to call a vertex finder tool - InDetZVTOPVxFinder (see InnerDetector/InDetRecTools/InDetZVTOPVxFinder). The topological vertex finder has been developed by David J. Jackson, Nucl.Instrum.Meth.A388: 247-253, 1997 and now implemented to ATHENA and adjusted to ATLAS requirements. It reconstructs a set of vertices & associated subset of the charged tracks. The association accords to a vertex probability function which is based on the trajectories and position resolution of the tracks. - - - -*/ diff --git a/InnerDetector/InDetRecAlgs/InDetZVTOP_Alg/src/InDetZVTOP_Alg.cxx b/InnerDetector/InDetRecAlgs/InDetZVTOP_Alg/src/InDetZVTOP_Alg.cxx deleted file mode 100755 index ef1fe93810a471d7cace51553624a8258288842a..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetRecAlgs/InDetZVTOP_Alg/src/InDetZVTOP_Alg.cxx +++ /dev/null @@ -1,119 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/////////////////////////////////////////////////////////////////// -// InDetZVTOP_Alg.cxx, (c) ATLAS Detector software -// begin : 30-10-2006 -// authors : Tatjana Lenz -// email : tatjana.lenz@cern.ch -// changes : -/////////////////////////////////////////////////////////////////// - -#include "InDetZVTOP_Alg/InDetZVTOP_Alg.h" -#include "InDetRecToolInterfaces/IVertexFinder.h" -#include "TrkTrack/TrackCollection.h" -#include "TrkParticleBase/TrackParticleBaseCollection.h" -#include "VxVertex/VxContainer.h" - -//================ Constructor ================================================= - -InDet::InDetZVTOP_Alg::InDetZVTOP_Alg(const std::string& name, ISvcLocator* pSvcLocator) - : - AthAlgorithm(name,pSvcLocator), - m_tracksName("Tracks"), - m_vxCollectionOutputName("VxCollection"), - m_VertexFinderTool("InDet::ZVTOP_Tool") -{ - // template for property declaration - declareProperty("TracksName",m_tracksName); - declareProperty("VxCollectionOutputName",m_vxCollectionOutputName); - declareProperty("VertexFinderTool",m_VertexFinderTool); -} - -//================ Destructor ================================================= - -InDet::InDetZVTOP_Alg::~InDetZVTOP_Alg() -{} - - -//================ Initialisation ================================================= - -StatusCode InDet::InDetZVTOP_Alg::initialize() -{ - // Code entered here will be executed once at program start. - - msg (MSG::INFO) << MSG::INFO << name() << " initialize()" << endmsg; - - /* Get the VertexFinderTool */ - if ( m_VertexFinderTool.retrieve().isFailure() ) { - msg( MSG::FATAL ) << "Failed to retrieve tool " << m_VertexFinderTool << endmsg; - return StatusCode::FAILURE; - } else msg ( MSG::INFO ) << "Retrieved tool " << m_VertexFinderTool<< endmsg; - - - msg ( MSG::INFO ) << "initialize() successful in " << name() << endmsg; - return StatusCode::SUCCESS; -} - -//================ Finalisation ================================================= - -StatusCode InDet::InDetZVTOP_Alg::finalize() -{ - // Code entered here will be executed once at the end of the program run. - return StatusCode::SUCCESS; -} - -//================ Execution ==================================================== - -StatusCode InDet::InDetZVTOP_Alg::execute() -{ - //VxContainer* theVxContainer(0); --David S. - xAOD::VertexContainer* theXAODContainer = 0; - xAOD::VertexAuxContainer* theXAODAuxContainer = 0; - std::pair<xAOD::VertexContainer*,xAOD::VertexAuxContainer*> theXAODContainers - = std::make_pair( theXAODContainer, theXAODAuxContainer ); - std::string vxContainerAuxName = m_vxCollectionOutputName + "Aux."; - - //---- Retrieve tracks from StoreGate section ----------------------------------------// - if(evtStore()->contains<TrackCollection>(m_tracksName)) - { - const TrackCollection *trackTES(0); - if (evtStore()->retrieve(trackTES, m_tracksName).isFailure()) - { - if(msgLvl(MSG::DEBUG)) msg() << "Could not find TrackCollection " << m_tracksName << " in StoreGate." << endmsg; - return StatusCode::SUCCESS; - } else if (msgLvl(MSG::VERBOSE)) msg() << "Find TrackCollection " << m_tracksName << " in StoreGate." << endmsg; - if (msgLvl(MSG::VERBOSE)) msg() << "Number of tracks = " << trackTES->size() << endmsg; - //theVxContainer = m_VertexFinderTool->findVertex(trackTES); --David S. - theXAODContainers = m_VertexFinderTool->findVertex(trackTES); - } - else { - if (msgLvl(MSG::DEBUG)) msg() << "Not TrackCollection with key " << m_tracksName << " exist." << endmsg; - //add check for xAOD::TrackParticleContainer --David S. - if(evtStore()->contains<xAOD::TrackParticleContainer>(m_tracksName)) - { - if (msgLvl (MSG::DEBUG)) msg() << "xAOD::TrackParticleContainer with key " << m_tracksName << " found, but no findVertex method implemented yet for these objects." << endmsg; - } - } - //---- Recording section: write the results to StoreGate ---// - //if (msgLvl(MSG::VERBOSE)) msg() << "Recording to StoreGate: " << m_vxCollectionOutputName << endmsg; --David S. - if (msgLvl(MSG::VERBOSE)) msg() << "Recording to StoreGate: " << m_vxCollectionOutputName << " with AuxContainer " << vxContainerAuxName << endmsg; - //if (evtStore()->record(theVxContainer,m_vxCollectionOutputName,false).isFailure()) --David S. - if (evtStore()->record(theXAODContainers.first,m_vxCollectionOutputName,false).isFailure()) - { - //if (msgLvl(MSG::INFO)) msg() << "Unable to record VxContainer in TDS" << endmsg; --David S. - if (msgLvl(MSG::INFO)) msg() << "Unable to record VertexContainer in TDS" << endmsg; - return StatusCode::FAILURE; - } - //add record AuxContainer to StoreGate --David S. - if (evtStore()->record(theXAODContainers.second,vxContainerAuxName).isFailure()) - { - if (msgLvl(MSG::INFO)) msg() << "Unable to record VertexAuxContainer in TDS" << endmsg; - return StatusCode::FAILURE; - } - return StatusCode::SUCCESS; -} - -//============================================================================================ - diff --git a/InnerDetector/InDetRecAlgs/InDetZVTOP_Alg/src/components/InDetZVTOP_Alg_entries.cxx b/InnerDetector/InDetRecAlgs/InDetZVTOP_Alg/src/components/InDetZVTOP_Alg_entries.cxx deleted file mode 100644 index f32c0279c77db947f8a1d47defb3e8340d824366..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetRecAlgs/InDetZVTOP_Alg/src/components/InDetZVTOP_Alg_entries.cxx +++ /dev/null @@ -1,6 +0,0 @@ -#include "InDetZVTOP_Alg/InDetZVTOP_Alg.h" - -using namespace InDet; - -DECLARE_COMPONENT( InDetZVTOP_Alg ) - diff --git a/InnerDetector/InDetRecAlgs/SiSPSeededTrackFinder/SiSPSeededTrackFinder/SiSPSeededTrackFinder.h b/InnerDetector/InDetRecAlgs/SiSPSeededTrackFinder/SiSPSeededTrackFinder/SiSPSeededTrackFinder.h index 7045eabac514bf253f14053457e735bb010f894d..4b9d96b0e3e4e44b6b4c4b6bb234bf3823dd27f0 100644 --- a/InnerDetector/InDetRecAlgs/SiSPSeededTrackFinder/SiSPSeededTrackFinder/SiSPSeededTrackFinder.h +++ b/InnerDetector/InDetRecAlgs/SiSPSeededTrackFinder/SiSPSeededTrackFinder/SiSPSeededTrackFinder.h @@ -140,10 +140,10 @@ namespace InDet { //@{ mutable Counter_t m_counterTotal ATLAS_THREAD_SAFE {}; - mutable std::atomic_int m_neventsTotal{0}; //!< Number events - mutable std::atomic_int m_neventsTotalV{0}; //!< Number events - mutable std::atomic_int m_problemsTotal{0}; //!< Number events with number seeds > maxNumber - mutable std::atomic_int m_problemsTotalV{0}; //!< Number events with number seeds > maxNumber + mutable std::atomic_int m_neventsTotal{0}; ///< Number events + mutable std::atomic_int m_neventsTotalV{0}; ///< Number events + mutable std::atomic_int m_problemsTotal{0}; ///< Number events with number seeds > maxNumber + mutable std::atomic_int m_problemsTotalV{0}; ///< Number events with number seeds > maxNumber //@} /////////////////////////////////////////////////////////////////// @@ -157,21 +157,61 @@ namespace InDet { MsgStream& dumpevent(MsgStream& out, const SiSPSeededTrackFinder::Counter_t& counter) const; //@} - bool isGoodEvent(const EventContext& ctx) const; //!< EventContext is used to specify which event - double trackQuality(const Trk::Track*) const; - void filterSharedTracks(std::multimap<double, Trk::Track*>&) const; + // check event quality - mainly used for HI events + bool isGoodEvent(const EventContext& ctx) const; ///< EventContext is used to specify which event + + /** \brief assign a quality score to track candidates. + * + * The score is increased for each hit, depending on the + * technology (pix/sct) and the chi2 of the hit. + * A hit will never *reduce* the total score compared to having no hit at all. + * @param [in] track Track to evaluate the quality of + **/ + double trackQuality(const Trk::Track* track) const; + + /** \brief cleans up the collection of quality filtered tracks. + * + * Candidates which share most of their hits (steered by m_freeCut) + * with higher quality candidates are erased from the multimap + * @param [in,out] scoredTracks: Track candidates, sorted by by score, best scored first (implemented by assigning negative sign to scores) + **/ + void filterSharedTracks(std::multimap<double, Trk::Track*>& scoredTracks) const; + + /** fills three z0 histograms (non-weighted, weighted by z, and weighted by pt) + * with the track z at the beam line estimated using the innermost measurement. + * the first two parameters are input, the other three output. + * @param [in] Tr Track candidate to fill + * @param [in] beamlinePerigee Perigee surface corresponding to the beam spot + * @param [out] numberWeightedhistogram vector representing a histogram in z, counting the tracks per bin + * @param [out] zWeightedHistogram vector representing a histogram in z, counting the tracks per bin weighted by their z values + * @param [out] ptWeightedHistogram vector representing a histogram in z, counting the tracks per bin weighted by their pt values + **/ void fillZHistogram(const Trk::Track* Tr, - Trk::PerigeeSurface& per, - std::vector<int>& nhistogram, - std::vector<double>& zhistogram, - std::vector<double>& phistogram) const; - void findZvertex(std::list<Trk::Vertex>& ZV, - double* ZB, - std::vector<int>& nhistogram, - std::vector<double>& zhistogram, - std::vector<double>& phistogram) const; - StatusCode oldStrategy(const EventContext& ctx) const; //!< EventContext is used to specify which event - StatusCode newStrategy(const EventContext& ctx) const; //!< EventContext is used to specify which event + const Trk::PerigeeSurface& beamlinePerigee, + std::vector<int>& numberWeightedhistogram, + std::vector<double>& zWeightedHistogram, + std::vector<double>& ptWeightedHistogram) const; + + /** estimates a set of vertex positions and a z interval for the second + * track finding pass using the input histograms populated using fillZHistogram. + * the first two arguments serve as output, while the three histograms are input. + * @param [out] vertexList - will be populated with vertex candidates if m_useNewStrategy is set + * @param [out] zBoundaries - will be populated with edges of a z interval corresponding to the estimated vertex locations + * @param [in] numberWeightedhistogram vector representing a histogram in z, counting the tracks per bin + * @param [in] zWeightedHistogram vector representing a histogram in z, counting the tracks per bin weighted by their z values + * @param [in] ptWeightedHistogram vector representing a histogram in z, counting the tracks per bin weighted by their pt values + **/ + void findZvertex(std::list<Trk::Vertex>& vertexList, + std::pair<double, double> & zBoundaries, + const std::vector<int>& numberWeightedhistogram, + const std::vector<double>& zWeightedHistogram, + const std::vector<double>& ptWeightedHistogram) const; + + /// this method performs the track finding using the old strategy + StatusCode oldStrategy(const EventContext& ctx) const; ///< EventContext is used to specify which event + + /// this method performs the track finding using the new strategy + StatusCode newStrategy(const EventContext& ctx) const; ///< EventContext is used to specify which event void magneticFieldInit(); }; diff --git a/InnerDetector/InDetRecAlgs/SiSPSeededTrackFinder/src/SiSPSeededTrackFinder.cxx b/InnerDetector/InDetRecAlgs/SiSPSeededTrackFinder/src/SiSPSeededTrackFinder.cxx index ecb5f351240d460a8ca07cb95abb9264e16a6a1d..5aa4a2a13ccb2e0e08ae5bf78909f25495d2004f 100644 --- a/InnerDetector/InDetRecAlgs/SiSPSeededTrackFinder/src/SiSPSeededTrackFinder.cxx +++ b/InnerDetector/InDetRecAlgs/SiSPSeededTrackFinder/src/SiSPSeededTrackFinder.cxx @@ -12,7 +12,7 @@ #include <set> /////////////////////////////////////////////////////////////////// -// Constructor +/// Constructor /////////////////////////////////////////////////////////////////// InDet::SiSPSeededTrackFinder::SiSPSeededTrackFinder @@ -21,7 +21,7 @@ InDet::SiSPSeededTrackFinder::SiSPSeededTrackFinder } /////////////////////////////////////////////////////////////////// -// Initialisation +/// Initialisation /////////////////////////////////////////////////////////////////// StatusCode InDet::SiSPSeededTrackFinder::initialize() @@ -35,16 +35,14 @@ StatusCode InDet::SiSPSeededTrackFinder::initialize() } ATH_CHECK(m_outputTracksKey.initialize()); - // optional PRD to track association map + /// optional PRD to track association map ATH_CHECK( m_prdToTrackMap.initialize( !m_prdToTrackMap.key().empty() ) ); - // Get tool for space points seed maker - // + /// Get tool for space points seed maker ATH_CHECK( m_seedsmaker.retrieve() ); ATH_CHECK( m_zvertexmaker.retrieve( DisableTool{ not m_useZvertexTool } )); - // Get track-finding tool - // + /// Get track-finding tool ATH_CHECK( m_trackmaker.retrieve()); ATH_CHECK( m_trackSummaryTool.retrieve( DisableTool{ m_trackSummaryTool.name().empty()} )); @@ -58,16 +56,13 @@ StatusCode InDet::SiSPSeededTrackFinder::initialize() if (not m_beamSpotKey.key().empty()) { ATH_CHECK(m_beamSpotKey.initialize()); - // Get RungeKutta propagator tool - // + /// Get RungeKutta propagator tool ATH_CHECK( m_proptool.retrieve() ); - // Setup for magnetic field - // + /// Setup for magnetic field magneticFieldInit(); - // Setup for Z-histograms - // + /// Setup for Z-histograms if (m_histsize < 100) m_histsize = 100; m_zstep = static_cast<double>(m_histsize)/(2.*m_zcut); } else { @@ -79,8 +74,7 @@ StatusCode InDet::SiSPSeededTrackFinder::initialize() m_proptool.disable(); } - // Get output print level - // + /// Get output print level if (msgLvl(MSG::DEBUG)) { dump(MSG::DEBUG, nullptr); } @@ -92,11 +86,15 @@ StatusCode InDet::SiSPSeededTrackFinder::initialize() } /////////////////////////////////////////////////////////////////// -// Execute +/// Execute /////////////////////////////////////////////////////////////////// StatusCode InDet::SiSPSeededTrackFinder::execute(const EventContext& ctx) const { + /** Note that !m_useNewStrategy alone is NOT sufficient to trigger the oldStrategy call here! + * For example, run-3 central offline Si tracking has m_useNewStrategy=false, + * but m_useZBoundaryFinding true --> newStrategy + **/ if (not m_useNewStrategy and not m_useZBoundaryFinding and not m_ITKGeometry) { return oldStrategy(ctx); } @@ -104,7 +102,7 @@ StatusCode InDet::SiSPSeededTrackFinder::execute(const EventContext& ctx) const } /////////////////////////////////////////////////////////////////// -// Execute with old strategy +/// Execute with old strategy /////////////////////////////////////////////////////////////////// namespace InDet { @@ -128,8 +126,7 @@ StatusCode InDet::SiSPSeededTrackFinder::oldStrategy(const EventContext& ctx) co { SG::WriteHandle<TrackCollection> outputTracks{m_outputTracksKey, ctx}; ATH_CHECK(outputTracks.record(std::make_unique<TrackCollection>())); - // For HI events we can use MBTS information from calorimeter - // + /// For HI events we can use MBTS information from calorimeter if (not isGoodEvent(ctx)) { return StatusCode::SUCCESS; } @@ -142,8 +139,8 @@ StatusCode InDet::SiSPSeededTrackFinder::oldStrategy(const EventContext& ctx) co m_seedsmaker->find3Sp(ctx, seedEventData, vertices); } else { m_seedsmaker->newEvent(ctx, seedEventData, -1); - std::list<Trk::Vertex> VZ; - m_seedsmaker->find3Sp(ctx, seedEventData, VZ); + std::list<Trk::Vertex> vertexList; + m_seedsmaker->find3Sp(ctx, seedEventData, vertexList); } const bool PIX = true; @@ -154,14 +151,14 @@ StatusCode InDet::SiSPSeededTrackFinder::oldStrategy(const EventContext& ctx) co bool ERR = false; Counter_t counter{}; const InDet::SiSpacePointsSeed* seed = nullptr; - std::multimap<double, Trk::Track*> qualityTrack; + std::multimap<double, Trk::Track*> qualitySortedTrackCandidates; // Loop through all seed and reconsrtucted tracks collection preparation // while ((seed = m_seedsmaker->next(ctx, seedEventData))) { ++counter[kNSeeds]; std::list<Trk::Track*> trackList = m_trackmaker->getTracks(ctx, trackEventData, seed->spacePoints()); for (Trk::Track* t: trackList) { - qualityTrack.insert(std::make_pair(-trackQuality(t), t)); + qualitySortedTrackCandidates.insert(std::make_pair(-trackQuality(t), t)); } if (not ZVE and (counter[kNSeeds] >= m_maxNumberSeeds)) { ERR = true; @@ -173,18 +170,18 @@ StatusCode InDet::SiSPSeededTrackFinder::oldStrategy(const EventContext& ctx) co // Remove shared tracks with worse quality // - filterSharedTracks(qualityTrack); + filterSharedTracks(qualitySortedTrackCandidates); // Save good tracks in track collection // - for (std::pair<double, Trk::Track*> q: qualityTrack) { + for (const std::pair<double, Trk::Track*> & qualityAndTrack: qualitySortedTrackCandidates) { ++counter[kNTracks]; if (m_trackSummaryTool.isEnabled()) { - m_trackSummaryTool->computeAndReplaceTrackSummary(*(q.second), + m_trackSummaryTool->computeAndReplaceTrackSummary(*(qualityAndTrack.second), trackEventData.combinatorialData().PRDtoTrackMap(), false /* DO NOT suppress hole search*/); } - outputTracks->push_back(q.second); + outputTracks->push_back(qualityAndTrack.second); } m_counterTotal[kNSeeds] += counter[kNSeeds]; @@ -215,47 +212,69 @@ StatusCode InDet::SiSPSeededTrackFinder::newStrategy(const EventContext& ctx) co { SG::WriteHandle<TrackCollection> outputTracks{m_outputTracksKey, ctx}; ATH_CHECK(outputTracks.record(std::make_unique<TrackCollection>())); - // For HI events we can use MBTS information from calorimeter - // + /// For HI events we can use MBTS information from calorimeter if (not isGoodEvent(ctx)) { return StatusCode::SUCCESS; } - // Get beam information and preparation for z -histogramming - // + /// Get beam information and preparation for z -histogramming SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle{m_beamSpotKey, ctx}; - Trk::PerigeeSurface per(beamSpotHandle->beamPos()); + Trk::PerigeeSurface beamPosPerigee(beamSpotHandle->beamPos()); SiSpacePointsSeedMakerEventData seedEventData; - + + /** + * We run two passes of seeding & track finding. + * + * First, we use strip seeds, perform finding with them and obtain an + * estimate of the beam spot region from the found tracks. + * + * Then, we run PPP-seeded tracking within the resulting z interval. + **/ + + /** + * Set up the first pass (strip seeds), and prepare to + * obtain a vertex Z estimate from the candidates we find + **/ + + /// set up the seed maker for first pass m_seedsmaker->newEvent(ctx, seedEventData, 0); - std::list<Trk::Vertex> VZ; - m_seedsmaker->find3Sp(ctx, seedEventData, VZ); + std::list<Trk::Vertex> vertexList; + /// and run seeding - starting with an empty list of vertices for the first pass + m_seedsmaker->find3Sp(ctx, seedEventData, vertexList); const bool PIX = true ; const bool SCT = true ; InDet::ExtendedSiTrackMakerEventData_xk trackEventData(m_prdToTrackMap); + /// set up the track maker m_trackmaker->newEvent(ctx, trackEventData, PIX, SCT); - std::vector<int> nhistogram(m_histsize, 0); - std::vector<double> zhistogram(m_histsize, 0.); - std::vector<double> phistogram(m_histsize, 0.); + /// initialize empty histograms for the vertex estimate + std::vector<int> numberHistogram(m_histsize, 0); + std::vector<double> zWeightedHistogram(m_histsize, 0.); + std::vector<double> ptWeightedHistogram(m_histsize, 0.); bool ERR = false; Counter_t counter{}; const InDet::SiSpacePointsSeed* seed = nullptr; - std::multimap<double, Trk::Track*> qualityTrack; - // Loop through all seed and reconsrtucted tracks collection preparation - // + + /// prepare a collection for the quality-sorted track canddiates + std::multimap<double, Trk::Track*> qualitySortedTrackCandidates; + + /// Loop through all seeds from the first pass and attempt to form track candidates while ((seed = m_seedsmaker->next(ctx, seedEventData))) { ++counter[kNSeeds]; + /// we only want to fill the Z histo with the first candidate for each seed. bool firstTrack{true}; + /// combinatorial track finding for one given seed std::list<Trk::Track*> trackList = m_trackmaker->getTracks(ctx, trackEventData, seed->spacePoints()); - for (Trk::Track* t: trackList) { - qualityTrack.insert(std::make_pair(-trackQuality(t), t)); + /// record found candidates + for (Trk::Track* t: trackList) { + qualitySortedTrackCandidates.insert(std::make_pair(-trackQuality(t), t)); + /// For the first (highest quality) track from each seed, populate the vertex finding histograms if (firstTrack and not m_ITKGeometry) { - fillZHistogram(t, per, nhistogram, zhistogram, phistogram); + fillZHistogram(t, beamPosPerigee, numberHistogram, zWeightedHistogram, ptWeightedHistogram); } firstTrack = false; } @@ -266,22 +285,30 @@ StatusCode InDet::SiSPSeededTrackFinder::newStrategy(const EventContext& ctx) co } } + /** Now set up the second seeding pass, using pixel seeds + * The seed maker will internally reconfigure itself based on + * the "1" argument for the "iteration" argument in this call. + **/ m_seedsmaker->newEvent(ctx, seedEventData, 1); - double ZB[2]; + /// perform vertex Z estimation and run second seeding pass + std::pair<double,double> zBoundaries; if (not m_ITKGeometry) { - findZvertex(VZ, ZB, nhistogram, zhistogram, phistogram); - m_seedsmaker->find3Sp(ctx, seedEventData, VZ, ZB); + /// Estimate a Z vertex interval and, if running the new strategy, also a list of the HS candidates + findZvertex(vertexList, zBoundaries, numberHistogram, zWeightedHistogram, ptWeightedHistogram); + /// pass the Z boundary pair c-array-style to satisfy existing interfaces of the seeds maker family. + /// Trigger second seed finding pass (PPP) + m_seedsmaker->find3Sp(ctx, seedEventData, vertexList, &(zBoundaries.first)); } else { - m_seedsmaker->find3Sp(ctx, seedEventData, VZ); + m_seedsmaker->find3Sp(ctx, seedEventData, vertexList); } - // Loop through all seed and reconsrtucted tracks collection preparation - // + /// Again, loop over the newly found seeds and attempt to form track candidates while ((seed = m_seedsmaker->next(ctx, seedEventData))) { ++counter[kNSeeds]; + /// insert the new tracks into the quality-sorted list for (Trk::Track* t: m_trackmaker->getTracks(ctx, trackEventData, seed->spacePoints())) { - qualityTrack.insert(std::make_pair(-trackQuality(t), t)); + qualitySortedTrackCandidates.insert(std::make_pair(-trackQuality(t), t)); } if (counter[kNSeeds] >= m_maxNumberSeeds) { ERR = true; @@ -291,20 +318,20 @@ StatusCode InDet::SiSPSeededTrackFinder::newStrategy(const EventContext& ctx) co } m_trackmaker->endEvent(trackEventData); - // Remove shared tracks with worse quality - // - filterSharedTracks(qualityTrack); + /// Remove shared tracks with worse quality + filterSharedTracks(qualitySortedTrackCandidates); - // Save good tracks in track collection - // - for (std::pair<double, Trk::Track*> q: qualityTrack) { + /// Save good tracks in track collection + for (const std::pair<double, Trk::Track*> & qualityAndTrack: qualitySortedTrackCandidates) { ++counter[kNTracks]; if (m_trackSummaryTool.isEnabled()) { - m_trackSummaryTool->computeAndReplaceTrackSummary(*q.second, + /// Note that for run-3 the tool here is configured to not perform a hole search, + /// regardless of the 'false' argument below + m_trackSummaryTool->computeAndReplaceTrackSummary(*qualityAndTrack.second, trackEventData.combinatorialData().PRDtoTrackMap(), false /* DO NOT suppress hole search*/); } - outputTracks->push_back(q.second); + outputTracks->push_back(qualityAndTrack.second); } m_counterTotal[kNSeeds] += counter[kNSeeds] ; @@ -484,23 +511,26 @@ bool InDet::SiSPSeededTrackFinder::isGoodEvent(const EventContext& ctx) const { double InDet::SiSPSeededTrackFinder::trackQuality(const Trk::Track* Tr) const { double quality = 0. ; - double W = 17.; + double baseScorePerHit = 17.; + /// check all hits on the track for (const Trk::TrackStateOnSurface* m: *(Tr->trackStateOnSurfaces())) { - + /// exclude anything which is not an actual hit if (not m->type(Trk::TrackStateOnSurface::Measurement)) continue; - + /// retrieve the fit quality for a given hit const Trk::FitQualityOnSurface* fq = m->fitQualityOnSurface(); if (fq==nullptr) continue; - + double x2 = fq->chiSquared(); - double q; - if (fq->numberDoF() == 2) q = (1.2*(W-x2*.5)); - else q = (W-x2 ); - if (q < 0.) q = 0.; - quality += q; + double hitQualityScore; + /// score the hit based on the technology (pixels get higher score) and + /// the local chi2 for the hit + if (fq->numberDoF() == 2) hitQualityScore = (1.2*(baseScorePerHit-x2*.5)); // pix + else hitQualityScore = (baseScorePerHit-x2 ); // sct + if (hitQualityScore < 0.) hitQualityScore = 0.; // do not allow a bad hit to decrement the overall score + quality += hitQualityScore; } - + /// penalise brem tracks if (Tr->info().trackProperties(Trk::TrackInfo::BremFit)) quality *= 0.7; return quality; @@ -510,37 +540,47 @@ double InDet::SiSPSeededTrackFinder::trackQuality(const Trk::Track* Tr) const // Filer shared tracks /////////////////////////////////////////////////////////////////// -void InDet::SiSPSeededTrackFinder::filterSharedTracks(std::multimap<double, Trk::Track*>& QT) const +void InDet::SiSPSeededTrackFinder::filterSharedTracks(std::multimap<double, Trk::Track*>& qualitySortedTracks) const { std::set<const Trk::PrepRawData*> clusters; - const Trk::PrepRawData* prd[100]; + std::vector<const Trk::PrepRawData*> freeClusters; + freeClusters.reserve(15); - std::multimap<double, Trk::Track*>::iterator q = QT.begin(); - while (q!=QT.end()) { + std::multimap<double, Trk::Track*>::iterator it_qualityAndTrack = qualitySortedTracks.begin(); - std::set<const Trk::PrepRawData*>::iterator fe = clusters.end(); + /// loop over all track candidates, sorted by quality + while (it_qualityAndTrack!=qualitySortedTracks.end()) { + freeClusters.clear(); - int nf = 0; - int nc = 0; + std::set<const Trk::PrepRawData*>::iterator it_clustersEnd = clusters.end(); - for (const Trk::MeasurementBase* m: *((*q).second->measurementsOnTrack())) { + int nClusters = 0; + /// loop over measurements on the track candidate + for (const Trk::MeasurementBase* m: *((*it_qualityAndTrack).second->measurementsOnTrack())) { + /// get the PRD from the measurement const Trk::PrepRawData* pr = (static_cast<const Trk::RIO_OnTrack*>(m))->prepRawData(); if (pr) { - ++nc; - if (clusters.find(pr)==fe) { - prd[nf++]=pr; - if (nf==100) break; + /// increase cluster count + ++nClusters; + /// and check if the cluster was already used in a previous ( = higher quality) track + if (clusters.find(pr)==it_clustersEnd) { + /// if not, record as a free (not prevously used) cluster + freeClusters.push_back(pr); } } } - - if (nf >= m_nfreeCut or nf==nc) { - for (int n=0; n<nf; ++n) clusters.insert(prd[n]); - ++q; + /// check if the track has the minimum number of free clusters or if it has no shared clusters + int nFreeClusters = static_cast<int>(freeClusters.size()); + if (nFreeClusters >= m_nfreeCut || nFreeClusters==nClusters) { + /// if this is fulfilled, we keep the candidate + /// add the free clusters to our cluster set + clusters.insert(freeClusters.begin(), freeClusters.end()); + ++it_qualityAndTrack; } else { - delete (*q).second; - QT.erase(q++); + /// if we do not keep the track, clean up candidate + delete (*it_qualityAndTrack).second; + qualitySortedTracks.erase(it_qualityAndTrack++); } } } @@ -550,37 +590,44 @@ void InDet::SiSPSeededTrackFinder::filterSharedTracks(std::multimap<double, Trk: /////////////////////////////////////////////////////////////////// void InDet::SiSPSeededTrackFinder::fillZHistogram(const Trk::Track* Tr, - Trk::PerigeeSurface& per, - std::vector<int>& nhistogram, - std::vector<double>& zhistogram, - std::vector<double>& phistogram) const + const Trk::PerigeeSurface& beamPosPerigee, + std::vector<int>& numberHistogram, + std::vector<double>& zWeightedHistogram, + std::vector<double>& ptWeightedHistogram) const { if (Tr->measurementsOnTrack()->size() < 10) return; - DataVector<const Trk::TrackStateOnSurface>::const_iterator m = Tr->trackStateOnSurfaces()->begin(); - const Trk::TrackParameters* P = (*m)->trackParameters(); - Amg::Vector3D gf = P->position() ; - Amg::Vector3D gm = P->momentum() ; - - if (gf.x()*gf.x()+gf.y()*gf.y() >= 3600.) return; + const Trk::TrackParameters* paramsAtFirstSurface = Tr->trackStateOnSurfaces()->front()->trackParameters(); + Amg::Vector3D position = paramsAtFirstSurface->position() ; + Amg::Vector3D momentum = paramsAtFirstSurface->momentum() ; + + /// only take into accounts tracks with a hit inside r < 60mm + constexpr double rSquare_max_forZHisto = 60.*60.; + if (position.x()*position.x()+position.y()*position.y() >= rSquare_max_forZHisto) return; - double pT = sqrt(gm.x()*gm.x()+gm.y()*gm.y()); + double pT = sqrt(momentum.x()*momentum.x()+momentum.y()*momentum.y()); if (pT < m_pTcut) return; Trk::PatternTrackParameters TP; - if (not TP.production(P)) return; + if (not TP.production(paramsAtFirstSurface)) return; double step; - if (not m_proptool->propagate(TP, per, TP, Trk::anyDirection, m_fieldprop, step, Trk::pion)) return; + /// propagate from innermost hit to beam spot + if (not m_proptool->propagate(TP, beamPosPerigee, TP, Trk::anyDirection, m_fieldprop, step, Trk::pion)) return; - const double* par = TP.par(); - if (fabs(par[0]) > m_imcut) return; - int z = static_cast<int>((par[1]+m_zcut)*m_zstep); + const double* parsAtBeamSpot = TP.par(); + if (std::abs(parsAtBeamSpot[0]) > m_imcut) return; + /// determine bin number - m_zstep is the inverse bin width, where the histo axis extends from -m_zcut to +m_zcut + int z = static_cast<int>((parsAtBeamSpot[1]+m_zcut)*m_zstep); + /// fill histograms if we are not in the over/underflow if (z >=0 and z < m_histsize) { - ++nhistogram[z]; - zhistogram[z] += par[1]; - phistogram[z] += pT; + /// simple z histogram, counting tracks per z + ++numberHistogram[z]; + /// z weighted histogram binned in z - used for vertex z calculation + zWeightedHistogram[z] += parsAtBeamSpot[1]; + /// pt weighted histogram binned in z - used for vertex sumpt calculation + ptWeightedHistogram[z] += pT; } } @@ -589,64 +636,72 @@ void InDet::SiSPSeededTrackFinder::fillZHistogram(const Trk::Track* Tr, // Find verteex z coordinates /////////////////////////////////////////////////////////////////// -void InDet::SiSPSeededTrackFinder::findZvertex(std::list<Trk::Vertex>& ZV, - double* ZB, - std::vector<int>& nhistogram, - std::vector<double>& zhistogram, - std::vector<double>& phistogram) const +void InDet::SiSPSeededTrackFinder::findZvertex(std::list<Trk::Vertex>& vertexZList, + std::pair<double, double> & zBoundaries, + const std::vector<int>& numberHistogram, + const std::vector<double>& zWeightedHistogram, + const std::vector<double>& ptWeightedHistogram) const { - ZB[0] = 1000.; - ZB[1] =-1000.; + zBoundaries = {1000., -1000}; - std::multimap<int ,double> vern; - std::multimap<double,double> verp; + std::multimap<int ,double> vertexZ_sortedByNtracks; + std::multimap<double,double> vertexZ_sortedBySumPt; - int imax = m_histsize-1; - int nmin = 3; + int lastBin = m_histsize-1; + int minBinContentSum = 3; - for (int i=1; i<imax; ++i) { + /// loop over the bins in z. Start with the second, end with the second to last, as we investigate triplets of bins + for (int binIndex=1; binIndex<lastBin; ++binIndex) { - int n = nhistogram[i-1]+nhistogram[i]+nhistogram[i+1]; + /// total entries in the three neighbouring bins + int vertexNtracks = numberHistogram.at(binIndex-1)+numberHistogram.at(binIndex)+numberHistogram.at(binIndex+1); - if (n>=nmin and (nhistogram[i] >= nhistogram[i-1] and nhistogram[i] >= nhistogram[i+1])) { - - double z = (zhistogram[i-1]+zhistogram[i]+zhistogram[i+1])/static_cast<double>(n); + /// if we have at least 3 tracks in this z0 interval with the peak of the local triplet in the central bin, + /// add a vertex candidate + if (vertexNtracks>=minBinContentSum and (numberHistogram.at(binIndex) >= numberHistogram.at(binIndex-1) and numberHistogram.at(binIndex) >= numberHistogram.at(binIndex+1))) { + /// vertex z estimate as the mean z0 of the tracks in the three bins + double vertexZestimate = (zWeightedHistogram.at(binIndex-1)+zWeightedHistogram.at(binIndex)+zWeightedHistogram.at(binIndex+1))/static_cast<double>(vertexNtracks); - if (z < ZB[0]) ZB[0] = z; - if (z > ZB[1]) ZB[1] = z; + /// if this vertex is to the left of the lower edge or the right of the upper edge, broaden the z interval accordingly + /// to include this vertex. + if (vertexZestimate < zBoundaries.first) zBoundaries.first = vertexZestimate; + if (vertexZestimate > zBoundaries.second) zBoundaries.second = vertexZestimate; if (m_useNewStrategy) { - double p = phistogram[i-1]+phistogram[i]+phistogram[i+1]; - vern.insert(std::make_pair(-n, z)); - verp.insert(std::make_pair(-p, z)); + /// also get the sum(pt) of the vertex candidate + double vertexSumPt = ptWeightedHistogram.at(binIndex-1)+ptWeightedHistogram.at(binIndex)+ptWeightedHistogram.at(binIndex+1); + vertexZ_sortedByNtracks.insert(std::make_pair(-vertexNtracks, vertexZestimate)); + vertexZ_sortedBySumPt.insert(std::make_pair(-vertexSumPt, vertexZestimate)); } } } if (m_useNewStrategy) { - std::set<double> vertex; + std::set<double> leadingVertices; int n = 0; - std::multimap<double, double>::iterator pz = verp.begin(); - for (std::pair<int, double> nz: vern) { + std::multimap<double, double>::iterator vertex_pt_and_z = vertexZ_sortedBySumPt.begin(); + for (std::pair<int, double> nTrackAndZ: vertexZ_sortedByNtracks) { + /// stop when we have collected the requested number of leading vertices if (n++ >= m_nvertex) break; - vertex.insert(nz.second); - vertex.insert((*pz++).second); + /// insert one vertex from the ntracks-sorted list and one from the pt-sorted list. + /// If both are the same, only one insertion is performed + leadingVertices.insert(nTrackAndZ.second); + leadingVertices.insert((*vertex_pt_and_z++).second); } - for (double v: vertex) { - Amg::Vector3D Vp(0., 0., v); - Trk::Vertex Ver(Vp); - ZV.push_back(Ver); + for (double v: leadingVertices) { + vertexZList.emplace_back(Amg::Vector3D{0.,0.,v}); } } - - if (ZB[0] > ZB[1]) { - ZB[0] = -1000.; - ZB[1] = +1000.; + /// if we did not find any PV candidates, assume a very wide interval + if (zBoundaries.first > zBoundaries.second) { + zBoundaries.first = -1000.; + zBoundaries.second = +1000.; } else { - ZB[0] -= 20.; - ZB[1] += 20.; + /// otherwise, add a reasonable bit of space on each side of the first / last vertex candidate + zBoundaries.first -= 20.; + zBoundaries.second += 20.; } } diff --git a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/SiSpacePointFormation/SiElementProperties.h b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/SiSpacePointFormation/SiElementProperties.h index e0b2fb1b8a35068b7a818b7ee68c6f5c5af03ff6..04c9527cc2cbdc91239d1c5b4d3bd8bbae722b8f 100755 --- a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/SiSpacePointFormation/SiElementProperties.h +++ b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/SiSpacePointFormation/SiElementProperties.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /*************************************************************************** @@ -34,8 +34,8 @@ public: ~SiElementProperties(); - const std::vector<IdentifierHash>* neighbours (void); - float halfWidth (void); + const std::vector<IdentifierHash>* neighbours (void) const; + float halfWidth (void) const; private: std::vector<IdentifierHash> m_neighbours; @@ -50,14 +50,14 @@ private: //-------------------------------------------------------------------------- inline const std::vector<IdentifierHash>* -SiElementProperties::neighbours() +SiElementProperties::neighbours() const { return &m_neighbours; } //---------------------------------------------------------------------------- inline float -SiElementProperties::halfWidth() +SiElementProperties::halfWidth() const { return m_halfWidth; } diff --git a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/SiSpacePointFormation/SiElementPropertiesTable.h b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/SiSpacePointFormation/SiElementPropertiesTable.h index 18d4d21ca29638fbe30142217bb7ba2b4d4cdd04..a87c4491420d71fad12e5f2da1555f74df6ae934 100755 --- a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/SiSpacePointFormation/SiElementPropertiesTable.h +++ b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/SiSpacePointFormation/SiElementPropertiesTable.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /*************************************************************************** @@ -29,13 +29,13 @@ public: SiElementPropertiesTable(const SCT_ID& idHelper, const InDetDD::SiDetectorElementCollection& elements, float epsilonWidth); - ~SiElementPropertiesTable(); + ~SiElementPropertiesTable() = default; const std::vector<IdentifierHash>* neighbours(const IdentifierHash& waferID) const; float halfWidth(IdentifierHash hashID) const; private: - std::vector<SiElementProperties*> m_properties; + std::vector<SiElementProperties> m_properties; }; @@ -43,13 +43,13 @@ private: inline const std::vector<IdentifierHash>* SiElementPropertiesTable::neighbours(const IdentifierHash& waferID) const { - return (m_properties[(unsigned int)waferID])->neighbours(); + return (m_properties[(unsigned int)waferID]).neighbours(); } inline float SiElementPropertiesTable::halfWidth(IdentifierHash waferID) const { - return (m_properties[(unsigned int)waferID])->halfWidth(); + return (m_properties[(unsigned int)waferID]).halfWidth(); } } diff --git a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiElementPropertiesTable.cxx b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiElementPropertiesTable.cxx index 55c5cfc43de9192d8a33ccb5827ab814ec6de18a..47d0c581e44ee098243e4082e3144a436e440eaf 100755 --- a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiElementPropertiesTable.cxx +++ b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiElementPropertiesTable.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /*************************************************************************** @@ -21,24 +21,15 @@ SiElementPropertiesTable::SiElementPropertiesTable(const SCT_ID& idHelper, float epsilonWidth) { size_t maxSCT = idHelper.wafer_hash_max(); - m_properties.assign(maxSCT, nullptr); + m_properties.reserve(maxSCT); for (size_t i = 0; i < maxSCT; ++i){ IdentifierHash hash(i); const InDetDD::SiDetectorElement* element = elements[hash]; if (element != 0){ - SiElementProperties* props = new SiElementProperties(hash, idHelper,*element,epsilonWidth); - m_properties[i] = props; + m_properties.emplace_back(hash, idHelper,*element,epsilonWidth); } } } //-------------------------------------------------------------------------- -SiElementPropertiesTable::~SiElementPropertiesTable(){ - size_t maxSCT = m_properties.size(); - for (size_t i=0; i < maxSCT; ++i){ - delete m_properties[i];m_properties[i] =0; - } -} -//-------------------------------------------------------------------------- - } diff --git a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiTrackerSpacePointFinder.cxx b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiTrackerSpacePointFinder.cxx index 7f9c9b63e520d7738619457e553c6eee1a80d937..882c26a2835d96863cb384878a3013f9dea42f9d 100755 --- a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiTrackerSpacePointFinder.cxx +++ b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiTrackerSpacePointFinder.cxx @@ -221,7 +221,7 @@ StatusCode SiTrackerSpacePointFinder::execute (const EventContext& ctx) const // Create SpacePointCollection IdentifierHash idHash = colNext->identifyHash(); SpacePointContainer::IDC_WriteHandle lock = spacePointContainer_SCT->getWriteHandle(idHash); - if(lock.alreadyPresent()){ + if(lock.OnlineAndPresentInAnotherView()){ ATH_MSG_DEBUG("SCT Hash " << idHash << " is already in cache"); ++sctCacheCount; continue; //Skip if already present in cache @@ -277,7 +277,7 @@ StatusCode SiTrackerSpacePointFinder::execute (const EventContext& ctx) const nReceivedClustersPIX = (*colNext)->size(); IdentifierHash idHash = (*colNext)->identifyHash(); SpacePointContainer::IDC_WriteHandle lock = spacePointContainerPixel->getWriteHandle(idHash); - if(lock.alreadyPresent()){ + if(lock.OnlineAndPresentInAnotherView()){ ATH_MSG_DEBUG("pixel Hash " << idHash << " is already in cache"); ++pixCacheCount; continue; diff --git a/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/InDetCompetingRIOsOnTrack/CompetingSCT_ClustersOnTrack.h b/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/InDetCompetingRIOsOnTrack/CompetingSCT_ClustersOnTrack.h index 5f4b07ee0a6af0f4cafaea76862089b656414402..62642927d136d6133da92152933b20e6e64b94b1 100755 --- a/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/InDetCompetingRIOsOnTrack/CompetingSCT_ClustersOnTrack.h +++ b/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/InDetCompetingRIOsOnTrack/CompetingSCT_ClustersOnTrack.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -59,7 +59,7 @@ public: but call InDet::CompetingSCT_ClustersOnTrackTool, otherwise inconsistency of the data will be very probable. */ CompetingSCT_ClustersOnTrack( - std::vector<const InDet::SCT_ClusterOnTrack*>* childrots, + std::vector<const InDet::SCT_ClusterOnTrack*>&& childrots, std::vector<AssignmentProb>* assgnProb ); @@ -109,7 +109,7 @@ private: CxxUtils::CachedUniquePtr<const Amg::Vector3D> m_globalPosition; /** The vector of contained InDet::SCT_ClusterOnTrack objects */ - std::vector<const InDet::SCT_ClusterOnTrack*>* m_containedChildRots; + std::vector<const InDet::SCT_ClusterOnTrack*> m_containedChildRots; /** Have all the contained ROTs a common associated surface? If withNonVanishingAssignProb==true just the ROTs with non-vanishing assignment probabilities @@ -125,16 +125,16 @@ inline CompetingSCT_ClustersOnTrack* CompetingSCT_ClustersOnTrack::clone() const } inline const Trk::Surface& CompetingSCT_ClustersOnTrack::associatedSurface() const { - return ((*(m_containedChildRots->begin()))->associatedSurface()); + return ((*(m_containedChildRots.begin()))->associatedSurface()); } inline const std::vector<const InDet::SCT_ClusterOnTrack*>& CompetingSCT_ClustersOnTrack::containedROTs() const { - return (*m_containedChildRots); + return m_containedChildRots; } inline const InDet::SCT_ClusterOnTrack& CompetingSCT_ClustersOnTrack::rioOnTrack(unsigned int indx) const { - return * m_containedChildRots->operator[](indx); + return *(m_containedChildRots[indx]); } inline const Amg::Vector3D& CompetingSCT_ClustersOnTrack::globalPosition() const { @@ -145,7 +145,7 @@ inline const Amg::Vector3D& CompetingSCT_ClustersOnTrack::globalPosition() const } inline unsigned int CompetingSCT_ClustersOnTrack::numberOfContainedROTs() const { - return m_containedChildRots->size(); + return m_containedChildRots.size(); } } diff --git a/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/src/CompetingSCT_ClustersOnTrack.cxx b/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/src/CompetingSCT_ClustersOnTrack.cxx index 9e884a934e06e1de737d01cd7fb21a5cfe349afd..8edd270876dd54f35526027f97d3cfdefcecabe8 100755 --- a/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/src/CompetingSCT_ClustersOnTrack.cxx +++ b/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/src/CompetingSCT_ClustersOnTrack.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -18,20 +18,16 @@ // default constructor InDet::CompetingSCT_ClustersOnTrack::CompetingSCT_ClustersOnTrack(): Trk::CompetingRIOsOnTrack(), - m_globalPosition{}, - m_containedChildRots(0) + m_globalPosition{} // {} // copy constructor InDet::CompetingSCT_ClustersOnTrack::CompetingSCT_ClustersOnTrack(const InDet::CompetingSCT_ClustersOnTrack& compROT) : Trk::CompetingRIOsOnTrack(compROT), - m_globalPosition{}, - m_containedChildRots(0) { - m_containedChildRots = new std::vector< const InDet::SCT_ClusterOnTrack* >; - std::vector< const InDet::SCT_ClusterOnTrack* >::const_iterator rotIter = compROT.m_containedChildRots->begin(); - for (; rotIter!=compROT.m_containedChildRots->end(); ++rotIter) { - m_containedChildRots->push_back((*rotIter)->clone()); + m_globalPosition{} { + for (const InDet::SCT_ClusterOnTrack* rot : compROT.m_containedChildRots) { + m_containedChildRots.push_back(rot->clone()); } if (compROT.m_globalPosition) { m_globalPosition.set(std::make_unique<const Amg::Vector3D>(*compROT.m_globalPosition)); @@ -40,14 +36,13 @@ InDet::CompetingSCT_ClustersOnTrack::CompetingSCT_ClustersOnTrack(const InDet::C // explicit constructor InDet::CompetingSCT_ClustersOnTrack::CompetingSCT_ClustersOnTrack( - //const Trk::Surface* sf, - std::vector<const InDet::SCT_ClusterOnTrack*>* childrots, + std::vector<const InDet::SCT_ClusterOnTrack*>&& childrots, std::vector<AssignmentProb>* assgnProb ): Trk::CompetingRIOsOnTrack(assgnProb), m_globalPosition{}, -m_containedChildRots(childrots) +m_containedChildRots{childrots} { // initialize local position and error matrix setLocalParametersAndErrorMatrix(); @@ -60,13 +55,11 @@ InDet::CompetingSCT_ClustersOnTrack& InDet::CompetingSCT_ClustersOnTrack::operat Trk::CompetingRIOsOnTrack::operator=(compROT); // clear rots clearChildRotVector(); - delete m_containedChildRots; - m_containedChildRots = new std::vector<const InDet::SCT_ClusterOnTrack*>; - - std::vector<const InDet::SCT_ClusterOnTrack*>::const_iterator rotIter = compROT.m_containedChildRots->begin(); - for (; rotIter!=compROT.m_containedChildRots->end(); ++rotIter) - m_containedChildRots->push_back((*rotIter)->clone()); + m_containedChildRots.clear(); + for (const InDet::SCT_ClusterOnTrack* rot : compROT.m_containedChildRots) { + m_containedChildRots.push_back(rot->clone()); + } if (compROT.m_globalPosition) { m_globalPosition.set(std::make_unique<const Amg::Vector3D>(*compROT.m_globalPosition)); } else if (m_globalPosition) { @@ -78,13 +71,10 @@ InDet::CompetingSCT_ClustersOnTrack& InDet::CompetingSCT_ClustersOnTrack::operat InDet::CompetingSCT_ClustersOnTrack::~CompetingSCT_ClustersOnTrack() { clearChildRotVector(); - delete m_containedChildRots; } void InDet::CompetingSCT_ClustersOnTrack::clearChildRotVector() { - std::vector<const InDet::SCT_ClusterOnTrack*>::const_iterator rotIter = m_containedChildRots->begin(); - for (; rotIter!=m_containedChildRots->end(); ++rotIter) - delete (*rotIter); + for (const InDet::SCT_ClusterOnTrack* rot : m_containedChildRots) delete rot; } MsgStream& InDet::CompetingSCT_ClustersOnTrack::dump( MsgStream& out ) const { diff --git a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/SCT_ClusterOnTrack.cxx b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/SCT_ClusterOnTrack.cxx index dfda5beff5c8be6102741774fefd4b7f0a5ead7b..02f8b5a93b7af7fd00b7a1c3d8dccf82103f10e6 100755 --- a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/SCT_ClusterOnTrack.cxx +++ b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/SCT_ClusterOnTrack.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -15,7 +15,6 @@ #include <limits> - // Constructor with parameters - no global position assigned InDet::SCT_ClusterOnTrack::SCT_ClusterOnTrack(const InDet::SCT_Cluster* RIO, const Trk::LocalParameters& locpars, @@ -42,12 +41,11 @@ InDet::SCT_ClusterOnTrack::SCT_ClusterOnTrack(const InDet::SCT_Cluster* RIO, m_rio.setElement(RIO); //constructing local position provided a global one - const Amg::Vector2D * lpos = detectorElement()->surface( identify() ). - positionOnSurface(globalPosition); + std::unique_ptr<const Amg::Vector2D> + lpos{detectorElement()->surface( identify() ).positionOnSurface(globalPosition)}; //storing the position along the strip if available m_positionAlongStrip = (lpos) ? (*lpos)[Trk::locY]:0.; - delete lpos; } InDet::SCT_ClusterOnTrack::SCT_ClusterOnTrack( const ElementLinkToIDCSCT_ClusterContainer& RIO, diff --git a/InnerDetector/InDetRecEvent/SiSPSeededTrackFinderData/SiSPSeededTrackFinderData/SiSpacePointsSeedMakerEventData.h b/InnerDetector/InDetRecEvent/SiSPSeededTrackFinderData/SiSPSeededTrackFinderData/SiSpacePointsSeedMakerEventData.h index b8fb41f524a6b587fa5e18af5eb01ef5a60d9560..1e9d2967de13842498d900e6005becf5afc18513 100644 --- a/InnerDetector/InDetRecEvent/SiSPSeededTrackFinderData/SiSPSeededTrackFinderData/SiSpacePointsSeedMakerEventData.h +++ b/InnerDetector/InDetRecEvent/SiSPSeededTrackFinderData/SiSPSeededTrackFinderData/SiSpacePointsSeedMakerEventData.h @@ -37,37 +37,42 @@ namespace InDet { public: /// enums to specify which SiSpacePointsSeedMaker owns the object. enum ToolType { - ATLxk, //!< SiSpacePointsSeedMaker_ATLxk - BeamGas, //!< SiSpacePointsSeedMaker_BeamGas - Cosmic, //!< SiSpacePointsSeedMaker_Cosmic - HeavyIon, //!< SiSpacePointsSeedMaker_HeavyIon - ITK, //!< SiSpacePointsSeedMaker_ITK - LowMomentum, //!< SiSpacePointsSeedMaker_LowMomentum - Trigger ///!< SiSpacePointsSeedMaker_Trigger + ATLxk, ///< SiSpacePointsSeedMaker_ATLxk + BeamGas, ///< SiSpacePointsSeedMaker_BeamGas + Cosmic, ///< SiSpacePointsSeedMaker_Cosmic + HeavyIon, ///< SiSpacePointsSeedMaker_HeavyIon + ITK, ///< SiSpacePointsSeedMaker_ITK + LowMomentum, ///< SiSpacePointsSeedMaker_LowMomentum + Trigger ////< SiSpacePointsSeedMaker_Trigger }; - bool initialized{false}; - bool trigger{false}; + bool initialized{false}; ///< has the data object been initialized? + bool trigger{false}; ///< are we running in trigger mode? bool izvertex{false}; - bool endlist{true}; - bool isvertex{false}; - bool checketa{false}; - - int iteration{0}; + /** indicate if we are done with the seed search for an event. + * Is set to false if we have to abort the current seed finding pass + * (for example due to reaching max seed capacity) and need to + * continue after returning a few seeds to the user first. + **/ + bool endlist{true}; + bool isvertex{false}; ///< whether or not we contain a non-empty vertex list + bool checketa{false}; ///< whether to apply eta cuts + + int iteration{0}; ///< iteration currently being run int iteration0{0}; - int r_first{0}; - int ns{0}; - int nsaz{0}; + int r_first{0}; ///< points to the index of the highest occupied radius bin + int ns{0}; ///< total number of SP that we sorted into our r-binned vector + int nsaz{0}; ///< number of SP in the Phi-Z 2D binning int nsazv{0}; - int nr{0}; + int nr{0}; ///< this keeps track of the number of occupied radial bins (so it is typically less than the total number of r bins int nrf{0}; - int nrfz{0}; + int nrfz{0}; ///< also number of SP in the phi-Z 2D binning?? int nrfzv{0}; - int state{0}; - int nspoint{2}; - int mode{0}; + int state{0}; ///< state info - 0 seems to mean cuts aren ot configured + int nspoint{2}; ///< number of required SP + int mode{0}; ///< operation mode (SP per seed etc) int nlist{0}; - int fNmin{0}; + int fNmin{0}; ///< starting phi bin for looping int fvNmin{0}; int zMin{0}; int nOneSeeds{0}; @@ -75,19 +80,19 @@ namespace InDet { int nprint{0}; int nseeds{0}; - float K{0.}; - float dzdrmin{0.}; - float dzdrmax{0.}; - float ipt2C{0.}; - float ipt2K{0.}; - float COFK{0.}; + float K{0.}; ///< conversion from pT in MeV to twice the circle radius in the transverse plane in mm + float dzdrmin{0.}; //<! store eta cuts interpreted as dz/dr + float dzdrmax{0.}; //<! store eta cuts interpreted as dz/dr + float ipt2C{0.}; ///< inverse of 90% of the pt cut, squared, multiplied by a magic conversion factor + float ipt2K{0.}; ///< 1 / (K * 0.9 * pt cut)², allows us to directly apply our pt cut on the (2R)² estimate we obtain from the seed + float COFK{0.}; ///< a magic number float zminU{0.}; float zmaxU{0.}; float zminB{0.}; float zmaxB{0.}; float ftrig{0.}; float ftrigW{0.}; - float umax{0.}; + float maxScore{0.}; /** * @name Beam geometry @@ -95,17 +100,17 @@ namespace InDet { * which is called by newEvent and newRegion */ //@{ - float xbeam[4]{0., 1., 0., 0.}; //!< x,ax,ay,az - center and x-axis direction - float ybeam[4]{0., 0., 1., 0.}; //!< y,ax,ay,az - center and y-axis direction - float zbeam[4]{0., 0., 0., 1.}; //!< z,ax,ay,az - center and z-axis direction + float xbeam[4]{0., 1., 0., 0.}; ///< x,ax,ay,az - center and x-axis direction + float ybeam[4]{0., 0., 1., 0.}; ///< y,ax,ay,az - center and y-axis direction + float zbeam[4]{0., 0., 0., 1.}; ///< z,ax,ay,az - center and z-axis direction //@} std::vector<int> r_index; std::vector<int> r_map; std::vector<int> rf_index; std::vector<int> rf_map; - std::vector<int> rfz_index; - std::vector<int> rfz_map; + std::vector<int> rfz_index; ///< 2D index in the 2D phi-z map of each SP in the r-sored vector + std::vector<int> rfz_map; ///< number of SP in each bin of the 2D phi-z map std::vector<int> rfzv_index; std::vector<int> rfzv_map; @@ -116,13 +121,15 @@ namespace InDet { * Updated in many mthods */ //@{ - std::vector<InDet::SiSpacePointForSeed*> SP; + std::vector<InDet::SiSpacePointForSeed*> SP; ///< space points to consider for the current seed candidate std::vector<InDet::SiSpacePointForSeedITK*> SP_ITK; - std::vector<float> Zo; - std::vector<float> Tz; - std::vector<float> R; - std::vector<float> U; - std::vector<float> V; + + /// The following are parameters characterising individual space points within a seed (relative to the central point) + std::vector<float> Zo; ///< z0 estimate from 2 points + std::vector<float> Tz; ///< 1/sintheta estimate from 2 points + std::vector<float> R; ///< inverse distance to the central space point + std::vector<float> U; ///< transformed U coordinate (x/(x²+y²)) in frame around central SP + std::vector<float> V; ///< transformed V coordinate (y/(x²+y²)) in frame around central SP std::vector<float> X; std::vector<float> Y; std::vector<float> Er; @@ -137,9 +144,9 @@ namespace InDet { std::vector<std::pair<float,InDet::SiSpacePointForSeed*>> CmSp; std::vector<std::pair<float,InDet::SiSpacePointForSeedITK*>> CmSp_ITK; - std::vector<std::vector<InDet::SiSpacePointForSeed*>> r_Sorted; + std::vector<std::vector<InDet::SiSpacePointForSeed*>> r_Sorted; ///< vector of space points in each bin of the 1D radial binning std::vector<std::vector<InDet::SiSpacePointForSeed*>> rf_Sorted; - std::vector<std::vector<InDet::SiSpacePointForSeed*>> rfz_Sorted; + std::vector<std::vector<InDet::SiSpacePointForSeed*>> rfz_Sorted; ///< vector of space points in each bin of the 2D phi-z binning std::vector<std::vector<InDet::SiSpacePointForSeed*>> rfzv_Sorted; std::vector<std::list<InDet::SiSpacePointForSeedITK*>> r_Sorted_ITK; std::vector<std::list<InDet::SiSpacePointForSeedITK*>> rfz_Sorted_ITK; @@ -147,16 +154,16 @@ namespace InDet { std::vector<InDet::SiSpacePointsSeed> seeds; - std::list<InDet::SiSpacePointForSeed> l_spforseed; - std::list<InDet::SiSpacePointForSeed>::iterator i_spforseed; + std::list<InDet::SiSpacePointForSeed> l_spforseed; //<! list of all space points considered for seed building. This has ownership over the pointers stored in the binned vectors ("histograms") above + std::list<InDet::SiSpacePointForSeed>::iterator i_spforseed; //<! keep track of an iterator over the seed list. Frequently used to keep track of where to add the next SP std::list<InDet::SiSpacePointForSeedITK> l_spforseed_ITK; std::list<InDet::SiSpacePointForSeedITK>::iterator i_spforseed_ITK; std::list<InDet::SiSpacePointsSeed> l_seeds; std::list<InDet::SiSpacePointsSeed>::iterator i_seed; std::list<InDet::SiSpacePointsSeed>::iterator i_seede; - std::list<InDet::SiSpacePointsProSeed> l_seeds_Pro; - std::list<InDet::SiSpacePointsProSeed>::iterator i_seed_Pro; + std::list<InDet::SiSpacePointsProSeed> l_seeds_Pro; //<! lists of output seeds + std::list<InDet::SiSpacePointsProSeed>::iterator i_seed_Pro; //<! iterators over the said list std::list<InDet::SiSpacePointsProSeed>::iterator i_seede_Pro; std::list<InDet::SiSpacePointsProSeedITK> l_seeds_ITK; std::list<InDet::SiSpacePointsProSeedITK>::iterator i_seed_ITK; diff --git a/InnerDetector/InDetRecEvent/SiSpacePoint/SiSpacePoint/PixelSpacePoint.h b/InnerDetector/InDetRecEvent/SiSpacePoint/SiSpacePoint/PixelSpacePoint.h index bc44ec7611c85a98a192410405266f61f5713785..733c0a9ddf206b6b96833891f525df79feadfd3a 100755 --- a/InnerDetector/InDetRecEvent/SiSpacePoint/SiSpacePoint/PixelSpacePoint.h +++ b/InnerDetector/InDetRecEvent/SiSpacePoint/SiSpacePoint/PixelSpacePoint.h @@ -46,16 +46,6 @@ namespace InDet PixelSpacePoint( IdentifierHash elementId, const Trk::PrepRawData* clus); - /** Parametrised constructor with Covariance Matrix pointer so for L2 at the moment */ - PixelSpacePoint( IdentifierHash elementId, - const Trk::PrepRawData* clus, - const Amg::MatrixX* globcov); - - /** Parametrised constructor with Covariance Matrix reference so for L2 at the moment */ - PixelSpacePoint( IdentifierHash elementId, - const Trk::PrepRawData* clus, - const Amg::MatrixX& globcov); - /** add Covariance Matrix and global position directly */ PixelSpacePoint( IdentifierHash elementId, const Trk::PrepRawData* clus, diff --git a/InnerDetector/InDetRecEvent/SiSpacePoint/src/PixelSpacePoint.cxx b/InnerDetector/InDetRecEvent/SiSpacePoint/src/PixelSpacePoint.cxx index 17e86a1bdccad16dc28e3130e85239ac9b5cff2b..8b03b009acad859ef30d071098117d60fbbc4b3c 100755 --- a/InnerDetector/InDetRecEvent/SiSpacePoint/src/PixelSpacePoint.cxx +++ b/InnerDetector/InDetRecEvent/SiSpacePoint/src/PixelSpacePoint.cxx @@ -9,6 +9,7 @@ #include "EventPrimitives/EventPrimitivesToStringConverter.h" #include "GeoPrimitives/GeoPrimitivesToStringConverter.h" +#include <memory> namespace InDet { @@ -31,10 +32,9 @@ namespace InDet Trk::MeasurementBase::m_localParams = Trk::LocalParameters(clus->localPosition()); Trk::MeasurementBase::m_localCovariance = clus->localCovariance(); - const Amg::Vector3D* tmpPos = clus->detectorElement()->surface().localToGlobal(clus->localPosition()) ; - assert (tmpPos!=nullptr) ; + std::unique_ptr<const Amg::Vector3D> tmpPos{clus->detectorElement()->surface().localToGlobal(clus->localPosition())}; + assert (tmpPos) ; m_position = *tmpPos; - delete tmpPos; m_clusList = new std::pair<const Trk::PrepRawData*, const Trk::PrepRawData*>(clus,nullptr); m_elemIdList.first = elementId ; @@ -44,51 +44,6 @@ namespace InDet //------------ ------------------------------------------------- - /** Constructor with globCovariance */ - PixelSpacePoint::PixelSpacePoint( IdentifierHash elementId, - const Trk::PrepRawData* clus, - const Amg::MatrixX* globcov ) - : - SpacePoint() - { - assert (clus!=nullptr); - m_globalCovariance = *globcov; - Trk::MeasurementBase::m_localParams = Trk::LocalParameters(clus->localPosition()); - Trk::MeasurementBase::m_localCovariance = clus->localCovariance(); - delete globcov; - - const Amg::Vector3D* tmpPos = clus->detectorElement()->surface().localToGlobal(clus->localPosition()) ; - assert (tmpPos!=nullptr) ; - m_position = *tmpPos; - delete tmpPos ; - - m_clusList = new std::pair<const Trk::PrepRawData*, const Trk::PrepRawData*>(clus,nullptr); - m_elemIdList.first = elementId ; - m_elemIdList.second = 0 ; - } - - /** Constructor with globCovariance */ - PixelSpacePoint::PixelSpacePoint( IdentifierHash elementId, - const Trk::PrepRawData* clus, - const Amg::MatrixX& globcov ) - : - SpacePoint() - { - assert (clus!=nullptr); - m_globalCovariance = globcov; - Trk::MeasurementBase::m_localParams = Trk::LocalParameters(clus->localPosition()); - Trk::MeasurementBase::m_localCovariance = clus->localCovariance(); - - const Amg::Vector3D* tmpPos = clus->detectorElement()->surface().localToGlobal(clus->localPosition()) ; - assert (tmpPos!=nullptr) ; - m_position = *tmpPos; - delete tmpPos ; - - m_clusList = new std::pair<const Trk::PrepRawData*, const Trk::PrepRawData*>(clus,nullptr); - m_elemIdList.first = elementId ; - m_elemIdList.second = 0 ; - } - /** Constructor with globPosition and globCovariance */ PixelSpacePoint::PixelSpacePoint( IdentifierHash elementId, const Trk::PrepRawData* clus, diff --git a/InnerDetector/InDetRecEvent/SiSpacePoint/src/SCT_SpacePoint.cxx b/InnerDetector/InDetRecEvent/SiSpacePoint/src/SCT_SpacePoint.cxx index 312ae0b072ea94543646dcb4076d4f44672db3b0..cabc8efbafe9920690272edf2be56dd804d0a946 100755 --- a/InnerDetector/InDetRecEvent/SiSpacePoint/src/SCT_SpacePoint.cxx +++ b/InnerDetector/InDetRecEvent/SiSpacePoint/src/SCT_SpacePoint.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "TrkPrepRawData/PrepRawData.h" @@ -9,6 +9,8 @@ #include "EventPrimitives/EventPrimitivesToStringConverter.h" #include "GeoPrimitives/GeoPrimitivesToStringConverter.h" +#include <memory> + namespace InDet { //------------------------------------------------------------- @@ -43,10 +45,9 @@ namespace InDet m_elemIdList.second = elementIdList.second ; assert( (clusList->first!=0) && (clusList->second!=0) ); assert(clusList->first->detectorElement()) ; - const Amg::Vector2D* locpos = (clusList->first->detectorElement()->surface().globalToLocal(position)) ; + std::unique_ptr<const Amg::Vector2D> locpos{clusList->first->detectorElement()->surface().globalToLocal(position)}; assert(locpos); Trk::MeasurementBase::m_localParams = Trk::LocalParameters(*locpos ) ; - delete locpos ; } diff --git a/InnerDetector/InDetRecTools/InDetCompetingRIOsOnTrackTool/src/CompetingSCT_ClustersOnTrackTool.cxx b/InnerDetector/InDetRecTools/InDetCompetingRIOsOnTrackTool/src/CompetingSCT_ClustersOnTrackTool.cxx index 914a4dfdb1810af5ccea22210b20590019890574..4e035bc0b24cbae7f9be559af3288210f5d71d45 100755 --- a/InnerDetector/InDetRecTools/InDetCompetingRIOsOnTrackTool/src/CompetingSCT_ClustersOnTrackTool.cxx +++ b/InnerDetector/InDetRecTools/InDetCompetingRIOsOnTrackTool/src/CompetingSCT_ClustersOnTrackTool.cxx @@ -112,14 +112,14 @@ const InDet::CompetingSCT_ClustersOnTrack* InDet::CompetingSCT_ClustersOnTrackTo ATH_MSG_DEBUG("********* in createCompetingROT() ********** "); // vector of ROTs - std::vector< const InDet::SCT_ClusterOnTrack* >* ROTvector = new std::vector<const InDet::SCT_ClusterOnTrack*>; + std::vector< const InDet::SCT_ClusterOnTrack* > ROTvector; // vector of assignmentProbs - std::vector< Trk::CompetingRIOsOnTrack::AssignmentProb > *assgnProbVector = new std::vector< Trk::CompetingRIOsOnTrack::AssignmentProb >; + auto assgnProbVector = std::make_unique<std::vector< Trk::CompetingRIOsOnTrack::AssignmentProb >>(); // type of TRT_BaseElement to check if all RIOs are of same type //InDetDD::TRT_BaseElement::Type* TRTtype = 0; const Trk::Surface* detElementSurface = 0; const Trk::TrackParameters* trkParAtRIOsurface = 0; - const Trk::TrackParameters* newTrackParameters = 0; + std::unique_ptr<const Trk::TrackParameters> newTrackParameters; bool isBarrel = true; // maxium assignment propability for choosing the surface.... //Trk::CompetingRIOsOnTrack::AssignmentProb maximumAssignProb = 0; @@ -131,10 +131,9 @@ const InDet::CompetingSCT_ClustersOnTrack* InDet::CompetingSCT_ClustersOnTrackTo << trkPar.associatedSurface().center().z() << ")"); // ---------------------- // loop over all given PrepRawData - std::list<const Trk::PrepRawData*>::const_iterator rioIter = RIO_List.begin(); - for (; rioIter!=RIO_List.end(); ++rioIter) { + for (const Trk::PrepRawData* rio : RIO_List) { // check if given pointer is not nullptr - const InDet::SCT_Cluster* riopointer = dynamic_cast<const InDet::SCT_Cluster*>(*rioIter); + const InDet::SCT_Cluster* riopointer = dynamic_cast<const InDet::SCT_Cluster*>(rio); if (!riopointer) { //ATH_MSG_WARNING("That's mean: given list of PrepRawData* contains a nullptr resp. not a SCT_Cluster!"); ATH_MSG_WARNING("Given list of PrepRawData* contains a non SCT_Cluster!"); @@ -163,24 +162,20 @@ const InDet::CompetingSCT_ClustersOnTrack* InDet::CompetingSCT_ClustersOnTrackTo } else { // first create trkParameter on the Surface of the RIO // clone TrkParameters without error to force the extrapolator to do propagation without error matrix - const Trk::TrackParameters* trkParWithoutError = trkPar.clone(); + std::unique_ptr<const Trk::TrackParameters> trkParWithoutError{trkPar.clone()}; // extrapolate to RIO surface ATH_MSG_VERBOSE("Try to propagate TrackParameters to compROT surface"); - newTrackParameters = m_extrapolator->extrapolateDirectly((trkParWithoutError ? *trkParWithoutError : trkPar), *detElementSurface, - Trk::anyDirection, // propagate in any direction - false, //do noBoundaryCheck! - Trk::nonInteracting); // without material interaction - delete trkParWithoutError; - trkParWithoutError = 0; + newTrackParameters.reset(m_extrapolator->extrapolateDirectly((trkParWithoutError ? *trkParWithoutError : trkPar), + *detElementSurface, + Trk::anyDirection, // propagate in any direction + false, //do noBoundaryCheck! + Trk::nonInteracting)); // without material interaction if (!newTrackParameters){ ATH_MSG_ERROR("TrackParameters could not be propagated to PrepRawData surface"); - delete ROTvector; - // FIXME: delete entries of ROT vector - delete assgnProbVector; return 0; } // end if (extrapolation failed) // const Trk::AtaStraightLine* trkParAtRIOsurface1 = new Trk::AtaStraightLine(trkPar.position(), trkPar.momentum(), trkPar.charge(), *RIOsurfacePointer); - trkParAtRIOsurface = newTrackParameters; + trkParAtRIOsurface = newTrackParameters.get(); ATH_MSG_VERBOSE("propagated TrackParameters on RIO surface: GP (" << trkParAtRIOsurface->position().x() << ", " << trkParAtRIOsurface->position().y() << ", " @@ -209,7 +204,7 @@ const InDet::CompetingSCT_ClustersOnTrack* InDet::CompetingSCT_ClustersOnTrackTo } else { //ATH_MSG_VERBOSE("Created ROT"); // add ROT to vector of ROTs - ROTvector->push_back(rot); + ROTvector.push_back(rot); // call weightcalculator and calc assignment probabilty: ATH_MSG_VERBOSE("Call weight calculator for non-normalized assignment probability"); Trk::CompetingRIOsOnTrack::AssignmentProb assgnProb = m_WeightCalculator->calculateWeight(*trkParAtRIOsurface, *rot, beta); @@ -222,42 +217,37 @@ const InDet::CompetingSCT_ClustersOnTrack* InDet::CompetingSCT_ClustersOnTrackTo // } }// end else (!rot) } // end for loop - delete newTrackParameters; // ------------------------------------- // test if at least one ROT was created: - if (ROTvector->size() <= 0) { + if (ROTvector.size() <= 0) { ATH_MSG_ERROR("No valid SCT_ClusterOnTrack could be created:"); ATH_MSG_ERROR("CompetingSCT_ClustersOnTrack creation aborted!"); //clean-up - delete ROTvector; - delete assgnProbVector; return 0; } - ATH_MSG_DEBUG("List of competing SCT_ ROTs contains "<< ROTvector->size() << " SCT_ClustersOnTrack"); + ATH_MSG_DEBUG("List of competing SCT_ ROTs contains "<< ROTvector.size() << " SCT_ClustersOnTrack"); // ----------------------------------- // normalize assignment probabilities: // copy ROTvector to base class vector (vector of RIO_OnTrack) because vector<> does not know inheritance structure - std::vector< const Trk::RIO_OnTrack* >* baseROTvector = new std::vector<const Trk::RIO_OnTrack*>; - std::vector< const InDet::SCT_ClusterOnTrack*>::const_iterator rotIter = ROTvector->begin(); - for (; rotIter!=ROTvector->end(); ++rotIter) { - baseROTvector->push_back(*rotIter); + std::vector< const Trk::RIO_OnTrack* > baseROTvector; + for (const InDet::SCT_ClusterOnTrack* rot : ROTvector) { + baseROTvector.push_back(rot); } // call normalize() if (isBarrel) { ATH_MSG_DEBUG("Call weight calculator for normalization now (Barrel cut)"); - m_WeightCalculator->normalize(*assgnProbVector, baseROTvector, beta, m_jo_BarrelCutValue); + m_WeightCalculator->normalize(*assgnProbVector, &baseROTvector, beta, m_jo_BarrelCutValue); } else { ATH_MSG_DEBUG("Call weight calculator for normalization now (end-cap cut)"); - m_WeightCalculator->normalize(*assgnProbVector, baseROTvector, beta, m_jo_EndCapCutValue); + m_WeightCalculator->normalize(*assgnProbVector, &baseROTvector, beta, m_jo_EndCapCutValue); } - delete baseROTvector; // --------------------------------------- // create CompetingSCT_ClustersOnTrack //return (new CompetingSCT_ClustersOnTrack(assocSurface, ROTvector, assgnProbVector, effectiveLocalPar, effectiveErrMat, ROTsHaveCommonSurface)); - CompetingSCT_ClustersOnTrack* theCompetingROT = new CompetingSCT_ClustersOnTrack(ROTvector, assgnProbVector); + CompetingSCT_ClustersOnTrack* theCompetingROT = new CompetingSCT_ClustersOnTrack(std::move(ROTvector), assgnProbVector.release()); if (msgLvl(MSG::VERBOSE)) testCompetingROT(*theCompetingROT); return theCompetingROT; } @@ -286,7 +276,7 @@ void InDet::CompetingSCT_ClustersOnTrackTool::updateCompetingROT( return; } // new vector of assignmentProbs - std::vector< InDet::CompetingSCT_ClustersOnTrack::AssignmentProb >* assgnProbVector = new std::vector< InDet::CompetingSCT_ClustersOnTrack::AssignmentProb >; + auto assgnProbVector = std::make_unique<std::vector< Trk::CompetingRIOsOnTrack::AssignmentProb >>(); // maxium assignment propability to update the index Trk::CompetingRIOsOnTrack::AssignmentProb maximumAssignProb = 0; unsigned int maximumAssignProbIndex = 0; @@ -295,7 +285,7 @@ void InDet::CompetingSCT_ClustersOnTrackTool::updateCompetingROT( << trkPar.associatedSurface().center().x() << ", " << trkPar.associatedSurface().center().y() << ", " << trkPar.associatedSurface().center().z() << ")"); - const Trk::TrackParameters* newTrackParameters = 0; + std::unique_ptr<const Trk::TrackParameters> newTrackParameters; const Trk::TrackParameters* trkParAtROTsurface = 0; // --------------------------------------------------- // get trackParameters on the surface of the compROT @@ -315,22 +305,20 @@ void InDet::CompetingSCT_ClustersOnTrackTool::updateCompetingROT( } else { // first create trkParameter on the Surface of the compROT // clone TrkParameters without error to force the extrapolator to do propagation without error matrix - const Trk::TrackParameters* trkParWithoutError = trkPar.clone(); + std::unique_ptr<const Trk::TrackParameters> trkParWithoutError{trkPar.clone()}; ATH_MSG_VERBOSE("Try to propagate TrackParameters to compROT surface"); - newTrackParameters = m_extrapolator->extrapolateDirectly((trkParWithoutError ? *trkParWithoutError : trkPar), compROT->associatedSurface(), - Trk::anyDirection, // propagate in any direction - false, //do noBoundaryCheck! - Trk::nonInteracting); // without material interaction - delete trkParWithoutError; - trkParWithoutError = 0; + newTrackParameters.reset(m_extrapolator->extrapolateDirectly((trkParWithoutError ? *trkParWithoutError : trkPar), + compROT->associatedSurface(), + Trk::anyDirection, // propagate in any direction + false, //do noBoundaryCheck! + Trk::nonInteracting)); // without material interaction if (!newTrackParameters){ ATH_MSG_ERROR("TrackParameters could not be propagated to compROT surface:"); ATH_MSG_ERROR(" CompetingSCT_ClustersOnTrack could not be updated!"); - delete assgnProbVector; return; } // end if (extrapolation failed) // const Trk::AtaStraightLine* trkParAtRIOsurface1 = new Trk::AtaStraightLine(trkPar.position(), trkPar.momentum(), trkPar.charge(), *RIOsurfacePointer); - trkParAtROTsurface = newTrackParameters; + trkParAtROTsurface = newTrackParameters.get(); ATH_MSG_VERBOSE("propagated TrackParameters on compROT surface: GP (" << trkParAtROTsurface->position().x() << ", " << trkParAtROTsurface->position().y() << ", " @@ -354,26 +342,23 @@ void InDet::CompetingSCT_ClustersOnTrackTool::updateCompetingROT( maximumAssignProbIndex = i; } } // end for loop - delete newTrackParameters; if (maximumAssignProb > 0. ) { // ----------------------------------- // normalize assignment probabilities: // copy ROTvector to base class vector (vector of RIO_OnTrack) because vector<> does not know inheritance structure - std::vector< const Trk::RIO_OnTrack* >* baseROTvector = new std::vector<const Trk::RIO_OnTrack*>; - std::vector< const InDet::SCT_ClusterOnTrack* >::const_iterator rotIter = compROT->containedROTs().begin(); - for (; rotIter!=compROT->containedROTs().end(); ++rotIter) { - baseROTvector->push_back(*rotIter); + std::vector< const Trk::RIO_OnTrack* > baseROTvector; + for (const InDet::SCT_ClusterOnTrack* rot : compROT->containedROTs()) { + baseROTvector.push_back(rot); } // call normalize() ATH_MSG_VERBOSE("normalize the assignment probabilities"); if(compROT->rioOnTrack(0).detectorElement()->isBarrel()) { ATH_MSG_DEBUG("Call weight calculator for normalization now (Barrel cut)"); - m_WeightCalculator->normalize(*assgnProbVector, baseROTvector, beta, m_jo_BarrelCutValue); + m_WeightCalculator->normalize(*assgnProbVector, &baseROTvector, beta, m_jo_BarrelCutValue); } else { ATH_MSG_DEBUG("Call weight calculator for normalization now (end-cap cut)"); - m_WeightCalculator->normalize(*assgnProbVector, baseROTvector, beta, m_jo_EndCapCutValue); + m_WeightCalculator->normalize(*assgnProbVector, &baseROTvector, beta, m_jo_EndCapCutValue); } - delete baseROTvector; } else { ATH_MSG_VERBOSE("all ROTs have probability 0."); maximumAssignProbIndex = 0; @@ -382,7 +367,7 @@ void InDet::CompetingSCT_ClustersOnTrackTool::updateCompetingROT( // update the competingROT // set new assignment probabilities delete compROT->m_assignProb; - compROT->m_assignProb = assgnProbVector; + compROT->m_assignProb = assgnProbVector.release(); // update maximum assign prob index: compROT->m_indexMaxAssignProb = maximumAssignProbIndex; // delete global position (will be recreated by the competingROT itself) @@ -410,13 +395,9 @@ void InDet::CompetingSCT_ClustersOnTrackTool::reequipCompetingROT ATH_MSG_WARNING( "inconsistent use of reequipCompetingROT() " ); return; } - std::vector<const InDet::SCT_ClusterOnTrack*>::const_iterator - rotIter = cst->m_containedChildRots->begin(); - for (; rotIter!=cst->m_containedChildRots->end(); ++rotIter) - delete (*rotIter); - delete cst->m_containedChildRots; - cst->m_containedChildRots = new std::vector<const InDet::SCT_ClusterOnTrack*>; - cst->m_containedChildRots->push_back(newCluster); + for (const InDet::SCT_ClusterOnTrack* rot : cst->m_containedChildRots) delete rot; + cst->m_containedChildRots.clear(); + cst->m_containedChildRots.push_back(newCluster); this->updateCompetingROT(*modifiableCompROT, trkPar, beta); } @@ -523,7 +504,7 @@ StatusCode InDet::CompetingSCT_ClustersOnTrackTool::updateCompetingROTprobs( // update the competingROT // set new assignment probabilities delete compROT->m_assignProb; - std::vector< Trk::CompetingRIOsOnTrack::AssignmentProb >* assgnProbVector = new std::vector< Trk::CompetingRIOsOnTrack::AssignmentProb >(assignmentProbs); + auto assgnProbVector = std::make_unique<std::vector< Trk::CompetingRIOsOnTrack::AssignmentProb >>(); // update maximum assign prob index: double maximumAssignProb = 0.; compROT->m_indexMaxAssignProb = 0; @@ -538,7 +519,7 @@ StatusCode InDet::CompetingSCT_ClustersOnTrackTool::updateCompetingROTprobs( (*(assgnProbVector))[i] = 0.; } } // end for loop - compROT->m_assignProb = assgnProbVector; + compROT->m_assignProb = assgnProbVector.release(); // delete global position (will be recreated by the competingROT itself) if (compROT->m_globalPosition) { compROT->m_globalPosition.release().reset(); diff --git a/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/InDetConversionFinderTools.h b/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/InDetConversionFinderTools.h index d4d79d9a03a3f1b8f23f47216611bb6d28f8dbf0..213d4ad851f7c5de8f496dc3dab8447932d4cb02 100755 --- a/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/InDetConversionFinderTools.h +++ b/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/InDetConversionFinderTools.h @@ -72,11 +72,13 @@ public: using IVertexFinder::findVertex; //!< Conversion candidate reconstruction for Trk::Tracks. virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> - findVertex(const TrackCollection* trk_coll) const override; + findVertex(const EventContext& ctx, + const TrackCollection* trk_coll) const override; /** Conversion candidate reconstruction for Trk::TrackParticle (default) */ virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> - findVertex(const xAOD::TrackParticleContainer* trk_coll) const override; + findVertex(const EventContext& ctx, + const xAOD::TrackParticleContainer* trk_coll) const override; protected: diff --git a/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/InDetConversionFinderTools.cxx b/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/InDetConversionFinderTools.cxx index 536101f9bf9bf83cf9fcf5fb42c4c6ede3fb8a4f..1efd3fe1a50c4a58429b712f2acf3f7bd5facfd8 100755 --- a/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/InDetConversionFinderTools.cxx +++ b/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/InDetConversionFinderTools.cxx @@ -122,7 +122,8 @@ InDetConversionFinderTools::InDetConversionFinderTools(const std::string& t, //TrackCollection std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> - InDetConversionFinderTools::findVertex(const TrackCollection* /*trk_coll*/) const + InDetConversionFinderTools::findVertex(const EventContext& /*ctx*/, + const TrackCollection* /*trk_coll*/) const { ATH_MSG_ERROR("Using Track Container not currently supported returning an empty conatiner"); @@ -137,8 +138,8 @@ InDetConversionFinderTools::InDetConversionFinderTools(const std::string& t, // TrackParticle Collection std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> - InDetConversionFinderTools::findVertex( - const xAOD::TrackParticleContainer* trk_coll) const + InDetConversionFinderTools::findVertex(const EventContext& ctx, + const xAOD::TrackParticleContainer* trk_coll) const { // Make collection for conversions. xAOD::VertexContainer* InDetConversionContainer = @@ -229,7 +230,7 @@ InDetConversionFinderTools::InDetConversionFinderTools(const std::string& t, trackParticleList.push_back(*iter_neg); xAOD::Vertex* myVertex = nullptr; - myVertex = m_iVertexFitter->fit(trackParticleList, initPos); + myVertex = m_iVertexFitter->fit(ctx, trackParticleList, initPos); trackParticleList.clear(); if (myVertex) { ATH_MSG_DEBUG("VertexFit successful!"); diff --git a/InnerDetector/InDetRecTools/InDetTrackScoringTools/src/InDetAmbiScoringTool.cxx b/InnerDetector/InDetRecTools/InDetTrackScoringTools/src/InDetAmbiScoringTool.cxx index 2ae8ce75a52f876e8a3655c1e6a7cd88b3a214f2..1d0f450574e929fc3b13ec5cb8fc3c49229ce1f9 100755 --- a/InnerDetector/InDetRecTools/InDetTrackScoringTools/src/InDetAmbiScoringTool.cxx +++ b/InnerDetector/InDetRecTools/InDetTrackScoringTools/src/InDetAmbiScoringTool.cxx @@ -178,21 +178,17 @@ StatusCode InDet::InDetAmbiScoringTool::finalize() Trk::TrackScore InDet::InDetAmbiScoringTool::score( const Trk::Track& track, const bool suppressHoleSearch ) const { - if (!track.trackSummary()) { - // @TODO this is not thread safe. Should fail when being called in MT - ATH_MSG_DEBUG("Track without track summary. Compute summary to score track."); - std::unique_ptr<const Trk::TrackSummary> summary; - if ( suppressHoleSearch) { - ATH_MSG_DEBUG ("Get summary for new Track, suppress HoleSearch"); - summary.reset( m_trkSummaryTool->createSummaryNoHoleSearch(track) ); - } else { - ATH_MSG_DEBUG ("Get summary for new Track with HoleSearch"); - summary.reset( m_trkSummaryTool->createSummary(track) ); - } + std::unique_ptr<const Trk::TrackSummary> summary; + if ( suppressHoleSearch) { + ATH_MSG_DEBUG ("Get summary for new Track, suppress HoleSearch"); + summary = m_trkSummaryTool->summaryNoHoleSearch(track); + } else { + ATH_MSG_DEBUG ("Get summary for new Track with HoleSearch"); + summary = m_trkSummaryTool->summary(track); } - assert( track.trackSummary() ); - ATH_MSG_VERBOSE ("Track has TrackSummary "<<*track.trackSummary()); - Trk::TrackScore score = Trk::TrackScore( simpleScore(track, *track.trackSummary()) ); + + ATH_MSG_VERBOSE ("Track has TrackSummary "<<*summary); + Trk::TrackScore score = Trk::TrackScore( simpleScore(track, *summary) ); ATH_MSG_DEBUG ("Track has Score: "<<score); return score; diff --git a/InnerDetector/InDetRecTools/InDetTrackScoringTools/src/InDetCosmicScoringTool.cxx b/InnerDetector/InDetRecTools/InDetTrackScoringTools/src/InDetCosmicScoringTool.cxx index e772267391425a4d6516cea8f46af2114494def0..ad8a47ca0e01c85e51bd7f6dd7c24aca8cbc2172 100755 --- a/InnerDetector/InDetRecTools/InDetTrackScoringTools/src/InDetCosmicScoringTool.cxx +++ b/InnerDetector/InDetRecTools/InDetTrackScoringTools/src/InDetCosmicScoringTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "InDetTrackScoringTools/InDetCosmicScoringTool.h" @@ -60,22 +60,17 @@ StatusCode InDet::InDetCosmicScoringTool::finalize() Trk::TrackScore InDet::InDetCosmicScoringTool::score( const Trk::Track& track, const bool suppressHoleSearch ) const { - if (!track.trackSummary()) { - // @TODO this is not thread safe. Should fail when being called in MT - ATH_MSG_DEBUG("Track without track summary. Compute summary to score track."); - std::unique_ptr<const Trk::TrackSummary> summary; - if ( suppressHoleSearch) { - ATH_MSG_DEBUG ("Get summary for new Track, suppress HoleSearch"); - summary.reset( m_trkSummaryTool->createSummaryNoHoleSearch(track) ); - } else { - ATH_MSG_DEBUG ("Get summary for new Track with HoleSearch"); - summary.reset( m_trkSummaryTool->createSummary(track) ); - } + std::unique_ptr<const Trk::TrackSummary> summary; + if ( suppressHoleSearch) { + ATH_MSG_DEBUG ("Get summary for new Track, suppress HoleSearch"); + summary = m_trkSummaryTool->summaryNoHoleSearch(track); + } else { + ATH_MSG_DEBUG ("Get summary for new Track with HoleSearch"); + summary = m_trkSummaryTool->summary(track); } - assert( track.trackSummary() ); - ATH_MSG_VERBOSE( "Track has TrackSummary "<<*track.trackSummary() ); - Trk::TrackScore score = Trk::TrackScore( simpleScore(track, *track.trackSummary()) ); + ATH_MSG_VERBOSE( "Track has TrackSummary "<<*summary ); + Trk::TrackScore score = Trk::TrackScore( simpleScore(track, *summary) ); ATH_MSG_DEBUG( "Track has Score: "<<score ); return score; } diff --git a/InnerDetector/InDetRecTools/InDetTrackScoringTools/src/InDetTrtTrackScoringTool.cxx b/InnerDetector/InDetRecTools/InDetTrackScoringTools/src/InDetTrtTrackScoringTool.cxx index 7418d8c3df470cafceacd71b2aa30465965a1541..30c9ce8c606e89bb330232856f7d3cf3cc7d8158 100755 --- a/InnerDetector/InDetRecTools/InDetTrackScoringTools/src/InDetTrtTrackScoringTool.cxx +++ b/InnerDetector/InDetRecTools/InDetTrackScoringTools/src/InDetTrtTrackScoringTool.cxx @@ -110,22 +110,17 @@ StatusCode InDet::InDetTrtTrackScoringTool::finalize() Trk::TrackScore InDet::InDetTrtTrackScoringTool::score( const Trk::Track& track, const bool suppressHoleSearch ) const { - if (!track.trackSummary()) { - // @TODO this is not thread safe. Should fail when being called in MT - ATH_MSG_DEBUG("Track without track summary. Compute summary to score track."); - std::unique_ptr<const Trk::TrackSummary> summary; - if ( suppressHoleSearch) { - ATH_MSG_DEBUG ("Get summary for new Track, suppress HoleSearch"); - summary.reset( m_trkSummaryTool->createSummaryNoHoleSearch(track) ); - } else { - ATH_MSG_DEBUG ("Get summary for new Track with HoleSearch"); - summary.reset( m_trkSummaryTool->createSummary(track) ); - } + std::unique_ptr<const Trk::TrackSummary> summary; + if ( suppressHoleSearch) { + ATH_MSG_DEBUG ("Get summary for new Track, suppress HoleSearch"); + summary = m_trkSummaryTool->summaryNoHoleSearch(track); + } else { + ATH_MSG_DEBUG ("Get summary for new Track with HoleSearch"); + summary = m_trkSummaryTool->summary(track); } - assert( track.trackSummary() ); - ATH_MSG_VERBOSE("Track has TrackSummary "<<*track.trackSummary()); - Trk::TrackScore score = Trk::TrackScore( simpleScore(track, *track.trackSummary()) ); + ATH_MSG_VERBOSE("Track has TrackSummary "<<*summary); + Trk::TrackScore score = Trk::TrackScore( simpleScore(track, *summary) ); ATH_MSG_VERBOSE("Track has Score: "<<score); return score; } diff --git a/InnerDetector/InDetRecTools/InDetTrackSelectorTool/src/InDetConversionTrackSelectorTool.cxx b/InnerDetector/InDetRecTools/InDetTrackSelectorTool/src/InDetConversionTrackSelectorTool.cxx index 98757b1adeec49a3ddfcc7956e3c11b7f96c6302..07d9f0f725c8c3b2eb48a677f3d9984f9bb50898 100644 --- a/InnerDetector/InDetRecTools/InDetTrackSelectorTool/src/InDetConversionTrackSelectorTool.cxx +++ b/InnerDetector/InDetRecTools/InDetTrackSelectorTool/src/InDetConversionTrackSelectorTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "InDetTrackSelectorTool/InDetConversionTrackSelectorTool.h" @@ -130,7 +130,7 @@ namespace InDet double pt = std::fabs(1./qOverP)*std::sin(perigee->parameters()[Trk::theta]); double d0 = perigee->parameters()[Trk::d0]; double z0 = perigee->parameters()[Trk::z0]; - const Trk::TrackSummary* tSum = m_trkSumTool->createSummaryNoHoleSearch(track); + std::unique_ptr<const Trk::TrackSummary> tSum = m_trkSumTool->summaryNoHoleSearch(track); if(tSum){ double ratioTrk = 1.0; int nclus = tSum->get(Trk::numberOfPixelHits) + tSum->get(Trk::numberOfSCTHits); @@ -171,7 +171,6 @@ namespace InDet if(ratioTrk>m_trRatioV0) pass = false; } - delete tSum; } else pass = false; if (not vertexSuppliedByUser) delete myVertex; if (perigee!=track.perigeeParameters()) delete perigee; diff --git a/InnerDetector/InDetRecTools/InDetTrackSummaryHelperTool/src/InDetTrackSummaryHelperTool.cxx b/InnerDetector/InDetRecTools/InDetTrackSummaryHelperTool/src/InDetTrackSummaryHelperTool.cxx index f4f09fc00ddf922b57359b3e8b95124548065469..dad729aa151ef321cd901683e909bb529646c282 100755 --- a/InnerDetector/InDetRecTools/InDetTrackSummaryHelperTool/src/InDetTrackSummaryHelperTool.cxx +++ b/InnerDetector/InDetRecTools/InDetTrackSummaryHelperTool/src/InDetTrackSummaryHelperTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "InDetTrackSummaryHelperTool/InDetTrackSummaryHelperTool.h" @@ -145,17 +145,26 @@ void InDet::InDetTrackSummaryHelperTool::analyse(const Trk::Track& track, information[Trk::numberOfDBMHits]++; } else { information[Trk::numberOfPixelHits]++; - if (m_pixelId->layer_disk(id)==0 and m_pixelId->is_barrel(id)) information[Trk::numberOfInnermostPixelLayerHits]++; - if (m_pixelId->layer_disk(id)==1 and m_pixelId->is_barrel(id)) information[Trk::numberOfNextToInnermostPixelLayerHits]++; + if (m_pixelId->layer_disk(id) == 0 and m_pixelId->is_barrel(id)) + information[Trk::numberOfInnermostPixelLayerHits]++; + if (m_pixelId->layer_disk(id) == 1 and m_pixelId->is_barrel(id)) + information[Trk::numberOfNextToInnermostPixelLayerHits]++; // check to see if there's an ambiguity with the ganged cluster. - const PixelClusterOnTrack* pix = dynamic_cast<const PixelClusterOnTrack*>(rot); + const PixelClusterOnTrack* pix = nullptr; + if (rot->rioType(Trk::RIO_OnTrackType::PixelCluster)) { + pix = static_cast<const PixelClusterOnTrack*>(rot); + } if ( not pix ) { ATH_MSG_ERROR("Could not cast pixel RoT to PixelClusterOnTrack!"); } else { const InDet::PixelCluster* pixPrd = pix->prepRawData(); if ( pixPrd and pixPrd->isSplit() ) { information[Trk::numberOfPixelSplitHits]++; hitIsSplit=true; } - if ( pixPrd and m_pixelId->is_barrel(id) and m_pixelId->layer_disk(id)==0 and pixPrd->isSplit() ) information[Trk::numberOfInnermostLayerSplitHits]++; - if ( pixPrd and m_pixelId->is_barrel(id) and m_pixelId->layer_disk(id)==1 and pixPrd->isSplit() ) information[Trk::numberOfNextToInnermostLayerSplitHits]++; + if (pixPrd and m_pixelId->is_barrel(id) and + m_pixelId->layer_disk(id) == 0 and pixPrd->isSplit()) + information[Trk::numberOfInnermostLayerSplitHits]++; + if (pixPrd and m_pixelId->is_barrel(id) and + m_pixelId->layer_disk(id) == 1 and pixPrd->isSplit()) + information[Trk::numberOfNextToInnermostLayerSplitHits]++; if ( pix->isBroadCluster() ) information[Trk::numberOfPixelSpoiltHits]++; if ( pix->hasClusterAmbiguity() ) { information[Trk::numberOfGangedPixels]++; @@ -205,7 +214,11 @@ void InDet::InDetTrackSummaryHelperTool::analyse(const Trk::Track& track, } else { information[Trk::numberOfSCTHits]++; - const InDet::SCT_ClusterOnTrack *sctclus=dynamic_cast<const InDet::SCT_ClusterOnTrack *>(rot); + + const InDet::SCT_ClusterOnTrack* sctclus = nullptr; + if (rot->rioType(Trk::RIO_OnTrackType::SCTCluster)) { + sctclus = static_cast<const InDet::SCT_ClusterOnTrack*>(rot); + } if ( not sctclus ) { ATH_MSG_ERROR("Could not cast SCT RoT to SCT_ClusterOnTrack!"); } else { @@ -246,29 +259,38 @@ void InDet::InDetTrackSummaryHelperTool::analyse(const Trk::Track& track, information[Trk::numberOfTRTXenonHits]++; } - if (isOutlier and not ispatterntrack ) { // ME: outliers on pattern tracks may be reintegrated by fitter, so count them as hits + if (isOutlier and not ispatterntrack) { + // ME: outliers on pattern tracks may be + // reintegrated by fitter, so count them as hits information[Trk::numberOfTRTOutliers]++; - const InDet::TRT_DriftCircleOnTrack* trtDriftCircle - = dynamic_cast<const InDet::TRT_DriftCircleOnTrack*>( rot ); - if ( not trtDriftCircle ) { + const InDet::TRT_DriftCircleOnTrack* trtDriftCircle = nullptr; + if (rot->rioType(Trk::RIO_OnTrackType::TRT_DriftCircle)) { + trtDriftCircle = static_cast<const InDet::TRT_DriftCircleOnTrack*>(rot); + } + if (not trtDriftCircle) { ATH_MSG_ERROR("Could not cast TRT RoT to TRT_DriftCircleOnTracknot "); } else { - if ( trtDriftCircle->highLevel()==true and not isArgonStraw and not isKryptonStraw ) information[Trk::numberOfTRTHighThresholdOutliers]++; + if (trtDriftCircle->highLevel() == true and not isArgonStraw and + not isKryptonStraw) + information[Trk::numberOfTRTHighThresholdOutliers]++; } } else { information[Trk::numberOfTRTHits]++; double error2=rot->localCovariance()(0,0); if (error2>1) information[Trk::numberOfTRTTubeHits]++; - const InDet::TRT_DriftCircleOnTrack* trtDriftCircle - = dynamic_cast<const InDet::TRT_DriftCircleOnTrack*>( rot ); - if ( not trtDriftCircle ) { + const InDet::TRT_DriftCircleOnTrack* trtDriftCircle = nullptr; + if (rot->rioType(Trk::RIO_OnTrackType::TRT_DriftCircle)) { + trtDriftCircle = static_cast<const InDet::TRT_DriftCircleOnTrack*>(rot); + } + if (not trtDriftCircle) { ATH_MSG_ERROR("Could not cast TRT RoT to TRT_DriftCircleOnTracknot "); } else { - if ( trtDriftCircle->highLevel()==true ) { - if ( not isArgonStraw and not isKryptonStraw ) information[Trk::numberOfTRTHighThresholdHits]++; - assert (Trk::numberOfTRTHighThresholdHitsTotal<information.size()); + if (trtDriftCircle->highLevel() == true) { + if (not isArgonStraw and not isKryptonStraw) + information[Trk::numberOfTRTHighThresholdHits]++; + assert(Trk::numberOfTRTHighThresholdHitsTotal < information.size()); information[Trk::numberOfTRTHighThresholdHitsTotal]++; } } @@ -362,15 +384,21 @@ void InDet::InDetTrackSummaryHelperTool::updateSharedHitCount(const Trk::Track & const DataVector<const Trk::MeasurementBase>* measurements = track.measurementsOnTrack(); if (measurements){ for (const auto& ms : *measurements){ - const Trk::RIO_OnTrack* rot = dynamic_cast<const Trk::RIO_OnTrack*>(ms); // check if it's a rot + const Trk::RIO_OnTrack* rot = nullptr; + if (ms->type(Trk::MeasurementBaseType::RIO_OnTrack)) { + rot = static_cast<const Trk::RIO_OnTrack*>(ms); + } if (rot){ const Identifier& id = rot->identify(); if ( m_doSharedHits and m_usePixel and m_pixelId->is_pixel(id) ) { // check if shared bool hitIsSplit(false); - if (m_runningTIDE_Ambi){ - const PixelClusterOnTrack* pix = dynamic_cast<const PixelClusterOnTrack*>(rot); + if (m_runningTIDE_Ambi) { + const PixelClusterOnTrack* pix =nullptr; + if (rot->rioType(Trk::RIO_OnTrackType::PixelCluster)) { + pix = static_cast<const PixelClusterOnTrack*>(rot); + } if (pix) { const InDet::PixelCluster* pixPrd = pix->prepRawData(); if (pixPrd and pixPrd->isSplit()) { @@ -383,7 +411,7 @@ void InDet::InDetTrackSummaryHelperTool::updateSharedHitCount(const Trk::Track & } // If we are running the TIDE ambi don't count split hits as shared if ( not (m_runningTIDE_Ambi and hitIsSplit) ){ - if ( isShared(prd_to_track_map, m_assoTool, *(rot->prepRawData())) ) { + if (isShared(prd_to_track_map, m_assoTool, *(rot->prepRawData()))) { ATH_MSG_DEBUG("shared Pixel hit found"); summary.m_information[Trk::numberOfPixelSharedHits]++; if ( (m_pixelId->is_barrel(id) and m_pixelId->layer_disk(id)==0) ) { diff --git a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/CMakeLists.txt b/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/CMakeLists.txt deleted file mode 100644 index 9e7a0112d127affd44279c0bf50f547a822feaaf..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/CMakeLists.txt +++ /dev/null @@ -1,42 +0,0 @@ -################################################################################ -# Package: InDetVKalPriVxFinderTool -################################################################################ - -# Declare the package name: -atlas_subdir( InDetVKalPriVxFinderTool ) - -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Control/AthenaBaseComps - Event/xAOD/xAODTracking - GaudiKernel - InnerDetector/InDetRecTools/InDetRecToolInterfaces - InnerDetector/InDetConditions/BeamSpotConditionsData - Tracking/TrkEvent/TrkParameters - Tracking/TrkEvent/TrkParticleBase - Tracking/TrkEvent/TrkTrack - Tracking/TrkVertexFitter/TrkVKalVrtFitter - Control/CxxUtils - PRIVATE - Tracking/TrkEvent/TrkEventPrimitives - Tracking/TrkEvent/TrkTrackLink - Tracking/TrkEvent/TrkTrackSummary - Tracking/TrkEvent/VxVertex - Tracking/TrkTools/TrkToolInterfaces ) - -# External dependencies: -find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) - -# Component(s) in the package: -atlas_add_component( InDetVKalPriVxFinderTool - src/*.cxx - src/components/*.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps xAODTracking GaudiKernel InDetRecToolInterfaces - TrkParameters TrkParticleBase TrkTrack TrkVKalVrtFitterLib CxxUtils TrkEventPrimitives TrkTrackSummary - VxVertex TrkToolInterfaces ) - -# Install files from the package: -atlas_install_headers( InDetVKalPriVxFinderTool ) -atlas_install_python_modules( python/*.py ) - diff --git a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/InDetVKalPriVxFinderTool/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/InDetVKalPriVxFinderTool/ATLAS_CHECK_THREAD_SAFETY deleted file mode 100644 index cb633761f77cb2f97827c435389cd36c6adc264d..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/InDetVKalPriVxFinderTool/ATLAS_CHECK_THREAD_SAFETY +++ /dev/null @@ -1 +0,0 @@ -InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool diff --git a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/InDetVKalPriVxFinderTool/InDetVKalPriVxFinderTool.h b/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/InDetVKalPriVxFinderTool/InDetVKalPriVxFinderTool.h deleted file mode 100755 index f8b58aab7ea2d1686b72e4a2a417821273a8195f..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/InDetVKalPriVxFinderTool/InDetVKalPriVxFinderTool.h +++ /dev/null @@ -1,299 +0,0 @@ -/* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -*/ - -/******************************************************* - InDetVKalPriVxFinderTool.h - description - - A tool to find primary vertex with or without pileup, with or without beam - constraint. It works with TrackCollection of TrackParticleBaseCollection. Beam - position if needed is provided via BeamCond service or jobOptions. - - Tool used VKalVrt vertex fitter (TrkVKalVrtFitter tool). - - By default primary vertex finder user robust functional Rob=5 (see VKalVrt - descrption for details) which provides optimal pulls. - - Author: Vadim Kostyukhin - e-mail: vadim.kostyukhin@cern.ch -********************************************************/ - -#ifndef _VKalVrt_InDetVKalPriVxFinderTool_H -#define _VKalVrt_InDetVKalPriVxFinderTool_H -// Normal STL and physical vectors -#include "TrkToolInterfaces/ITrackSelectorTool.h" -#include "TrkToolInterfaces/ITrackSummaryTool.h" - -// Gaudi includes -#include "TrkParameters/TrackParameters.h" -#include "TrkParticleBase/TrackParticleBaseCollection.h" -#include "TrkTrack/TrackCollection.h" - -// Gaudi includes -#include "AthenaBaseComps/AthAlgTool.h" -#include "GaudiKernel/ServiceHandle.h" -#include "GaudiKernel/ToolHandle.h" -// -#include "InDetRecToolInterfaces/IVertexFinder.h" -#include "TrkVKalVrtFitter/TrkVKalVrtFitter.h" -#include "xAODTracking/VertexAuxContainer.h" -#include "xAODTracking/VertexContainerFwd.h" -// -#include <utility> //for std::pair -#include <vector> - -#include "BeamSpotConditionsData/BeamSpotData.h" - -#include "CxxUtils/checker_macros.h" - -namespace Trk { -class TrackParticle; -} - -namespace InDet { - -class InDetVKalPriVxFinderTool - : public AthAlgTool - , virtual public IVertexFinder -{ -public: - InDetVKalPriVxFinderTool(const std::string& t, - const std::string& n, - const IInterface* p); - virtual ~InDetVKalPriVxFinderTool(); - virtual StatusCode initialize() override; - virtual StatusCode finalize() override; - // - // Tool interface - // - using IVertexFinder::findVertex; - - virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> - findVertex(const TrackCollection* trackTES) const override; - - - virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> - findVertex(const xAOD::TrackParticleContainer* trackTES) const override; - // - -private: - - - std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> - findVertex(const Trk::TrackParticleBaseCollection* trackTES) const; - /* JobOption tunable parameters */ - - // Beam position - double m_BeamPositionX; - double m_BeamPositionY; - long int m_BeamConstraint; - long int m_TypeRobust; - double m_RobustScale; - - // Track selection - long int m_CutSctHits; - long int m_CutPixelHits; - long int m_CutSiHits; - long int m_CutBLayHits; - long int m_CutSharedHits; - double m_CutPt; - double m_CutZVrt; - double m_CutA0; - double m_CutChi2; - double m_A0TrkErrorCut; - double m_ZTrkErrorCut; - // Cuts for track - initial vertex association - double m_RImpSelCut; - double m_ZImpSelCut; - double m_RDistSelCut; - double m_ZDistSelCut; - double m_SignifSelCut; - // Stop point for the common fit - double m_SecTrkChi2Cut; - double m_WeightCut; - // Maximal number of vertices - long int m_NPVertexMax; - - PublicToolHandle<Trk::ITrkVKalVrtFitter> m_fitSvc{ this, - "TrkVKalVrtFitter", - "Trk::TrkVKalVrtFitter", - "" }; - PublicToolHandle<Trk::ITrackSummaryTool> m_sumSvc{ - this, - "TrackSummaryTool", - "Trk::TrackSummaryTool/AtlasTrackSummaryTool", - "" - }; //!< Pointer to the track summary tool - SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey{ - this, - "BeamSpotKey", - "BeamSpotData", - "SG key for beam spot" - }; - PublicToolHandle<Trk::ITrackSelectorTool> - m_trkSelector{ this, "DefaultTrackSelection", "DefaultTrackSelection", "" }; - - // - int m_SummaryToolExist; - int m_trkSelectorExist; - - /* - * C.A - * Cache for passing arguements between methods - * Added for the MT migration to avoid state - */ - struct Cache { - Amg::Vector3D m_BeamCnst; - std::vector<double> m_BeamCnstWid; - StatusCode m_sc; - TLorentzVector m_Momentum; - long int m_Charge; - std::vector<double**> m_savedTrkFittedPerigees; - std::vector<std::vector<AmgSymMatrix(5)>> m_fittedTrkCov; - }; - //---------------------------------------------------------------------------------------------- - // Private functions - // - void CleanTrkSet(Cache& cache, - std::vector<const Trk::TrackParticleBase*>&, - std::vector<const Trk::Track*>&, - Amg::Vector3D& FitVertex, - std::vector<double>& Chi2PerTrk, - std::vector<const Trk::TrackParticleBase*>&, - std::vector<const Trk::Track*>&) const; - - int FindMax(std::vector<double>&) const; - - int FindMin(std::vector<double>&) const; - - int FindMaxSecond(std::vector<double>&) const; - - const Trk::Perigee* GetPerigee(const Trk::TrackParticleBase* List) const; - - const Trk::Perigee* GetPerigee(const Trk::Track* List) const; - - void RemoveEntryInList(std::vector<const Trk::Track*>& ListTracks, int) const; - - void RemoveEntryInList(std::vector<const Trk::TrackParticleBase*>& ListTracks, - int) const; - - void RemoveEntryInList(std::vector<double>& List, int Outlier) const; - - double GetLimitAngle(double) const; - - void UniqList(std::vector<const Trk::Track*>& List) const; - - void UniqList(std::vector<const Trk::TrackParticleBase*>& List) const; - - void RemoveUsedEntry(std::vector<const Trk::Track*>&, - std::vector<const Trk::Track*>&, - std::vector<double>&) const; - - void RemoveUsedEntry(std::vector<const Trk::TrackParticleBase*>&, - std::vector<const Trk::TrackParticleBase*>&, - std::vector<double>&) const; - - void inpSelector( - std::vector<const Trk::TrackParticleBase*>& ListParticles, - std::vector<const Trk::Track*>& ListTracks, - Amg::Vector3D& IniVertex, - std::vector<const Trk::TrackParticleBase*>& SelectedParticles, - std::vector<const Trk::Track*>& SelectedTracks) const; - - double FitCommonVrt(Cache& cache, - std::vector<const Trk::TrackParticleBase*>& ListP, - std::vector<const Trk::Track*>& ListT, - double ZEstimation, - Amg::Vector3D& FitVertex, - std::vector<double>& ErrorMatrix, - std::vector<double>& TrkWeights) const; - - double FindZPosTrk(Cache& cache, - std::vector<const Trk::Track*>& ListTracks, - double& ControlVariable) const; - - double FindZPosTrk(Cache& cache, - std::vector<const Trk::TrackParticleBase*>& ListTracks, - double& ControlVariable) const; - - double FindZPos(std::vector<double>& ZTrk, - std::vector<double>& PtTrk, - std::vector<double>& PxTrk, - std::vector<double>& PyTrk, - std::vector<double>& PhiTrk, - double& ControlVar) const; - - void SetTrkParamVectors( - Cache& cache, - std::vector<const Trk::TrackParticleBase*>& ListTracks, - std::vector<double>& ZTrk, - std::vector<double>& PtTrk, - std::vector<double>& PxTrk, - std::vector<double>& PyTrk, - std::vector<double>& PhiTrk) const; - - void SetTrkParamVectors(Cache& cache, - std::vector<const Trk::Track*>& ListTracks, - std::vector<double>& ZTrk, - std::vector<double>& PtTrk, - std::vector<double>& PxTrk, - std::vector<double>& PyTrk, - std::vector<double>& PhiTrk) const; - - int PVrtListFind( - Cache& cache, - std::vector<const Trk::TrackParticleBase*>& ListParticles, - std::vector<const Trk::Track*>& ListTracks, - std::vector<Amg::Vector3D>& PVrtList, - std::vector<AmgSymMatrix(3)>& ErrorMatrixPerVrt, - std::vector<double>& Chi2PerVrt, - std::vector<double>& ControlVariablePerVrt, - std::vector<std::vector<const Trk::TrackParticleBase*>>& PrtPerVrt, - std::vector<std::vector<const Trk::Track*>>& TrkPerVrt, - std::vector<std::vector<double>>& TrkWgtPerVrt) const; - - std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> SaveResults( - Cache& cache, - int NVrt, - std::vector<Amg::Vector3D>& PVrtList, - std::vector<AmgSymMatrix(3)>& ErrorMatrixPerVrt, - std::vector<double>& Chi2PerVrt, - std::vector<int>& NTrkPerVrt, - std::vector<std::vector<const Trk::TrackParticleBase*>>& PrtPerVrt, - std::vector<std::vector<const Trk::Track*>>& TrkPerVrt, - std::vector<std::vector<double>>& TrkWgtPerVrt, - const TrackCollection* trackTES = 0, - const Trk::TrackParticleBaseCollection* partTES = 0) const; - - StatusCode CutTrk(double PInvVert, - double ThetaVert, - double A0Vert, - double Chi2, - long int PixelHits, - long int SctHits, - long int SharedHits, - long int BLayHits) const; - - double** getWorkArr2(long int dim1, long int dim2) const; - void removeWorkArr2(double** Arr, long int dim1, long int dim2) const; - double*** getWorkArr3(long int dim1, long int dim2, long int dim3) const; - void removeWorkArr3(double*** Arr, - long int dim1, - long int dim2, - long int dim3) const; - AmgSymMatrix(5) FillCovMatrix(int iTrk, std::vector<double>& Matrix) const; - Amg::Vector3D findIniXY( - const Trk::TrackParticleBaseCollection* newPrtCol) const; - Amg::Vector3D findIniXY(const TrackCollection* newPrtCol) const; - //--------------------------------------------------------------------------- - // Arrays for propagation of fit results to steering procedure - // - /* - * Consider having an internal stuct Cache {.... }; - * and then pass it to methods to keep track - */ -}; - -} // end of namespace bracket - -#endif diff --git a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/python/InDetVKalPriVxFinderTool.py b/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/python/InDetVKalPriVxFinderTool.py deleted file mode 100755 index e97eaea6126641ce3fc00e358dd40b127dcdd89a..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/python/InDetVKalPriVxFinderTool.py +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from AthenaCommon.Logging import logging -# -from InDetVKalPriVxFinderToolConf import InDet__InDetVKalPriVxFinderTool - -class InDetVKalPriVxFinder ( InDet__InDetVKalPriVxFinderTool ) : - - def __init__(self, name="InDetVKalPriVxFinder"): - - from AthenaCommon.AppMgr import ToolSvc - mlog = logging.getLogger( 'InDetVKalPriVxFinder::__init__ ' ) - mlog.info("entering") - - - from TrkVKalVrtFitter.TrkVKalVrtFitterConf import Trk__TrkVKalVrtFitter - TrkVKalVrtPFitter = Trk__TrkVKalVrtFitter() - ToolSvc += TrkVKalVrtPFitter - - from TrkTrackSummaryTool.AtlasTrackSummaryTool import AtlasTrackSummaryTool - AtlasTrackSummaryTool = AtlasTrackSummaryTool() - mlog.info("AtlasTrackSummaryTool for InDetVKalPriVxFinder created") - ToolSvc += AtlasTrackSummaryTool - - - InDet__InDetVKalPriVxFinderTool.__init__( self,name="InDetVKalPriVxFinderTool", - TrackSummaryTool=AtlasTrackSummaryTool, - FitterTool=TrkVKalVrtPFitter ) diff --git a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/CutTrk.cxx b/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/CutTrk.cxx deleted file mode 100755 index 227103698ad8d6d8d8751b4e2916a3f745e38183..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/CutTrk.cxx +++ /dev/null @@ -1,44 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// Header include -#include "InDetVKalPriVxFinderTool/InDetVKalPriVxFinderTool.h" -//------------------------------------------------- -namespace InDet { - -StatusCode -InDetVKalPriVxFinderTool::CutTrk(double PInvVert, - double ThetaVert, - double A0Vert, - double Chi2, - long int PixelHits, - long int SctHits, - long int SharedHits, - long int BLayHits) const -{ - double Pt = sin(ThetaVert) / fabs(PInvVert); - //- Track quality - if (Pt < m_CutPt) - return StatusCode::FAILURE; - if (Chi2 > m_CutChi2) - return StatusCode::FAILURE; - if (fabs(A0Vert) > m_CutA0) - return StatusCode::FAILURE; - - if (PixelHits < m_CutPixelHits) - return StatusCode::FAILURE; - if (SctHits < m_CutSctHits) - return StatusCode::FAILURE; - if ((PixelHits + SctHits) < m_CutSiHits) - return StatusCode::FAILURE; - if (BLayHits < m_CutBLayHits) - return StatusCode::FAILURE; - if (SharedHits > m_CutSharedHits) - return StatusCode::FAILURE; - - return StatusCode::SUCCESS; - } - -} - diff --git a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/InDetVKalPriVxFinder.cxx b/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/InDetVKalPriVxFinder.cxx deleted file mode 100644 index e4eeaf33701411f3f9c5368356bdb127446258d4..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/InDetVKalPriVxFinder.cxx +++ /dev/null @@ -1,642 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -// Header include -#include "InDetVKalPriVxFinderTool/InDetVKalPriVxFinderTool.h" -//------------------------------------------------- -// Other stuff - -// -//---- -#include "TrkTrackLink/ITrackLink.h" -#include "TrkTrack/LinkToTrack.h" -#include "TrkParticleBase/LinkToTrackParticleBase.h" -#include "TrkTrackSummary/TrackSummary.h" -#include "VxVertex/VxTrackAtVertex.h" -#include "TrkEventPrimitives/FitQuality.h" -#include "TrkToolInterfaces/ITrackSummaryTool.h" -#include "TrkToolInterfaces/ITrackSelectorTool.h" -#include "xAODTracking/VertexContainer.h" -#include "xAODTracking/Vertex.h" -#include "xAODTracking/TrackParticle.h" -//---- - - - -namespace InDet { - - -InDetVKalPriVxFinderTool::InDetVKalPriVxFinderTool(const std::string& type, - const std::string& name, - const IInterface* parent): - AthAlgTool(type,name,parent), - - m_BeamPositionX(0.), - m_BeamPositionY(0.), - m_BeamConstraint(1), - m_TypeRobust(5), - m_RobustScale(1.), - - m_CutSctHits(5), - m_CutPixelHits(2), - m_CutSiHits(8), - m_CutBLayHits(0), - m_CutSharedHits(0), - m_CutPt(300.), - m_CutA0(1.0), - m_CutChi2(3.5), - - m_A0TrkErrorCut(1.0), - m_ZTrkErrorCut(5.0), - m_RImpSelCut(50.), - m_ZImpSelCut(50.), - m_RDistSelCut(1.0), - m_ZDistSelCut(3.5), - m_SignifSelCut(50.), - m_SecTrkChi2Cut(5.5), - m_WeightCut(0.2), - - m_NPVertexMax(100) - - { - declareInterface<IVertexFinder>(this); - declareProperty("BeamPositionX", m_BeamPositionX); - declareProperty("BeamPositionY", m_BeamPositionY); - declareProperty("BeamConstraint", m_BeamConstraint); - declareProperty("TypeRobust", m_TypeRobust); - declareProperty("RobustScale", m_RobustScale); - - declareProperty("CutSctHits", m_CutSctHits ); - declareProperty("CutPixelHits", m_CutPixelHits ); - declareProperty("CutSiHits", m_CutSiHits ); - declareProperty("CutBLayHits", m_CutBLayHits ); - declareProperty("CutSharedHits", m_CutSharedHits ); - declareProperty("CutPt", m_CutPt ); - declareProperty("CutA0", m_CutA0 ); - declareProperty("CutChi2", m_CutChi2 ); - - declareProperty("A0TrkErrorCut", m_A0TrkErrorCut ); - declareProperty("ZTrkErrorCut", m_ZTrkErrorCut ); - - declareProperty("RImpSelCut", m_RImpSelCut ); - declareProperty("ZImpSelCut", m_ZImpSelCut ); - declareProperty("RDistSelCut", m_RDistSelCut ); - declareProperty("ZDistSelCut", m_ZDistSelCut ); - declareProperty("SignifSelCut", m_SignifSelCut ); - - declareProperty("SecTrkChi2Cut", m_SecTrkChi2Cut ); - declareProperty("WeightCut", m_WeightCut ); - - declareProperty("NPVertexMax", m_NPVertexMax ); - - declareProperty("FitterTool", m_fitSvc ); - declareProperty("TrackSummaryTool", m_sumSvc ); - declareProperty("TrackSelectorTool", m_trkSelector); - - - } - - InDetVKalPriVxFinderTool::~InDetVKalPriVxFinderTool() - { //MsgStream log( msgSvc(), name() ) ; - //m_sc.isSuccess(); - if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<< "InDetVKalPriVxFinderTool destructor called" << endmsg; - } - - - -//__________________________________________________________________________ - StatusCode InDetVKalPriVxFinderTool::initialize() - { - if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<<"InDetVKalVrtPriVxTool initialize()" << endmsg; - m_SummaryToolExist = 0; - - - if (m_fitSvc.retrieve().isFailure()) { - if(msgLvl(MSG::ERROR))msg(MSG::ERROR) << "No Trk::TrkVKalVrtFitter for InDetVKalPriVxFinderTool !" << endmsg; - }else{ - if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) << "Trk::TrkVKalVrtFitter found" << endmsg; - } -// -//TrackSummaryTool -// - if (m_sumSvc.retrieve().isFailure()) { - if(msgLvl(MSG::ERROR))msg(MSG::ERROR) << "Could not find TrackSummaryTool" << endmsg; - } else { m_SummaryToolExist = 1;} -// -// Data for beam spot constraint -// - - ATH_CHECK(m_beamSpotKey.initialize(m_BeamConstraint)); - -// -//TrackSelectorTool -// - if (m_trkSelector.name() == "DefaultTrackSelection" ){ - m_trkSelectorExist=0; - if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Use internal track selection - see default/jobO cuts" << endmsg; - }else{ - if (m_trkSelector.retrieve().isFailure()) { - if(msgLvl(MSG::ERROR)){ msg(MSG::ERROR) << "Could not find TrackSelectorTool" << endmsg; - msg(MSG::ERROR) << "Use internal track selection - see default/jobO cuts" << endmsg;} - m_trkSelectorExist=0; - }else{ - if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Finder uses TrackSelectorTool" << endmsg; - m_trkSelectorExist=1; - } - } - - return StatusCode::SUCCESS; - } - - - -//__________________________________________________________________________ - - - StatusCode InDetVKalPriVxFinderTool::finalize() - { - if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) <<"InDetVKalPriVxFinderTool finalize()" << endmsg; - return StatusCode::SUCCESS; - } - - std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> - InDetVKalPriVxFinderTool::findVertex ( - const xAOD::TrackParticleContainer* trackTES) const - { - if (msgLvl(MSG::DEBUG)) { - msg(MSG::DEBUG) << "N=" << trackTES->size() - << " xAOD::TrackParticles found" << endmsg; - msg(MSG::DEBUG) - << "No InDetVKalPriVxFinderTool implementation for xAOD::TrackParticle" - << endmsg; - } - return std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>(0, 0); - } - - -//__________________________________________________________________________ - std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> - InDetVKalPriVxFinderTool::findVertex(const TrackCollection* trackTES) const - { - //............................................. - - if (msgLvl(MSG::DEBUG)) - msg(MSG::DEBUG) << "Primary vertex with InDetVKalPriVxFinderTool starts" - << endmsg; - // - // - Cache cache{}; - cache.m_BeamCnst[0] = m_BeamPositionX; - cache.m_BeamCnst[1] = m_BeamPositionY; - cache.m_BeamCnst[2] = 0.; - cache.m_BeamCnstWid.resize(3); - cache.m_BeamCnstWid[0] = 0.015; - cache.m_BeamCnstWid[1] = 0.015; - cache.m_BeamCnstWid[2] = 56.; - cache.m_savedTrkFittedPerigees.clear(); - cache.m_fittedTrkCov.clear(); - //------------------------------------------------------------------------------------------ - // Creating the necessary vectors - - std::vector<const Trk::Track*> SelectedTrkTracks; - std::vector<const Trk::TrackParticleBase*> SelectedTrackParticles; - std::vector<Amg::Vector3D> PrimVrtList; - std::vector<AmgSymMatrix(3)> ErrorMatrixPerVrt; - std::vector<double> Chi2PerVrt; - std::vector<double> ControlVariablePerVrt; - std::vector<std::vector<const Trk::Track*>> TrkPerVrt; - std::vector<std::vector<const Trk::TrackParticleBase*>> PrtPerVrt; - std::vector<std::vector<double>> TrkWgtPerVrt; - std::vector<int> NTrkPerVrt; - // - int NFoundVrt = 0; - SelectedTrkTracks.clear(); - SelectedTrackParticles.clear(); - NTrkPerVrt.clear(); - TrkPerVrt.clear(); - PrtPerVrt.clear(); - - const Trk::Perigee* mPer = NULL; - AmgVector(5) VectPerig; - VectPerig << 0., 0., 0., 0., 0.; - const Trk::FitQuality* TrkQual = 0; - std::vector<double> Impact, ImpactError; - - // - // Now we start a work. - // - const DataVector<Trk::Track>* newTrkCol = trackTES; - - if (m_BeamConstraint) { - SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle{ m_beamSpotKey }; - if (beamSpotHandle.isValid()) { - const Amg::Vector3D &beam=beamSpotHandle->beamPos(); - cache.m_BeamCnst[0]=beam.x(); - cache.m_BeamCnst[1]=beam.y(); - cache.m_BeamCnst[2]=beam.z(); - cache.m_BeamCnstWid[0]=beamSpotHandle->beamSigma(0); - cache.m_BeamCnstWid[1]=beamSpotHandle->beamSigma(1); - if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) << "BeamSpot from SVC="<<cache.m_BeamCnst[0]<<", "<<cache.m_BeamCnst[1]<< - ", "<<cache.m_BeamCnst[2]<<" wid="<<cache.m_BeamCnstWid[0]<<", "<<cache.m_BeamCnstWid[1]<<endmsg; - if(msgLvl(MSG::DEBUG) && cache.m_BeamCnst[2]!=0.)msg(MSG::DEBUG) << "BeamSpot Z must be 0 in finder!!! Make Z=0."<<endmsg; - cache.m_BeamCnst[2]=0.; - } - }else{ - Amg::Vector3D approx_beam=findIniXY(newTrkCol); - cache.m_BeamCnst[0]=approx_beam.x(); - cache.m_BeamCnst[1]=approx_beam.y(); - cache.m_BeamCnst[2]=0.; - if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) << "Approx. BeamSpot="<<cache.m_BeamCnst[0]<<", "<<cache.m_BeamCnst[1]<<endmsg; - } - Trk::Vertex selectionVertex(cache.m_BeamCnst); - - if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) << "Trk::Track number=" <<newTrkCol->size()<< endmsg; - DataVector<Trk::Track>::const_iterator i_ntrk; - for (i_ntrk = newTrkCol->begin(); i_ntrk < newTrkCol->end(); ++i_ntrk) { - TrkQual = (*i_ntrk)->fitQuality(); - mPer=GetPerigee( (*i_ntrk) ) ; - if( mPer == NULL ){ - if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) <<" Error!!! No Perigee in TrackParameters"<< endmsg; - continue; - } - VectPerig = mPer->parameters(); - double CovTrkMtx11 = (*(mPer->covariance()))(0,0); - double CovTrkMtx22 = (*(mPer->covariance()))(1,1); - if ( CovTrkMtx11 > m_A0TrkErrorCut*m_A0TrkErrorCut ) continue; - if ( CovTrkMtx22 > m_ZTrkErrorCut*m_ZTrkErrorCut ) continue; - if( m_trkSelectorExist ) { - if(!m_trkSelector->decision(**i_ntrk,&selectionVertex)) continue; - }else{ -//--------------------------------------------------------- - long int PixelHits = 3, SctHits = 9, SharedHits = 0, BLayHits = 1; - if(m_SummaryToolExist) { - const Trk::TrackSummary* testSum = m_sumSvc->createSummary(*(*i_ntrk)); - PixelHits = (long int) testSum->get(Trk::numberOfPixelHits); - SctHits = (long int) testSum->get(Trk::numberOfSCTHits); - BLayHits = (long int) testSum->get(Trk::numberOfInnermostPixelLayerHits); - SharedHits= (long int) testSum->get(Trk::numberOfPixelSharedHits); - if(PixelHits<0)PixelHits=0; - if(SctHits<0)SctHits=0; - if(BLayHits<0)BLayHits=0; - delete testSum; - } -//--------------------------------------------------------- - //double ImpactSignif = m_fitSvc->VKalGetImpact((*i_ntrk), cache.m_BeamCnst, 1, Impact, ImpactError); //VK ImpactSignif not needed - m_fitSvc->VKalGetImpact((*i_ntrk), cache.m_BeamCnst, 1, Impact, ImpactError); - double ImpactA0=VectPerig[0]; //double ImpactZ=VectPerig[1]; // Temporary - ImpactA0=Impact[0]; //ImpactZ=Impact[1]; - - StatusCode sc = CutTrk( VectPerig[4] , VectPerig[3] , ImpactA0 , - TrkQual->chiSquared() / TrkQual->numberDoF(), - PixelHits, SctHits, SharedHits, BLayHits); - if( sc == StatusCode::FAILURE ) continue; - } - SelectedTrkTracks.push_back(*i_ntrk); - } - if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) << " Found="<<SelectedTrkTracks.size()<<" tracks" <<endmsg; - if(SelectedTrkTracks.size()<2){ - SelectedTrkTracks.clear(); - for (i_ntrk = newTrkCol->begin(); i_ntrk < newTrkCol->end(); ++i_ntrk) { - TrkQual = (*i_ntrk)->fitQuality(); - mPer=GetPerigee( (*i_ntrk) ) ; if( mPer == NULL ) continue; - VectPerig = mPer->parameters(); - double CovTrkMtx11 = (*(mPer->covariance()))(0,0); - double CovTrkMtx22 = (*(mPer->covariance()))(1,1); - if ( CovTrkMtx11 > 4.*m_A0TrkErrorCut*m_A0TrkErrorCut ) continue; - if ( CovTrkMtx22 > 4.*m_ZTrkErrorCut*m_ZTrkErrorCut ) continue; - -//--------------------------------------------------------- - long int PixelHits = 3, SctHits = 9, SharedHits = 0, BLayHits = 1; - if(m_SummaryToolExist) { - const Trk::TrackSummary* testSum = m_sumSvc->createSummary(*(*i_ntrk)); - PixelHits = (long int) testSum->get(Trk::numberOfPixelHits); - SctHits = (long int) testSum->get(Trk::numberOfSCTHits); - BLayHits = (long int) testSum->get(Trk::numberOfInnermostPixelLayerHits); - SharedHits= (long int) testSum->get(Trk::numberOfPixelSharedHits); - if(PixelHits<0)PixelHits=0; - if(SctHits<0)SctHits=0; - if(BLayHits<0)BLayHits=0; - delete testSum; - } -//--------------------------------------------------------- - if(SharedHits>0) SharedHits--; - BLayHits++; - PixelHits++; - m_fitSvc->VKalGetImpact((*i_ntrk), cache.m_BeamCnst, 1, Impact, ImpactError); - double ImpactA0=Impact[0]; - StatusCode sc = CutTrk( VectPerig[4] , VectPerig[3] , ImpactA0 , - TrkQual->chiSquared() / TrkQual->numberDoF(), - PixelHits, SctHits, SharedHits, BLayHits); - if( sc == StatusCode::FAILURE ) continue; -// } - SelectedTrkTracks.push_back(*i_ntrk); - } - if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) << " Found relaxed="<<SelectedTrkTracks.size()<<" tracks" <<endmsg; - } - /* And now primary vertex search itself*/ -// -// Cleaning -// - UniqList(SelectedTrkTracks); - /* And now primary vertex search itself*/ - - NFoundVrt = PVrtListFind(cache, - SelectedTrackParticles, - SelectedTrkTracks, - PrimVrtList, - ErrorMatrixPerVrt, - Chi2PerVrt, - ControlVariablePerVrt, - PrtPerVrt, - TrkPerVrt, - TrkWgtPerVrt); - - for (int i=0; i<NFoundVrt; i++) NTrkPerVrt.push_back((int)TrkPerVrt[i].size()); - - -//-------------------------------------------------------------------- - - if( NFoundVrt == 0){ - if(msgLvl(MSG::ERROR))msg(MSG::ERROR) << "Primary vertex not found" <<endmsg; - }else{ - if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<<"VKalVrtCpp Primary Vertex=" << PrimVrtList[0].x()<<", "<< - PrimVrtList[0].y()<<", "<<PrimVrtList[0].z()<< endmsg; - } -//------------------------------------------------------------------------------- -// -//---- Save vertices -// - return SaveResults(cache, - NFoundVrt, - PrimVrtList, - ErrorMatrixPerVrt, - Chi2PerVrt, - NTrkPerVrt, - PrtPerVrt, - TrkPerVrt, - TrkWgtPerVrt, - trackTES); - } - - -//__________________________________________________________________________ - - std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> - InDetVKalPriVxFinderTool::findVertex( - const Trk::TrackParticleBaseCollection* newPrtCol) const - { - //............................................. - - if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) << "Primary vertex with InDetVKalPriVxFinderTool starts" << endmsg; -// -// - Cache cache{}; - cache.m_BeamCnst[0] = m_BeamPositionX; - cache.m_BeamCnst[1] = m_BeamPositionY; - cache.m_BeamCnst[2] = 0.; - cache.m_BeamCnstWid.resize(3); - cache.m_BeamCnstWid[0] = 0.015; - cache.m_BeamCnstWid[1] = 0.015; - cache.m_BeamCnstWid[2] = 56.; - cache.m_savedTrkFittedPerigees.clear(); - cache.m_fittedTrkCov.clear(); -//------------------------------------------------------------------------------------------ -// Creating the necessary vectors - - std::vector<const Trk::Track*> SelectedTrkTracks; - std::vector<const Trk::TrackParticleBase*> SelectedTrackParticles; - std::vector<Amg::Vector3D> PrimVrtList; - std::vector< AmgSymMatrix(3) > ErrorMatrixPerVrt; - std::vector<double> Chi2PerVrt; - std::vector<double> ControlVariablePerVrt; - std::vector< std::vector<const Trk::Track*> > TrkPerVrt; - std::vector< std::vector<const Trk::TrackParticleBase*> > PrtPerVrt; - std::vector< std::vector<double> > TrkWgtPerVrt; - std::vector<int> NTrkPerVrt; -// - int NFoundVrt=0; - SelectedTrkTracks.clear(); SelectedTrackParticles.clear(); NTrkPerVrt.clear(); - TrkPerVrt.clear(); PrtPerVrt.clear(); - - const Trk::Perigee* mPer=NULL; - AmgVector(5) VectPerig; VectPerig<<0.,0.,0.,0.,0.; - const Trk::FitQuality* TrkQual=0; - std::vector<double> Impact,ImpactError; - - if(m_BeamConstraint){ - SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle { m_beamSpotKey }; - if(beamSpotHandle.isValid()){ - const Amg::Vector3D &beam=beamSpotHandle->beamPos(); - cache.m_BeamCnst[0]=beam.x(); - cache.m_BeamCnst[1]=beam.y(); - cache.m_BeamCnst[2]=beam.z(); - cache.m_BeamCnstWid[0]=beamSpotHandle->beamSigma(0); - cache.m_BeamCnstWid[1]=beamSpotHandle->beamSigma(1); - if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) << "BeamSpot from SVC="<<cache.m_BeamCnst[0]<<", "<<cache.m_BeamCnst[1]<< - ", "<<cache.m_BeamCnst[2]<<" wid="<<cache.m_BeamCnstWid[0]<<", "<<cache.m_BeamCnstWid[1]<<endmsg; - } - }else{ - Amg::Vector3D approx_beam=findIniXY(newPrtCol); - cache.m_BeamCnst[0]=approx_beam.x(); - cache.m_BeamCnst[1]=approx_beam.y(); - cache.m_BeamCnst[2]=0.; - if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) << "Approx. BeamSpot="<<cache.m_BeamCnst[0]<<", "<<cache.m_BeamCnst[1]<<endmsg; - } - Trk::Vertex selectionVertex(cache.m_BeamCnst); - - if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) << "Trk::TrackParticleBase number=" <<newPrtCol->size()<< endmsg; - Trk::TrackParticleBaseCollection::const_iterator i_nprt = newPrtCol->begin(); - for (i_nprt = newPrtCol->begin(); i_nprt < newPrtCol->end(); ++i_nprt) { - mPer=GetPerigee( (*i_nprt) ); if( mPer == NULL ){ continue; } - VectPerig = mPer->parameters(); - TrkQual = (*i_nprt)->fitQuality(); - double CovTrkMtx11 = (*(mPer->covariance()))(0,0); - double CovTrkMtx22 = (*(mPer->covariance()))(2,2); - if ( CovTrkMtx11 > m_A0TrkErrorCut*m_A0TrkErrorCut ) continue; - if ( CovTrkMtx22 > m_ZTrkErrorCut*m_ZTrkErrorCut ) continue; - if( m_trkSelectorExist ) { - if(!m_trkSelector->decision(**i_nprt,&selectionVertex)) continue; - }else{ -//----------------------------------- Summary tools - long int PixelHits = 3, SctHits = 9, SharedHits = 0, BLayHits = 1; - const Trk::TrackSummary* testSum = (*i_nprt)->trackSummary(); - PixelHits = (long int) testSum->get(Trk::numberOfPixelHits); - SctHits = (long int) testSum->get(Trk::numberOfSCTHits); - BLayHits = (long int) testSum->get(Trk::numberOfInnermostPixelLayerHits); - SharedHits= (long int) testSum->get(Trk::numberOfPixelSharedHits); - if(PixelHits<0)PixelHits=0; - if(SctHits<0)SctHits=0; - if(BLayHits<0)BLayHits=0; - m_fitSvc->VKalGetImpact((*i_nprt), cache.m_BeamCnst, 1, Impact, ImpactError); - double ImpactA0=VectPerig[0]; //double ImpactZ=VectPerig[1]; // Temporary - ImpactA0=Impact[0]; //ImpactZ=Impact[1]; - - StatusCode sc = CutTrk( VectPerig[4] , VectPerig[3] , ImpactA0 , - TrkQual->chiSquared() / TrkQual->numberDoF(), - PixelHits, SctHits, SharedHits, BLayHits); - if( sc == StatusCode::FAILURE ) continue; - } - SelectedTrackParticles.push_back(*i_nprt); - } - - if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) << " Found="<<SelectedTrackParticles.size()<<" particles" <<endmsg; - /* And now primary vertex search itself*/ - if(SelectedTrackParticles.size()<2){ - SelectedTrackParticles.clear(); - for (i_nprt = newPrtCol->begin(); i_nprt < newPrtCol->end(); ++i_nprt) { - mPer=GetPerigee( (*i_nprt) ); if( mPer == NULL ){ continue; } - VectPerig = mPer->parameters(); TrkQual = (*i_nprt)->fitQuality(); - double CovTrkMtx11 = (*(mPer->covariance()))(1,1); - double CovTrkMtx22 = (*(mPer->covariance()))(2,2); - if ( CovTrkMtx11 > 4.*m_A0TrkErrorCut*m_A0TrkErrorCut ) continue; - if ( CovTrkMtx22 > 4.*m_ZTrkErrorCut*m_ZTrkErrorCut ) continue; - - long int PixelHits = 3, SctHits = 9, SharedHits = 0, BLayHits = 1; - const Trk::TrackSummary* testSum = (*i_nprt)->trackSummary(); - PixelHits = (long int) testSum->get(Trk::numberOfPixelHits); - SctHits = (long int) testSum->get(Trk::numberOfSCTHits); - BLayHits = (long int) testSum->get(Trk::numberOfInnermostPixelLayerHits); - SharedHits= (long int) testSum->get(Trk::numberOfPixelSharedHits); - if(PixelHits<0)PixelHits=0; - if(SctHits<0)SctHits=0; - if(BLayHits<0)BLayHits=0; - if(SharedHits>0) SharedHits--; - BLayHits++; - PixelHits++; - m_fitSvc->VKalGetImpact((*i_nprt), cache.m_BeamCnst, 1, Impact, ImpactError); - double ImpactA0=Impact[0]; - StatusCode sc = CutTrk( VectPerig[4] , VectPerig[3] , ImpactA0 , - TrkQual->chiSquared() / TrkQual->numberDoF(), - PixelHits, SctHits, SharedHits, BLayHits); - if( sc == StatusCode::FAILURE ) continue; -// } - SelectedTrackParticles.push_back(*i_nprt); - } - if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<< " Found relaxed="<<SelectedTrackParticles.size()<<" particles" <<endmsg; - /* And now primary vertex search itself*/ - } -//--- Cleaning -// - UniqList(SelectedTrackParticles); - /* And now primary vertex search itself*/ - - NFoundVrt = PVrtListFind(cache, - SelectedTrackParticles, - SelectedTrkTracks, - PrimVrtList, - ErrorMatrixPerVrt, - Chi2PerVrt, - ControlVariablePerVrt, - PrtPerVrt, - TrkPerVrt, - TrkWgtPerVrt); - for (int i=0; i<NFoundVrt; i++) NTrkPerVrt.push_back((int) PrtPerVrt[i].size()); - - -//-------------------------------------------------------------------- - - if( NFoundVrt == 0){ - if(msgLvl(MSG::ERROR))msg(MSG::ERROR) << "Primary vertex not found" <<endmsg; - }else{ - if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<<"Found Primary Vertex=" << PrimVrtList[0].x()<<", "<< - PrimVrtList[0].y()<<", "<<PrimVrtList[0].z()<< endmsg; - } -//------------------------------------------------------------------------------- -// -//---- Save vertices -// - return SaveResults(cache, - NFoundVrt, - PrimVrtList, - ErrorMatrixPerVrt, - Chi2PerVrt, - NTrkPerVrt, - PrtPerVrt, - TrkPerVrt, - TrkWgtPerVrt, - 0, - newPrtCol); - } - - - - std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> - InDetVKalPriVxFinderTool::SaveResults(Cache& cache, - int NFoundVrt, - std::vector< Amg::Vector3D > & PrimVrtList, - std::vector< AmgSymMatrix(3) > & ErrorMatrixPerVrt, - std::vector<double> & Chi2PerVrt, - std::vector<int> & NTrkPerVrt, - std::vector< std::vector<const Trk::TrackParticleBase*> > & PrtPerVrt, - std::vector< std::vector<const Trk::Track*> > & TrkPerVrt, - std::vector< std::vector<double> > & TrkWgtPerVrt, - const TrackCollection* trackTES, - const Trk::TrackParticleBaseCollection* partTES) const{ - - xAOD::VertexContainer * vrtCont = new xAOD::VertexContainer; - xAOD::VertexAuxContainer *vrtAuxCont = new xAOD::VertexAuxContainer; - vrtCont->setStore(vrtAuxCont); - int i,ii; - for( i=0; i< NFoundVrt; i++){ - if(PrimVrtList.size()>1 && NTrkPerVrt[i]==2){ - if( Chi2PerVrt[i]>12. ) continue; //Drop 2tr vertex with low probability - if( i==0 && NTrkPerVrt[1]>3 ) continue; //Drop 2tr first vertex if second is better - } - xAOD::Vertex * tmpVertex=new xAOD::Vertex(); - tmpVertex->setPosition(PrimVrtList[i]); - tmpVertex->setCovariancePosition(ErrorMatrixPerVrt[i]); - tmpVertex->setFitQuality(Chi2PerVrt[i], (float)(NTrkPerVrt[i]*2.-3.)); - std::vector<Trk::VxTrackAtVertex> & tmpVTAV=tmpVertex->vxTrackAtVertex(); - tmpVTAV.clear(); - for(ii=0; ii<NTrkPerVrt[i]; ii++) { - AmgSymMatrix(5) * tmpCovMatr=new AmgSymMatrix(5)(cache.m_fittedTrkCov.at(i).at(ii)); - Trk::Perigee * tmpMeasPer = new Trk::Perigee( 0.,0., - cache.m_savedTrkFittedPerigees[i][ii][0] , /* Phi */ - cache.m_savedTrkFittedPerigees[i][ii][1] , /* Theta */ - cache.m_savedTrkFittedPerigees[i][ii][2] , /* 1/p */ - Trk::PerigeeSurface(PrimVrtList[i]), - tmpCovMatr ); - Trk::VxTrackAtVertex * tmpPointer = new Trk::VxTrackAtVertex( 1., tmpMeasPer ) ; - if( not TrkPerVrt.empty()){ - ElementLink<TrackCollection> TEL; - TEL.setElement(TrkPerVrt[i][ii]); - Trk::LinkToTrack *ITL = new Trk::LinkToTrack(TEL); //pointer to initial Trk - ITL->setStorableObject( *trackTES ); - tmpPointer->setOrigTrack(ITL); //pointer to initial Trk - }else{ - ElementLink<Trk::TrackParticleBaseCollection> TEL; TEL.setElement(PrtPerVrt[i][ii]); - Trk::LinkToTrackParticleBase *ITL = new Trk::LinkToTrackParticleBase(TEL); //pointer to initial Prt - ITL->setStorableObject( *partTES ); - tmpPointer->setOrigTrack(ITL); //pointer to initial Prt - } - tmpPointer->setWeight(TrkWgtPerVrt[i][ii]); - tmpVTAV.push_back( *tmpPointer ); - delete tmpPointer; - } - // - //-Save to container - // - vrtCont->push_back(tmpVertex); - } - // - //-Defense against 0 found vertices - // - if( NFoundVrt == 0 ){ - xAOD::Vertex * tmpVertex=new xAOD::Vertex(); - tmpVertex->setPosition(Amg::Vector3D(0.,0.,0.)); - vrtCont->push_back(tmpVertex); - } - // - //-Remove refitted track parameters from HEAP - // - for( i=0; i< NFoundVrt; i++){ - double** pntTracks=cache.m_savedTrkFittedPerigees[i]; - removeWorkArr2(pntTracks,(long int)NTrkPerVrt[i],3); - } - cache.m_savedTrkFittedPerigees.clear(); - cache.m_fittedTrkCov.clear(); - return std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> (vrtCont,vrtAuxCont); - } - -} // end of namespace bracket diff --git a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/PVrtFind.cxx b/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/PVrtFind.cxx deleted file mode 100755 index 58fb66b56ceb0e3a9edea18b496dd9311e87d4a7..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/PVrtFind.cxx +++ /dev/null @@ -1,210 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// Header include -#include "InDetVKalPriVxFinderTool/InDetVKalPriVxFinderTool.h" -//------------------------------------------------- -// Other stuff -#include<iostream> - - -// -//-------------------------------------------------------- -// Routine for global secondary vertex fitting -// -namespace InDet { - -int -InDetVKalPriVxFinderTool::PVrtListFind( - Cache& cache, - std::vector<const Trk::TrackParticleBase*>& ListParticles, - std::vector<const Trk::Track*>& ListTracks, - std::vector<Amg::Vector3D>& PVrtList, - std::vector<AmgSymMatrix(3)>& ErrorMatrixPerVrt, - std::vector<double>& Chi2PerVrt, - std::vector<double>& ControlVariablePerVrt, - std::vector<std::vector<const Trk::TrackParticleBase*>>& PrtPerVrt, - std::vector<std::vector<const Trk::Track*>>& TrkPerVrt, - std::vector<std::vector<double>>& TrkWgtPerVrt) const -{ - if (msgLvl(MSG::DEBUG)) - msg(MSG::DEBUG) << "Primary Vertex Finder called " << endmsg; - - // Select track type for vertex finding. - - int Selector = 2; // Initial choice - int NTracksVrt = 0; - if (ListParticles.size() == 0 && ListTracks.size() == 0) { - return 0; - } - if (ListParticles.size() != 0 && ListTracks.size() == 0) { - Selector = 1; - NTracksVrt = ListParticles.size(); - } - if (ListParticles.size() == 0 && ListTracks.size() != 0) { - Selector = 2; - NTracksVrt = ListTracks.size(); - } - if (NTracksVrt == 0) - return 0; - if (NTracksVrt == 1 && !m_BeamConstraint) - return 0; - if (Selector == 1 && msgLvl(MSG::DEBUG)) - msg(MSG::DEBUG) << " Trk::TrackParticlesBase are used for vertex search!!!=" - << NTracksVrt << endmsg; - if (Selector == 2 && msgLvl(MSG::DEBUG)) - msg(MSG::DEBUG) << " Trk::Tracks are used for vertex search!!!=" - << NTracksVrt << endmsg; - // - int NFoundVertices = 0; - std::vector<const Trk::TrackParticleBase*> SelectedParticles; - std::vector<const Trk::Track*> SelectedTracks; - - PVrtList.clear(); - ErrorMatrixPerVrt.clear(); - Chi2PerVrt.clear(); - ControlVariablePerVrt.clear(); - TrkPerVrt.clear(); - PrtPerVrt.clear(); - TrkWgtPerVrt.clear(); - // - // Fit preparation - // - double ZStartFit = 0., ControlVariable, Chi2; - std::vector<double> VertexErrorMatrix; - std::vector<double> TrkWeights; - AmgSymMatrix(3) CovMtx; - Amg::Vector3D FitVertex(0., 0., 0.); - - // - // Start of fit - // - - while (1) { - if (Selector == 1) - ZStartFit = FindZPosTrk(cache,ListParticles, ControlVariable); - if (Selector == 2) - ZStartFit = FindZPosTrk(cache,ListTracks, ControlVariable); - if (msgLvl(MSG::DEBUG)) - msg(MSG::DEBUG) << " Z pos estimation= " << ZStartFit - << " for vertex=" << NFoundVertices << endmsg; - if (ZStartFit < -10000.) - return NFoundVertices; // No more candidates - if (NFoundVertices > m_NPVertexMax) - return NFoundVertices; // Too many candidates - Amg::Vector3D IniVertex(cache.m_BeamCnst[0], cache.m_BeamCnst[1], ZStartFit); - // - // track selection for given vertex candidates - // - inpSelector( - ListParticles, ListTracks, IniVertex, SelectedParticles, SelectedTracks); - // - if (Selector == 1) { - if (SelectedParticles.size() == 0) - break; // 0 tracks selected for fit. Break. - if (SelectedParticles.size() < 2 && NFoundVertices > 0) - break; // One vertex is found already. Break. - if (SelectedParticles.size() == 1 && (!m_BeamConstraint)) - break; // 1 track selected for fit. Break. - // VK now after fit RemoveUsedEntry(ListParticles,SelectedParticles); - } - if (Selector == 2) { - if (SelectedTracks.size() == 0) - break; // 0 tracks selected for fit. Break. - if (SelectedTracks.size() < 2 && NFoundVertices > 0) - break; // One vertex is found already. Break. - if (SelectedTracks.size() == 1 && (!m_BeamConstraint)) - break; // 1 track selected for fit. Break. - // VK now after fit RemoveUsedEntry(ListTracks,SelectedTracks); - } - - // Now common vertex fit. Also saves results for current vertex, so each - // vertex may be fitted only ONCE!!! - - Chi2 = FitCommonVrt(cache, - SelectedParticles, - SelectedTracks, - ZStartFit, - FitVertex, - VertexErrorMatrix, - TrkWeights); - // if( Chi2 < 0.) break; //Bad fit. Break vertex search - // !!VK 6.02.2008 Wrong!!! - if (Chi2 > 0.) { - int NTrkInVrt = 0; - if (Selector == 1) - NTrkInVrt = SelectedParticles.size(); - if (Selector == 2) - NTrkInVrt = SelectedTracks.size(); - if (fabs(FitVertex.z() - IniVertex.z()) > m_ZDistSelCut / 2. && - NTrkInVrt > 4) { - ZStartFit = FitVertex.z(); - IniVertex << FitVertex.x(), FitVertex.y(), FitVertex.z(); - int lastVrt = cache.m_savedTrkFittedPerigees.size() - 1; - removeWorkArr2(cache.m_savedTrkFittedPerigees[lastVrt], - NTrkInVrt, - 3); // Remove previous fit results - cache.m_savedTrkFittedPerigees.pop_back(); - cache.m_fittedTrkCov.pop_back(); // Remove previous fit results!!!See above - inpSelector(ListParticles, - ListTracks, - IniVertex, - SelectedParticles, - SelectedTracks); - Chi2 = FitCommonVrt(cache, - SelectedParticles, - SelectedTracks, - ZStartFit, - FitVertex, - VertexErrorMatrix, - TrkWeights); - if (Chi2 > 0) { - if (Selector == 1) - NTrkInVrt = SelectedParticles.size(); - if (Selector == 2) - NTrkInVrt = SelectedTracks.size(); - } else { - NTrkInVrt = 0; - } - } - if (NTrkInVrt && (NTrkInVrt > 1 || NFoundVertices == 0)) { - NFoundVertices++; - Chi2PerVrt.push_back(Chi2); - ControlVariablePerVrt.push_back(ControlVariable); - PVrtList.push_back(FitVertex); - if (Selector == 1) - PrtPerVrt.push_back(SelectedParticles); - if (Selector == 2) - TrkPerVrt.push_back(SelectedTracks); - TrkWgtPerVrt.push_back(TrkWeights); - // - CovMtx(0, 0) = VertexErrorMatrix[0]; - CovMtx(1, 0) = CovMtx(0, 1) = VertexErrorMatrix[1]; - CovMtx(1, 1) = VertexErrorMatrix[2]; - CovMtx(2, 0) = CovMtx(0, 2) = VertexErrorMatrix[3]; - CovMtx(2, 1) = CovMtx(1, 2) = VertexErrorMatrix[4]; - CovMtx(2, 2) = VertexErrorMatrix[5]; - ErrorMatrixPerVrt.push_back(CovMtx); - } - } - // - // VK now only tracks attached to vertex are excluded (with weight > - // m_WeightCut) - - if (Selector == 1) { - RemoveUsedEntry(ListParticles, SelectedParticles, TrkWeights); - } - if (Selector == 2) { - RemoveUsedEntry(ListTracks, SelectedTracks, TrkWeights); - } - if (Selector == 1 && ListParticles.size() < 2) - break; // Less than 2 tracks left - if (Selector == 2 && ListTracks.size() < 2) - break; // Less than 2 tracks left - - } // Next beam vertex - - return NFoundVertices; -} -} diff --git a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/PVrtFit.cxx b/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/PVrtFit.cxx deleted file mode 100755 index c83c186756a8e1ada522f70a0d034ed0251487c9..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/PVrtFit.cxx +++ /dev/null @@ -1,542 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -// Header include -#include "InDetVKalPriVxFinderTool/InDetVKalPriVxFinderTool.h" -//------------------------------------------------- -// Other stuff -#include "TMath.h" -#include <cmath> -// - - -// -//-------------------------------------------------------- -// Routine for global secondary vertex fitting -// -namespace InDet { - -void -InDetVKalPriVxFinderTool::CleanTrkSet( - Cache& cache, - std::vector<const Trk::TrackParticleBase*>& ListParticles, - std::vector<const Trk::Track*>& ListTracks, - Amg::Vector3D& FitVertex, - std::vector<double>& Chi2PerTrk, - std::vector<const Trk::TrackParticleBase*>& badPart, - std::vector<const Trk::Track*>& badTrk) const -{ - int Selector = 2; // Initial choice - int NTracksVrt = 0; - badPart.clear(); - badTrk.clear(); - const bool particlesExist{ !ListParticles.empty() }; - const bool tracksExist{ !ListTracks.empty() }; - if ((not particlesExist) and (not tracksExist)) - return; - if (particlesExist and (not tracksExist)) { - Selector = 1; - NTracksVrt = ListParticles.size(); - } - if ((not particlesExist) and tracksExist) { - Selector = 2; - NTracksVrt = ListTracks.size(); - } - if (msgLvl(MSG::DEBUG)) - msg(MSG::DEBUG) << "CleanTrkSet() called. Total tracks= " << NTracksVrt - << endmsg; - if (NTracksVrt < 10) - return; // nothing to do - // - // - // Cleaning - // - int it, jt; - std::vector<int> setOfBadTrk; - std::vector<const Trk::TrackParticleBase*> ListP(2); - std::vector<const Trk::Track*> ListT(2); - std::vector<double> trkChi2, ErrorMatrix; - std::vector<std::vector<double>> tmpAtV; - Amg::Vector3D tmpFV; - double tmpChi2; - std::unique_ptr<Trk::IVKalState> state = m_fitSvc->makeState(); - for (it = 0; it < NTracksVrt - 1; it++) { - if (Chi2PerTrk[it] < 2.) - continue; - for (jt = it + 1; jt < NTracksVrt; jt++) { - if (Chi2PerTrk[jt] < 2.) - continue; - if (Chi2PerTrk[it] + Chi2PerTrk[jt] < 10.) - continue; // too close pair - if (Selector == 1) { - ListP[0] = ListParticles[it]; - ListP[1] = ListParticles[jt]; - cache.m_sc = m_fitSvc->VKalVrtFit(ListP, - tmpFV, - cache.m_Momentum, - cache.m_Charge, - ErrorMatrix, - trkChi2, - tmpAtV, - tmpChi2, - *state); - } - if (Selector == 2) { - ListT[0] = ListTracks[it]; - ListT[1] = ListTracks[jt]; - cache.m_sc = m_fitSvc->VKalVrtFit(ListT, - tmpFV, - cache.m_Momentum, - cache.m_Charge, - ErrorMatrix, - trkChi2, - tmpAtV, - tmpChi2, - *state); - } - if (tmpChi2 < 1.0) { // Good pair away from primary vertex found - double direction = (tmpFV.x() - FitVertex.x()) * cache.m_Momentum.Px() + - +(tmpFV.y() - FitVertex.y()) * cache.m_Momentum.Py() + - +(tmpFV.z() - FitVertex.z()) * cache.m_Momentum.Pz(); - double det = - ErrorMatrix[0] * ErrorMatrix[2] - ErrorMatrix[1] * ErrorMatrix[1]; - double wgt11 = ErrorMatrix[2] / det; - double wgt22 = ErrorMatrix[0] / det; - double wgt12 = -ErrorMatrix[1] / det; - double distR = sqrt( - (tmpFV.x() - FitVertex.x()) * (tmpFV.x() - FitVertex.x()) * wgt11 + - (tmpFV.y() - FitVertex.y()) * (tmpFV.y() - FitVertex.y()) * wgt22 + - 2. * (tmpFV.x() - FitVertex.x()) * (tmpFV.y() - FitVertex.y()) * - wgt12); - double distZ = fabs(tmpFV.z() - FitVertex.z()) / sqrt(ErrorMatrix[5]); - if (distR < 6.0) - continue; - if (direction < 0) - continue; - if (distZ < 4.0) - continue; - - setOfBadTrk.push_back(it); - setOfBadTrk.push_back(jt); - } - } - } - m_fitSvc->setVertexForConstraint( - cache.m_BeamCnst[0], cache.m_BeamCnst[1], FitVertex.z(), *state); - m_fitSvc->setCovVrtForConstraint(cache.m_BeamCnstWid[0] * cache.m_BeamCnstWid[0], - 0., - cache.m_BeamCnstWid[1] * cache.m_BeamCnstWid[1], - 0., - 0., - 56. * 56., - *state); - m_fitSvc->setCnstType(6, *state); - ListP.resize(1); - ListT.resize(1); - for (it = 0; it < NTracksVrt; it++) { - if (Chi2PerTrk[it] < 4.) - continue; - if (Selector == 1) { - ListP[0] = ListParticles[it]; - cache.m_sc = m_fitSvc->VKalVrtFit(ListP, - tmpFV, - cache.m_Momentum, - cache.m_Charge, - ErrorMatrix, - trkChi2, - tmpAtV, - tmpChi2, - *state); - } - if (Selector == 2) { - ListT[0] = ListTracks[it]; - cache.m_sc = m_fitSvc->VKalVrtFit(ListT, - tmpFV, - cache.m_Momentum, - cache.m_Charge, - ErrorMatrix, - trkChi2, - tmpAtV, - tmpChi2, - *state); - } - if (tmpChi2 < 0.5) - setOfBadTrk.push_back(it); - } - // - // Bad track removal - // - ListP.clear(); - ListT.clear(); - badPart.clear(); - badTrk.clear(); - if (setOfBadTrk.empty()) - return; // nothing found - // - for (it = 0; it < NTracksVrt; it++) { - std::vector<int>::iterator found = - find(setOfBadTrk.begin(), setOfBadTrk.end(), it); - if (found != setOfBadTrk.end()) { - if (Selector == 1) - badPart.push_back(ListParticles[it]); - if (Selector == 2) - badTrk.push_back(ListTracks[it]); - } else { - if (Selector == 1) - ListP.push_back(ListParticles[it]); - if (Selector == 2) - ListT.push_back(ListTracks[it]); - } - } - // - if (Selector == 1) - if (ListP.size() < badPart.size()) - return; // protection - if (Selector == 2) - if (ListT.size() < badTrk.size()) - return; // protection - // - if (Selector == 1) { - ListParticles.resize(ListP.size()); - copy(ListP.begin(), ListP.end(), ListParticles.begin()); - std::vector<const Trk::TrackParticleBase*>::iterator last = - unique(badPart.begin(), badPart.end()); - badPart.erase(last, badPart.end()); - } - if (Selector == 2) { - ListTracks.resize(ListT.size()); - copy(ListT.begin(), ListT.end(), ListTracks.begin()); - std::vector<const Trk::Track*>::iterator last = - unique(badTrk.begin(), badTrk.end()); - badTrk.erase(last, badTrk.end()); - } - return; - } - - double - InDetVKalPriVxFinderTool::FitCommonVrt( - Cache& cache, - std::vector<const Trk::TrackParticleBase*>& ListParticles, - std::vector<const Trk::Track*>& ListTracks, - double ZEstimation, - Amg::Vector3D& FitVertex, - std::vector<double>& ErrorMatrix, - std::vector<double>& TrkWeights) const - { - int Selector=2; // Initial choice - int NTracksVrt = 0; - if( ListParticles.size() == 0 && ListTracks.size() == 0 ){return -10000.; } - if( ListParticles.size() != 0 && ListTracks.size() == 0 ){ Selector =1; NTracksVrt=ListParticles.size(); } - if( ListParticles.size() == 0 && ListTracks.size() != 0 ){ Selector =2; NTracksVrt=ListTracks.size();} - - if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG) << "FitCommonVrt() called. Total tracks= " << NTracksVrt<< endmsg; - if(Selector==1 && msgLvl(MSG::DEBUG))msg(MSG::DEBUG) << " Trk::TrackParticleBases are used for common Vrt!!!"<<endmsg; - if(Selector==2 && msgLvl(MSG::DEBUG))msg(MSG::DEBUG) << " Trk::Tracks are used for common Vrt!!!"<<endmsg; -//preparation - std::vector<double> Chi2PerTrk; - std::vector< std::vector<double> > TrkAtVrt; - double Chi2 = 0.,PtF=0.,PtS=0.; int Outlier=1, OutlierNext=1, i=0; -// -// Start of fit -// - std::unique_ptr<Trk::IVKalState> state = m_fitSvc->makeState(); - m_fitSvc->setApproximateVertex(cache.m_BeamCnst[0],cache.m_BeamCnst[1],ZEstimation, *state); /* Use as starting point */ - if(m_BeamConstraint) { - m_fitSvc->setVertexForConstraint(cache.m_BeamCnst[0],cache.m_BeamCnst[1],ZEstimation,*state); - m_fitSvc->setCovVrtForConstraint(cache.m_BeamCnstWid[0]*cache.m_BeamCnstWid[0], 0., cache.m_BeamCnstWid[1]*cache.m_BeamCnstWid[1], 0., 0., 56.*56., *state); - m_fitSvc->setCnstType(6, *state); - } - //m_fitSvc->setRobustness(m_TypeRobust); - m_fitSvc->setRobustness(3, *state); - m_fitSvc->setRobustScale(m_RobustScale, *state); -// -//fit itself -// - int IterationLimit=NTracksVrt-1; if(IterationLimit<1)IterationLimit=1; - for (i=0; i < IterationLimit; i++) { - if(Selector==1){ cache.m_sc=m_fitSvc->VKalVrtFit(ListParticles,FitVertex, cache.m_Momentum,cache.m_Charge, - ErrorMatrix,Chi2PerTrk,TrkAtVrt,Chi2, - *state); - NTracksVrt=ListParticles.size(); - } - if(Selector==2){ cache.m_sc=m_fitSvc->VKalVrtFit(ListTracks,FitVertex, cache.m_Momentum,cache.m_Charge, - ErrorMatrix,Chi2PerTrk,TrkAtVrt,Chi2, - *state); - NTracksVrt=ListTracks.size(); - } - if(NTracksVrt <= 2 ) break; // Only <2 tracks left - if(cache.m_sc.isFailure() || Chi2 > 1000000. ) { return -10000.;} // No fit - Outlier = FindMax( Chi2PerTrk ); OutlierNext=FindMaxSecond( Chi2PerTrk ); - PtF=fabs(sin(TrkAtVrt[Outlier][0])/TrkAtVrt[Outlier][2]); PtS=fabs(sin(TrkAtVrt[OutlierNext][0])/TrkAtVrt[OutlierNext][2]); - TrkWeights.clear(); - cache.m_sc=m_fitSvc->VKalGetTrkWeights(TrkWeights, *state); if(cache.m_sc.isFailure() ) return -10000.; // problem - double dof=0.; for(int itk=0; itk<NTracksVrt; itk++)dof += TrkWeights[itk]; - long int nDoF=(long int)(5.*dof-3.*NTracksVrt-3.); if(m_BeamConstraint)nDoF += 2; if(nDoF<1)nDoF=1; - float vrtProb=TMath::Prob(Chi2,nDoF); -if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<<" Out1="<< Chi2PerTrk[Outlier]<<", Wei="<<TrkWeights[Outlier]<<" Z="<<FitVertex.z()<<" prob="<<vrtProb<<" iter="<<i<<endmsg; - if( Chi2PerTrk[FindMax(Chi2PerTrk)] < m_SecTrkChi2Cut ){ - //if(NTracksVrt<3) break; - break; - } -//Track removal(outlier) - if( (Chi2PerTrk[OutlierNext]/Chi2PerTrk[Outlier])>0.9 && PtF>PtS ) Outlier=OutlierNext; - if(Selector==1)RemoveEntryInList(ListParticles, Outlier); - if(Selector==2)RemoveEntryInList(ListTracks, Outlier); - RemoveEntryInList(Chi2PerTrk, Outlier); -//to speed up procedure -> remove second outlier - Outlier = FindMax( Chi2PerTrk ); - if( Chi2PerTrk[Outlier] > 20.){ - if(Selector==1 && ListParticles.size()>20)RemoveEntryInList(ListParticles,Outlier); - if(Selector==2 && ListTracks.size() >20)RemoveEntryInList(ListTracks,Outlier); - RemoveEntryInList(Chi2PerTrk, Outlier); - Outlier = FindMax( Chi2PerTrk ); - } -// -// Switch to default functional - if(Chi2PerTrk[Outlier]<20.) m_fitSvc->setRobustness(m_TypeRobust, *state); -// -// Prepare next iteration - m_fitSvc->setApproximateVertex(FitVertex.x(),FitVertex.y(),FitVertex.z(), *state); /*Use as starting point*/ - if(m_BeamConstraint) { - m_fitSvc->setVertexForConstraint(cache.m_BeamCnst[0],cache.m_BeamCnst[1],FitVertex.z(), *state); - m_fitSvc->setCovVrtForConstraint(cache.m_BeamCnstWid[0]*cache.m_BeamCnstWid[0],0.,cache.m_BeamCnstWid[1]*cache.m_BeamCnstWid[1],0.,0., 56.*56., *state); - } - } -//---------------------------------------------------------------------------- -// Cleaning + refit with full error matrix -// - - state = m_fitSvc->makeState(); - if(m_BeamConstraint) { - m_fitSvc->setVertexForConstraint(cache.m_BeamCnst[0],cache.m_BeamCnst[1],FitVertex.z(), *state); - m_fitSvc->setCovVrtForConstraint(cache.m_BeamCnstWid[0]*cache.m_BeamCnstWid[0], 0., cache.m_BeamCnstWid[1]*cache.m_BeamCnstWid[1], 0., 0., 56.*56., *state); - m_fitSvc->setCnstType(6, *state); - } - m_fitSvc->setRobustness(m_TypeRobust, *state); - m_fitSvc->setRobustScale(m_RobustScale, *state); - if(Selector==1)cache.m_sc=m_fitSvc->VKalVrtFit(ListParticles,FitVertex,cache.m_Momentum,cache.m_Charge,ErrorMatrix,Chi2PerTrk,TrkAtVrt,Chi2,*state,true); - if(Selector==2)cache.m_sc=m_fitSvc->VKalVrtFit(ListTracks, FitVertex,cache.m_Momentum,cache.m_Charge,ErrorMatrix,Chi2PerTrk,TrkAtVrt,Chi2,*state,true); - if(cache.m_sc.isFailure()) return -10000.; // Problem -// -// - Outlier = FindMax( Chi2PerTrk ); - if(Selector==1)NTracksVrt=ListParticles.size(); - if(Selector==2)NTracksVrt=ListTracks.size(); - if(NTracksVrt<1)return -10000.; //Protection - if(msgLvl(MSG::DEBUG))msg(MSG::DEBUG)<<" Primary Vertex fit converged N,Chi2,ChiT="<< NTracksVrt<<", " - <<Chi2<<", "<<Chi2PerTrk[Outlier]<<" Z="<<FitVertex.z()<<endmsg; -//-- - if( Chi2PerTrk[Outlier] > m_SecTrkChi2Cut && NTracksVrt<=2) -// VK 6.02.2008 Wrong!!! Chi2/NTracksVrt > 4. ) -// TMath::Prob( Chi2,2*NTracksVrt-3)<1.e-3 ) - { return -10000.; } - TrkWeights.clear(); - cache.m_sc=m_fitSvc->VKalGetTrkWeights(TrkWeights, *state); - if(cache.m_sc.isFailure()) return -10000.; // Problem -// -//-- Create array on HEAP to store fitted track parameters. Should be removed in SaveResults -// - double** pntTracks=getWorkArr2(NTracksVrt,3); - for( i=0; i<NTracksVrt; i++){ - pntTracks[i][0]=TrkAtVrt[i][0]; - pntTracks[i][1]=TrkAtVrt[i][1]; - pntTracks[i][2]=TrkAtVrt[i][2]; - } -// - cache.m_savedTrkFittedPerigees.push_back(pntTracks); -// - std::vector <double> CovFull; - StatusCode sc = m_fitSvc->VKalGetFullCov( (long int) NTracksVrt, CovFull, - *state); - int covarExist=0; if( sc.isSuccess() ) covarExist=1; - AmgSymMatrix(5) One; One.setIdentity(); One(1,1)=0.; One(2,2)=0.; - std::vector< AmgSymMatrix(5) > tmpTrkCov; - for( i=0; i<NTracksVrt; i++){ - if(covarExist) { tmpTrkCov.push_back( FillCovMatrix( i,CovFull ) );} - else{ tmpTrkCov.push_back( One ); } - } - cache.m_fittedTrkCov.push_back(tmpTrkCov); -// - return Chi2; - } - - /* Basic primary Z finder */ - -#define SigmaZBeam 156. -#define NMesh 140 - - double - InDetVKalPriVxFinderTool::FindZPosTrk( - Cache& cache, - std::vector<const Trk::Track*>& ListTracks, - double& ControlVariable) const - { - std::vector<double> PtTrk, PxTrk, PyTrk; - std::vector<double> ZTrk, PhiTrk; - SetTrkParamVectors(cache,ListTracks, ZTrk, PtTrk, PxTrk, PyTrk, PhiTrk); - return FindZPos(ZTrk, PtTrk, PxTrk, PyTrk, PhiTrk, ControlVariable); - } - - double - InDetVKalPriVxFinderTool::FindZPosTrk( - Cache& cache, - std::vector<const Trk::TrackParticleBase*>& ListTracks, - double& ControlVariable) const - { - std::vector<double> PtTrk,PxTrk,PyTrk; - std::vector<double> ZTrk,PhiTrk; - SetTrkParamVectors(cache,ListTracks,ZTrk,PtTrk,PxTrk,PyTrk,PhiTrk); - return FindZPos( ZTrk, PtTrk, PxTrk, PyTrk, PhiTrk, ControlVariable); - } - - - - - -// Unified program for Z position estimation -// - double - InDetVKalPriVxFinderTool::FindZPos(std::vector<double>& ZTrk, - std::vector<double>& PtTrk, - std::vector<double>& PxTrk, - std::vector<double>& PyTrk, - std::vector<double>& PhiTrk, - double& ControlVariable) const - { - double Step, LowLim, HighLim, Angle; - int NTracks =ZTrk.size(); - int i,j; - - double Pt, PtSum=0., ZSum=0.; - double ControlVariableCur, ZEstimation; - double PtAng1[4],PtAng2[4]; - int Counter, CounterOld, Found; - - ControlVariable =-100000; - ZEstimation =-100000.; - CounterOld =0; - - Step = 2.*SigmaZBeam/NMesh; - - for ( i=-NMesh; i< NMesh-1; i++){ - LowLim=i*Step; HighLim=LowLim+2.*Step; - PtSum=0.; - ZSum=0.; - double PxSum=0., PySum=0.; - Counter=0; - for( j=0; j<4; j++) { PtAng1[j]=0; PtAng2[j]=0;} - for( j=0; j<NTracks; j++){ - if(ZTrk[j]<LowLim)continue; - if(ZTrk[j]>HighLim)continue; - ZSum += ZTrk[j]; - Pt= PtTrk[j] < 100000 ? PtTrk[j] : 100000.; - PtSum += Pt; - PxSum += PxTrk[j]; PySum += PyTrk[j]; - Angle=2.*PhiTrk[j]/M_PI; - if(Angle < 0) Angle += 4.; - PtAng1[(int)Angle] += Pt; - PtAng2[(int)(Angle+0.5 < 4. ? Angle+0.5 : Angle-3.5)] += Pt; - Counter += 1; - } - if(Counter<1) continue; - double Mass = PtSum*PtSum - PxSum*PxSum -PySum*PySum; if(Mass<=0.)Mass=0.; Mass=sqrt(Mass); - double PtMiss = sqrt(PxSum*PxSum + PySum*PySum); - double AngPtMax =0, AngPtMin =100000000000.; - for ( j=0; j<4; j++) {AngPtMax = PtAng1[j]>AngPtMax ? PtAng1[j] : AngPtMax;} - for ( j=0; j<4; j++) {if(PtAng1[j]>0) {AngPtMin = PtAng1[j]<AngPtMin ? PtAng1[j] : AngPtMin;}} - for ( j=0; j<4; j++) {AngPtMax = PtAng2[j]>AngPtMax ? PtAng2[j] : AngPtMax;} - for ( j=0; j<4; j++) {if(PtAng2[j]>0) {AngPtMin = PtAng2[j]<AngPtMin ? PtAng2[j] : AngPtMin;}} - - double tmpDiff=AngPtMax-AngPtMin; if( tmpDiff<0. || Counter<8) tmpDiff=0.; - ControlVariableCur = tmpDiff+PtSum+Mass+PtMiss; - ControlVariableCur = ControlVariableCur/Counter/1000. + Counter/30.; //Mass and Pt are in MeV now!!! - Found=0; - if( Counter<=5 && Counter>CounterOld ) Found = 1; - if( Counter> 5 && ControlVariableCur > ControlVariable) Found = 1; - if(Found){ - ControlVariable = ControlVariableCur; - ZEstimation = ZSum/Counter; - CounterOld = Counter; - } - } - - return ZEstimation; - - } - - void - InDetVKalPriVxFinderTool::SetTrkParamVectors( - Cache& cache, - std::vector<const Trk::Track*>& ListTracks, - std::vector<double>& ZTrk, - std::vector<double>& PtTrk, - std::vector<double>& PxTrk, - std::vector<double>& PyTrk, - std::vector<double>& PhiTrk) const - - { std::vector<const Trk::Track*>::const_iterator i_ntrk; - AmgVector(5) VectPerig; VectPerig<<0.,0.,0.,0.,0.; - const Trk::Perigee* mPer=nullptr; - std::vector<double> Impact,ImpError; -// - ZTrk.clear();PtTrk.clear();PxTrk.clear();PyTrk.clear(); PhiTrk.clear(); - for (i_ntrk = ListTracks.begin(); i_ntrk < ListTracks.end(); ++i_ntrk) { -// -//- Search of Perigee in TrackParameters - mPer=GetPerigee( (*i_ntrk) ) ; - if( mPer == nullptr ){continue;} - VectPerig = mPer->parameters(); // perigee - double InverseP = std::abs(VectPerig[4]); - PtTrk.push_back(std::sin(VectPerig[3])/InverseP); - PxTrk.push_back(std::sin(VectPerig[3])*std::cos(VectPerig[2])/InverseP); - PyTrk.push_back(std::sin(VectPerig[3])*std::sin(VectPerig[2])/InverseP); - PhiTrk.push_back(GetLimitAngle(VectPerig[2])); - if( cache.m_BeamCnst[0] == 0. && cache.m_BeamCnst[1] == 0.) { - ZTrk.push_back(VectPerig[1]); - } else { - m_fitSvc->VKalGetImpact((*i_ntrk),cache.m_BeamCnst,1,Impact,ImpError); - ZTrk.push_back(Impact[1]); - } - } - } - - void - InDetVKalPriVxFinderTool::SetTrkParamVectors( - Cache& cache, - std::vector<const Trk::TrackParticleBase*>& ListTracks, - std::vector<double>& ZTrk, - std::vector<double>& PtTrk, - std::vector<double>& PxTrk, - std::vector<double>& PyTrk, - std::vector<double>& PhiTrk) const - - { std::vector<const Trk::TrackParticleBase*>::const_iterator i_ntrk; - AmgVector(5) VectPerig; VectPerig<<0.,0.,0.,0.,0.; - const Trk::Perigee* mPer=nullptr; - std::vector<double> Impact,ImpError; -// - ZTrk.clear();PtTrk.clear();PxTrk.clear();PyTrk.clear(); PhiTrk.clear(); - for (i_ntrk = ListTracks.begin(); i_ntrk < ListTracks.end(); ++i_ntrk) { -// -//- Search of Perigee in TrackParameters - mPer=GetPerigee( (*i_ntrk) ) ; - if( mPer == nullptr ){continue;} - VectPerig = mPer->parameters(); // Measured perigee - double InverseP = std::abs(VectPerig[4]); - PtTrk.push_back(std::sin(VectPerig[3])/InverseP); - PxTrk.push_back(std::sin(VectPerig[3])*cos(VectPerig[2])/InverseP); - PyTrk.push_back(std::sin(VectPerig[3])*sin(VectPerig[2])/InverseP); - PhiTrk.push_back(GetLimitAngle(VectPerig[2])); - if( cache.m_BeamCnst[0] == 0. && cache.m_BeamCnst[1] == 0.) { - ZTrk.push_back(VectPerig[1]); - } else { - Amg::Vector3D refVrt(cache.m_BeamCnst.x(),cache.m_BeamCnst.y(),0.); // Z==0 is needed for initial Z finder - m_fitSvc->VKalGetImpact((*i_ntrk),refVrt,1,Impact,ImpError); // - ZTrk.push_back(Impact[1]); - } - } - } - - -} diff --git a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/Utilities.cxx b/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/Utilities.cxx deleted file mode 100755 index 3fc7a0bcd30916ccdec29f6eca1edbe1d740cd01..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/Utilities.cxx +++ /dev/null @@ -1,369 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -// Header include -#include "InDetVKalPriVxFinderTool/InDetVKalPriVxFinderTool.h" -#include "TrkToolInterfaces/ITrackSummaryTool.h" -#include "TrkTrackSummary/TrackSummary.h" -//------------------------------------------------- -// Other stuff -#include <map> -#include <cmath> - - - - /* Technicalities */ - - -namespace InDet { - -void -InDetVKalPriVxFinderTool::inpSelector( - std::vector<const Trk::TrackParticleBase*>& ListParticles, - std::vector<const Trk::Track*>& ListTracks, - Amg::Vector3D& IniVertex, - std::vector<const Trk::TrackParticleBase*>& SelectedParticles, - std::vector<const Trk::Track*>& SelectedTracks) const -{ - int Selector = 2; // Initial choice - int NTrkInList = 0; - SelectedParticles.clear(); - SelectedTracks.clear(); - if (ListParticles.empty() && ListTracks.empty()) - return; - if ((not ListParticles.empty()) && ListTracks.empty()) { - Selector = 1; - NTrkInList = ListParticles.size(); - } - if (ListParticles.empty() && (not ListTracks.empty())) { - Selector = 2; - NTrkInList = ListTracks.size(); - } - // - // track selection for given vertex candidates - std::vector<double> Impact, ImpactError; - double Signif = 0.; - for (int i = 0; i < NTrkInList; i++) { - if (Selector == 1) - Signif = m_fitSvc->VKalGetImpact( - ListParticles[i], IniVertex, 1, Impact, ImpactError); - if (Selector == 2) - Signif = m_fitSvc->VKalGetImpact( - ListTracks[i], IniVertex, 1, Impact, ImpactError); - if (std::fabs(Impact[0]) / std::sqrt(ImpactError[0]) > m_RImpSelCut) - continue; - if (std::fabs(Impact[1]) / std::sqrt(ImpactError[2]) > m_ZImpSelCut) - continue; - if (Signif > m_SignifSelCut) - continue; - if (std::fabs(Impact[0]) > m_RDistSelCut) - continue; - if (std::fabs(Impact[1] * sin(Impact[2])) > m_ZDistSelCut) - continue; - if (Selector == 1) - SelectedParticles.push_back(ListParticles[i]); - if (Selector == 2) - SelectedTracks.push_back(ListTracks[i]); - } - if (Selector == 1) - ATH_MSG_DEBUG("Chosen for vertex fit=" << SelectedParticles.size()); - if (Selector == 2) - ATH_MSG_DEBUG("Chosen for vertex fit=" << SelectedTracks.size()); - return; - } - - int - InDetVKalPriVxFinderTool::FindMin(std::vector<double>& Chi2PerTrk) const - { - double Chi2Ref=1.e12; - int Position=0; - if( Chi2PerTrk.size() < 1 ) return Position ; - for (int i=0; i< (int)Chi2PerTrk.size(); i++){ - if( Chi2PerTrk[i] < Chi2Ref) { Chi2Ref=Chi2PerTrk[i]; Position=i;} - } - return Position; - } - int - InDetVKalPriVxFinderTool::FindMax(std::vector<double>& Chi2PerTrk) const - { - double Chi2Ref=0.; - int Position=0; - if( Chi2PerTrk.size() < 1 ) return Position ; - for (int i=0; i< (int)Chi2PerTrk.size(); i++){ - if( Chi2PerTrk[i] > Chi2Ref) { Chi2Ref=Chi2PerTrk[i]; Position=i;} - } - return Position; - } - int InDetVKalPriVxFinderTool::FindMaxSecond( std::vector<double>& Chi2PerTrk) const - { - double Chi2Ref=0.,Chi2RefS=0.; - int Position=0; - if( Chi2PerTrk.size() < 1 ) return Position ; - for (int i=0; i< (int)Chi2PerTrk.size(); i++){ - if( Chi2PerTrk[i] > Chi2Ref) { Chi2Ref=Chi2PerTrk[i]; Position=i;} - } - for (int i=0; i< (int)Chi2PerTrk.size(); i++){ - if( Chi2PerTrk[i] == Chi2Ref ) continue; - if( Chi2PerTrk[i] > Chi2RefS ) { Chi2RefS=Chi2PerTrk[i]; Position=i;} - } - return Position; - } - - const Trk::Perigee* - InDetVKalPriVxFinderTool::GetPerigee(const Trk::TrackParticleBase* i_ntrk) const - { - // - //-- Perigee in TrackParticle - // - const Trk::Perigee* mPer; - mPer = dynamic_cast<const Trk::Perigee*>( &(i_ntrk->definingParameters()) ); - return mPer; - } - - const Trk::Perigee* - InDetVKalPriVxFinderTool::GetPerigee(const Trk::Track* i_ntrk) const - { - return i_ntrk->perigeeParameters(); - - } -//----------------------------------------------------------------------------------------------- - void - InDetVKalPriVxFinderTool::RemoveEntryInList( - std::vector<const Trk::Track*>& ListTracks, - int Outlier) const - { - if(Outlier < 0 ) return; - if(Outlier >= (int)ListTracks.size() ) return; - std::vector<const Trk::Track*>::iterator TransfEnd; - TransfEnd = remove( ListTracks.begin(), ListTracks.end(), ListTracks[Outlier]); - ListTracks.erase( TransfEnd,ListTracks.end()); - } - - void - InDetVKalPriVxFinderTool::RemoveEntryInList( - std::vector<const Trk::TrackParticleBase*>& ListTracks, - int Outlier) const - { - if(Outlier < 0 ) return; - if(Outlier >= (int)ListTracks.size() ) return; - std::vector<const Trk::TrackParticleBase*>::iterator TransfEnd; - TransfEnd = remove( ListTracks.begin(), ListTracks.end(), ListTracks[Outlier]); - ListTracks.erase( TransfEnd,ListTracks.end()); - } - - void InDetVKalPriVxFinderTool::RemoveEntryInList(std::vector<double>& List, int Outlier) const - { - if(Outlier < 0 ) return; - if(Outlier >= (int)List.size() ) return; - std::vector<double>::iterator TransfEnd; - TransfEnd = remove( List.begin(), List.end(), List[Outlier]); - List.erase( TransfEnd,List.end()); - } -//----------------------------------------------------------------------------------------------- - - void - InDetVKalPriVxFinderTool::RemoveUsedEntry( - std::vector<const Trk::Track*>& List, - std::vector<const Trk::Track*>& ListUsed, - std::vector<double>& TrkWeights) const - { - int UseWgt=0; - if(ListUsed.size() == 0 ) return; - std::vector<const Trk::Track*>::iterator TransfEnd = List.end(); - int NUsedTrk=ListUsed.size(); - if( (int)TrkWeights.size()>= NUsedTrk) UseWgt=1; - for (int i=0; i < NUsedTrk; i++) { - if(UseWgt && (TrkWeights[i]<m_WeightCut) && NUsedTrk>2 ) continue; // Only well attached tracks are removed - TransfEnd=remove(List.begin() , TransfEnd , ListUsed[i]); - } - List.erase( TransfEnd,List.end()); - } - - void - InDetVKalPriVxFinderTool::RemoveUsedEntry( - std::vector<const Trk::TrackParticleBase*>& List, - std::vector<const Trk::TrackParticleBase*>& ListUsed, - std::vector<double>& TrkWeights) const - { - int UseWgt=0; - if(ListUsed.size() == 0 ) return; - std::vector<const Trk::TrackParticleBase*>::iterator TransfEnd = List.end(); - int NUsedTrk=ListUsed.size(); - if( (int)TrkWeights.size()>= NUsedTrk) UseWgt=1; - for (int i=0; i < NUsedTrk; i++) { - if(UseWgt && (TrkWeights[i]<m_WeightCut) && NUsedTrk>2 ) continue; // Only well attached tracks are removed - TransfEnd=remove(List.begin() , TransfEnd , ListUsed[i]); - } - List.erase( TransfEnd,List.end()); - } - - double InDetVKalPriVxFinderTool::GetLimitAngle(double Phi) const { - constexpr double twoPi (2.*M_PI); - while ( Phi < 0.) { Phi += twoPi;} - while ( Phi > twoPi) {Phi -=twoPi;} - return Phi; - } - -// Track list cleaning - - void - InDetVKalPriVxFinderTool::UniqList(std::vector<const Trk::Track*>& List) const - { - std::vector<const Trk::Track*>::iterator TransfEnd ; - sort(List.begin(),List.end()); - TransfEnd = unique(List.begin(),List.end()); - List.erase( TransfEnd, List.end()); - } - void - InDetVKalPriVxFinderTool::UniqList( - std::vector<const Trk::TrackParticleBase*>& List) const - { - std::vector<const Trk::TrackParticleBase*>::iterator TransfEnd ; - sort(List.begin(),List.end()); - TransfEnd = unique(List.begin(),List.end()); - List.erase( TransfEnd, List.end()); - } - - double** - InDetVKalPriVxFinderTool::getWorkArr2(long int dim1, long int dim2) const - { - double **ppArr = new double*[dim1]; - for (int i = 0; i < dim1; i++) ppArr[i] = new double[dim2]; - return ppArr; - } - - void - InDetVKalPriVxFinderTool::removeWorkArr2(double** ppArr, - long int dim1, - long int) const - { - for (int i = 0; i < dim1; i++) delete[] ppArr[i]; - delete[] ppArr; - } - - double*** - InDetVKalPriVxFinderTool::getWorkArr3(long int dim1, - long int dim2, - long int dim3) const - { - int i,j; - double ***ppArr = new double**[dim1]; - for (i = 0; i < dim1; i++) ppArr[i] = new double*[dim2]; - for (i = 0; i < dim1; i++) { for (j = 0; j < dim2; j++) ppArr[i][j] = new double[dim3];} - return ppArr; - } - - void - InDetVKalPriVxFinderTool::removeWorkArr3(double*** ppArr, - long int dim1, - long int dim2, - long int) const - { - int i,j; - for (i = 0; i < dim1; i++){ for (j = 0; j < dim2; j++) delete[]ppArr[i][j]; } - for (i = 0; i < dim1; i++) delete[]ppArr[i]; - delete[] ppArr; - } - - -// Fills 5x5 matrix. Input Matrix is a full covariance - AmgSymMatrix(5) - InDetVKalPriVxFinderTool::FillCovMatrix(int iTrk, - std::vector<double>& Matrix) const - { - int iTmp=(iTrk+1)*3; - int NContent = Matrix.size(); - AmgSymMatrix(5) CovMtx; CovMtx.setZero(); CovMtx(2,2)=1.; CovMtx(3,3)=1.; CovMtx(4,4)=1.; - int pnt = (iTmp+1)*iTmp/2 + iTmp; if( pnt > NContent ) return CovMtx; - CovMtx(2,2) = Matrix[pnt]; - pnt = (iTmp+1+1)*(iTmp+1)/2 + iTmp; if( pnt+1 > NContent ){ return CovMtx; } - CovMtx(2,3) = Matrix[pnt]; - CovMtx(3,3) = Matrix[pnt+1]; - pnt = (iTmp+2+1)*(iTmp+2)/2 + iTmp; if( pnt+2 > NContent ){ return CovMtx; } - CovMtx(2,4) = Matrix[pnt]; - CovMtx(3,4) = Matrix[pnt+1]; - CovMtx(4,4) = Matrix[pnt+2]; - return CovMtx; - } - - Amg::Vector3D - InDetVKalPriVxFinderTool::findIniXY(const TrackCollection* trackTES) const - { - //............................................. - AmgVector(5) VectPerig; - VectPerig<<0.,0.,0.,0.,0.; - const Trk::Perigee* mPer=nullptr; - std::map<double, const Trk::Track*> mapTracks; - std::map<double, const Trk::Track*>::reverse_iterator map_i; -// - const DataVector<Trk::Track>* newTrkCol = trackTES; - DataVector<Trk::Track>::const_iterator i_ntrk; - for (i_ntrk = newTrkCol->begin(); i_ntrk < newTrkCol->end(); ++i_ntrk) { - mPer=GetPerigee( (*i_ntrk) ); - if( not mPer )continue; - VectPerig = mPer->parameters(); - double pmom = std::sin(VectPerig[3])/std::fabs(VectPerig[4]); -//----------------------------------- Summary tools - if(m_SummaryToolExist) { - const Trk::TrackSummary* testSum = m_sumSvc->createSummary(*(*i_ntrk)); - if( testSum->get(Trk::numberOfInnermostPixelLayerHits) <= 0){ - delete testSum; - testSum=nullptr; - continue; - } - delete testSum; - } - mapTracks.insert( std::pair<double, const Trk::Track*>(pmom,(*i_ntrk))); - } - std::vector<const Trk::Track*> SelectedTracks; - int cnt=0; - for(map_i=mapTracks.rbegin(); map_i != mapTracks.rend(); map_i++){ - SelectedTracks.push_back((*map_i).second); - if(++cnt>20)break; - } - Amg::Vector3D Vertex(0.,0.,0.); - if(cnt>=2){ - StatusCode sc=m_fitSvc->VKalVrtFitFast(SelectedTracks,Vertex,*m_fitSvc->makeState()); - if(sc.isFailure()) Vertex<<0.,0.,0.; - } - return Vertex; - } - - Amg::Vector3D - InDetVKalPriVxFinderTool::findIniXY( - const Trk::TrackParticleBaseCollection* newPrtCol) const - { - //............................................. - AmgVector(5) VectPerig; VectPerig<<0.,0.,0.,0.,0.; - const Trk::Perigee* mPer=NULL; - std::map<double, const Trk::TrackParticleBase*> mapTracks; - std::map<double, const Trk::TrackParticleBase*>::reverse_iterator map_i; -// - Trk::TrackParticleBaseCollection::const_iterator i_nprt = newPrtCol->begin(); - for (i_nprt = newPrtCol->begin(); i_nprt < newPrtCol->end(); ++i_nprt) { - mPer=GetPerigee( (*i_nprt) ); if( mPer == NULL )continue; - VectPerig = mPer->parameters(); - double pmom = sin(VectPerig[3])/fabs(VectPerig[4]); -//----------------------------------- Summary tools - const Trk::TrackSummary* testSum = (*i_nprt)->trackSummary(); - if( testSum->get(Trk::numberOfInnermostPixelLayerHits) <=0 ) continue; - mapTracks.insert( std::pair<double, const Trk::TrackParticleBase*>(pmom,(*i_nprt))); - } - - std::vector<const Trk::TrackParticleBase*> SelectedTrackParticles; - - int cnt=0; - for(map_i=mapTracks.rbegin(); map_i != mapTracks.rend(); map_i++){ - //std::cout<<(*map_i).first<<'\n'; - SelectedTrackParticles.push_back((*map_i).second); - if(++cnt>20)break; - } - Amg::Vector3D Vertex(0.,0.,0.); - if(cnt>=2){ - StatusCode sc= m_fitSvc->VKalVrtFitFast(SelectedTrackParticles,Vertex,*m_fitSvc->makeState()); - if(sc.isFailure())Vertex<<0.,0.,0.; - } - return Vertex; - } -} diff --git a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/components/InDetVKalPriVxFinderTool_entries.cxx b/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/components/InDetVKalPriVxFinderTool_entries.cxx deleted file mode 100644 index 99166422f98b7416ec353cf8bfbe4be9a253c24b..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/components/InDetVKalPriVxFinderTool_entries.cxx +++ /dev/null @@ -1,6 +0,0 @@ -#include "InDetVKalPriVxFinderTool/InDetVKalPriVxFinderTool.h" - -using namespace InDet; - -DECLARE_COMPONENT( InDetVKalPriVxFinderTool ) - diff --git a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/CMakeLists.txt b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/CMakeLists.txt deleted file mode 100644 index 25ac53811b24da7cb37c69ca78d19568ea24283c..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/CMakeLists.txt +++ /dev/null @@ -1,39 +0,0 @@ -################################################################################ -# Package: InDetZVTOPVxFinder -################################################################################ - -# Declare the package name: -atlas_subdir( InDetZVTOPVxFinder ) - -# declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Control/AthenaBaseComps - GaudiKernel - InnerDetector/InDetRecTools/InDetRecToolInterfaces - Tracking/TrkEvent/VxVertex - Tracking/TrkEvent/TrkTrack - Reconstruction/Particle - Tracking/TrkEvent/TrkParticleBase - Tracking/TrkEvent/TrkParameters - Event/xAOD/xAODTracking - PRIVATE - Control/AthContainers - InnerDetector/InDetConditions/InDetBeamSpotService - Tracking/TrkExtrapolation/TrkExInterfaces - Tracking/TrkDetDescr/TrkSurfaces - Tracking/TrkVertexFitter/TrkVertexFitterInterfaces - Tracking/TrkEvent/VxSecVertex - Event/EventPrimitives - Generators/AtlasHepMC ) - -# External dependencies - -# Component(s) in the package: -atlas_add_component( InDetZVTOPVxFinder - src/*.cxx - src/components/*.cxx - INCLUDE_DIRS - LINK_LIBRARIES AtlasHepMCLib AthenaBaseComps GaudiKernel InDetRecToolInterfaces VxVertex Particle TrkParticleBase TrkParameters xAODTracking AthContainers TrkExInterfaces TrkSurfaces TrkVertexFitterInterfaces VxSecVertex EventPrimitives ) - -# Install files from the package: -atlas_install_headers( InDetZVTOPVxFinder ) diff --git a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ATLAS_CHECK_THREAD_SAFETY deleted file mode 100644 index 2e30389b16e2f7cd3e3f0f44aeada47f09c3e2cc..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ATLAS_CHECK_THREAD_SAFETY +++ /dev/null @@ -1 +0,0 @@ -InnerDetector/InDetRecTools/InDetZVTOPVxFinder diff --git a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/IZVTOP_AmbiguitySolver.h b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/IZVTOP_AmbiguitySolver.h deleted file mode 100755 index 0741b97fbcacbab5a0bc4c63d07f0cdfe1afd019..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/IZVTOP_AmbiguitySolver.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -/////////////////////////////////////////////////////////////////// -// IZVTOP_AmbiguitySolver.h, (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// -#ifndef IINDETZVTOP_AMBIGUITYSOLVER_H -#define IINDETZVTOP_AMBIGUITYSOLVER_H - -#include "GaudiKernel/IAlgTool.h" -//xAOD includes --David S. -#include "xAODTracking/Vertex.h" //typedef -#include <vector> - - -namespace InDet -{ - - class IZVTOP_AmbiguitySolver : virtual public IAlgTool { - public: - DeclareInterfaceID (IZVTOP_AmbiguitySolver, 1, 0); - - // enter declaration of your interface-defining member functions here - virtual std::vector< xAOD::Vertex* > solveAmbiguities(std::vector< xAOD::Vertex* > VertexContainer) const = 0; - }; - -} // end of namespace - -#endif diff --git a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/IZVTOP_SimpleVtxProbCalc.h b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/IZVTOP_SimpleVtxProbCalc.h deleted file mode 100755 index 7e6a281a4754a2677ac1018546f71392cd96e4b5..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/IZVTOP_SimpleVtxProbCalc.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -/////////////////////////////////////////////////////////////////// -// IZVTOP_SimpleVtxProbCalc.h, (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// -#ifndef IINDETZVTOP_SIMPLEVTXPROBCALC_H -#define IINDETZVTOP_SIMPLEVTXPROBCALC_H - -#include "GaudiKernel/IAlgTool.h" - - -namespace InDet -{ - - - class IZVTOP_SimpleVtxProbCalc : virtual public IAlgTool { - public: - DeclareInterfaceID (IZVTOP_SimpleVtxProbCalc, 1, 0); - - // enter declaration of your interface-defining member functions here - virtual double calcVtxProb(double & trk_func_sum, double & trk_func_sum2) const = 0; - }; - -} // end of namespace - -#endif diff --git a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/IZVTOP_SpatialPointFinder.h b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/IZVTOP_SpatialPointFinder.h deleted file mode 100755 index 42a35988ea25ebc531491759126a96cdecdc84c6..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/IZVTOP_SpatialPointFinder.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -/////////////////////////////////////////////////////////////////// -// IZVTOP_SpatialPointFinder.h, (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// -#ifndef IINDETZVTOP_SPATIALPOINTFINDER_H -#define IINDETZVTOP_SPATIALPOINTFINDER_H - -#include "GaudiKernel/IAlgTool.h" -#include "TrkParameters/TrackParameters.h" - -namespace Rec { - class TrackParticle; -} -namespace Trk { - class Track; - class TrackParticleBase; - class RecVertex; - class Vertex; - //class TrackParameters; -} -namespace InDet -{ - - - class IZVTOP_SpatialPointFinder : virtual public IAlgTool { - public: - DeclareInterfaceID(IZVTOP_SpatialPointFinder, 1, 0); - - // declaration of interface-defining member functions - virtual Trk::Vertex* findSpatialPoint(const Trk::Track* trk_1, const Trk::Track* trk_2) const = 0; - virtual Trk::Vertex* findSpatialPoint(const Rec::TrackParticle* trk_1, const Rec::TrackParticle* trk_2) const = 0; - virtual Trk::Vertex* findSpatialPoint(const Trk::TrackParticleBase* trk_1, const Trk::TrackParticleBase* trk_2) const = 0; - virtual Trk::Vertex* findSpatialPoint(const Trk::RecVertex vtx, const Trk::Track* trk_1) const = 0; - virtual Trk::Vertex* findSpatialPoint(const Trk::RecVertex vtx, const Rec::TrackParticle* trk_1) const = 0; - virtual Trk::Vertex* findSpatialPoint(const Trk::RecVertex vtx, const Trk::TrackParticleBase* trk_1) const = 0; - virtual Trk::Vertex* findSpatialPoint(const Trk::TrackParameters* perigee_1, const Trk::TrackParameters* perigee_2) const = 0; - virtual Trk::Vertex* findSpatialPoint(const Trk::RecVertex vtx, const Trk::TrackParameters* perigee_1) const = 0; - }; - -} // end of namespace - -#endif diff --git a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/IZVTOP_TrkProbTubeCalc.h b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/IZVTOP_TrkProbTubeCalc.h deleted file mode 100755 index 826fcec22c477f485e5423ac19f8e68b1fbb82cd..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/IZVTOP_TrkProbTubeCalc.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -/////////////////////////////////////////////////////////////////// -// IZVTOP_TrkProbTubeCalc.h, (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// -#ifndef IINDETZVTOP_TRKPROBTUBECALC_H -#define IINDETZVTOP_TRKPROBTUBECALC_H - -#include "GaudiKernel/IAlgTool.h" -#include "TrkParameters/TrackParameters.h" - -namespace Trk -{ - class Track; - class RecVertex; - class Vertex; - class TrackParticleBase; -} - -namespace Rec { - class TrackParticle; -} -namespace InDet -{ - - - class IZVTOP_TrkProbTubeCalc : virtual public IAlgTool { - public: - DeclareInterfaceID (IZVTOP_TrkProbTubeCalc, 1, 0); - - // declaration of interface-defining member functions - //trk - virtual double calcProbTube(const Trk::Track& trk, Trk::Vertex& vec) const = 0; - virtual double calcProbTube(const Rec::TrackParticle& trk, Trk::Vertex& vec) const = 0; - virtual double calcProbTube(const Trk::TrackParticleBase& trk, Trk::Vertex& vec) const = 0; - virtual double calcProbTube(const Trk::Perigee* trk, Trk::Vertex& vec) const = 0; - //beam spot - virtual double calcProbTube(const Trk::RecVertex& vtx, Trk::Vertex& vec) const = 0; - - }; - -} // end of namespace - -#endif diff --git a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_AmbiguitySolver.h b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_AmbiguitySolver.h deleted file mode 100755 index 76a78069cf221cd473c9e393fee60821ac04b088..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_AmbiguitySolver.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -/////////////////////////////////////////////////////////////////// -// ZVTOP_AmbiguitySolver.h, (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// - -#ifndef INDETZVTOP_AMBIGUITYSOLVER_H -#define INDETZVTOP_AMBIGUITYSOLVER_H - -#include "AthenaBaseComps/AthAlgTool.h" -#include "GaudiKernel/ToolHandle.h" -#include "InDetZVTOPVxFinder/IZVTOP_AmbiguitySolver.h" -namespace Trk -{ - //class VxCandidate; --David S. - class Track; -} -namespace InDet -{ - - class IZVTOP_TrkProbTubeCalc; - class IZVTOP_SimpleVtxProbCalc; - - /** @class ZVTOP_AmbiguitySolver - - This is for the Doxygen-Documentation. - Please delete these lines and fill in information about - the Algorithm! - Please precede every member function declaration with a - short Doxygen comment stating the purpose of this function. - - @author Tatjana Lenz <tatjana.lenz@cern.ch> - */ - - class ZVTOP_AmbiguitySolver : public extends<AthAlgTool, IZVTOP_AmbiguitySolver> - { - public: - ZVTOP_AmbiguitySolver(const std::string&,const std::string&,const IInterface*); - - /** default destructor */ - virtual ~ZVTOP_AmbiguitySolver (); - - /** standard Athena-Algorithm method */ - virtual StatusCode initialize() override; - /** standard Athena-Algorithm method */ - virtual StatusCode finalize () override; - //std::vector<Trk::VxCandidate*> solveAmbiguities(std::vector<Trk::VxCandidate*> VxContainer); --David S. - virtual std::vector< xAOD::Vertex* > solveAmbiguities(std::vector< xAOD::Vertex* > VertexContainer) const override; - - private: - - ToolHandle <InDet::IZVTOP_TrkProbTubeCalc> m_TrkProbTubeCalc; - ToolHandle <InDet::IZVTOP_SimpleVtxProbCalc> m_VtxProbCalc; - - - }; -} // end of namespace - -#endif diff --git a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_SecVtxTool.h b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_SecVtxTool.h deleted file mode 100644 index 9206530340e5bb4fc1731e852b10fddf5648e504..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_SecVtxTool.h +++ /dev/null @@ -1,100 +0,0 @@ -/* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -*/ - -/////////////////////////////////////////////////////////////////// -// ZVTOP_Tool.h, (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// - -#ifndef INDETZVTOP_SECVTXTOOL_H -#define INDETZVTOP_SECVTXTOOL_H - -#include "AthenaBaseComps/AthAlgTool.h" -#include "GaudiKernel/ToolHandle.h" -#include "InDetRecToolInterfaces/ISecVertexInJetFinder.h" - -/* Forward declarations */ -namespace Trk -{ - class Track; - class VxSecVertexInfo; - class RecVertex; - class TrackParticleBase; - class IVertexFitter; -} -namespace InDet -{ - class ISecVertexInJetFinder; - class IZVTOP_SpatialPointFinder; - class IZVTOP_TrkProbTubeCalc; - class IZVTOP_SimpleVtxProbCalc; - class IZVTOP_AmbiguitySolver; - class ZVTOP_TrkPartBaseVertexState; - class ZVTOP_VertexState; - - /** @class ZVTOP_Tool - - ---Topological Vertex Finder Tool --- - This tool reconstructs a set of topological vertices each - associated with an independent subset of the charged tracks. - Vertices are reconstructed by associating tracks with 3D spatial regions - according to the vertex probability function which is based on the trajectories - and position resolution of the tracks. - Docu: "A Topological Vertex Reconstruction Algorithm for Hadronic Jets" - by David J. Jackson, SLAC-PUB-7215, December 1996 - - Following properties can be set/changed via jobOptions: - - ---Input: TrackCollection - - \c TrackParticleName: The name of the StoreGate input container from - which the TrackParticle are read. The default is "???", the container - from the legacy converters/ambiguity processor. - - ---Output: VxContainer - - \c VxCollectionOutputName: The name of the StoreGate container where the fit - results are put. default is "VxCollection". - - ---Vertex Fitter: Billoir FullVertexFitter - - \c FitRoutine: The routine which should be used for the fitting. The - default is "FullVertexFitter". - - - - @author Tatjana Lenz <tatjana.lenz@NOSPAMcern.ch> - */ - class ZVTOP_SecVtxTool : virtual public ISecVertexInJetFinder, public AthAlgTool - { - public: - ZVTOP_SecVtxTool(const std::string&,const std::string&,const IInterface*); - - /** default destructor */ - virtual ~ZVTOP_SecVtxTool (); - - /** standard Athena-Algorithm method */ - virtual StatusCode initialize(); - /** standard Athena-Algorithm method */ - virtual StatusCode finalize (); - - virtual Trk::VxSecVertexInfo* findSecVertex(const Trk::RecVertex & primaryVertex,const TLorentzVector & jetMomentum,const std::vector<const Trk::TrackParticleBase*> & inputTracks) const; - - //Added purely to satisfy new inheritance in ISecVertexInJetFinder, not yet implemented --David S. - virtual Trk::VxSecVertexInfo* findSecVertex(const xAOD::Vertex & primaryVertex, const TLorentzVector & jetMomentum,const std::vector<const xAOD::IParticle*> & inputTracks) const; - - virtual Trk::VxSecVertexInfo* findSecVertex(const Trk::RecVertex & primaryVertex,const TLorentzVector & jetMomentum,const std::vector<const Trk::Track*> & inputTracks) const; - - private: - - ToolHandle <Trk::IVertexFitter> m_iVertexFitter; - ToolHandle <InDet::IZVTOP_SpatialPointFinder> m_iSpatialPointFinder; - ToolHandle <InDet::IZVTOP_TrkProbTubeCalc> m_iTrkProbTubeCalc; - ToolHandle <InDet::IZVTOP_SimpleVtxProbCalc> m_iVtxProbCalc; - ToolHandle <InDet::IZVTOP_AmbiguitySolver> m_iAmbiguitySolver; - double m_resolvingCut; - double m_resolvingStep; - double m_vtxProb_cut; - double m_trk_chi2_cut; - }; -} // end of namespace - -#endif - diff --git a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_SimpleVtxProbCalc.h b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_SimpleVtxProbCalc.h deleted file mode 100755 index 50e0fa05bc24aa3c129a63309405d07d6ca98753..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_SimpleVtxProbCalc.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -/////////////////////////////////////////////////////////////////// -// ZVTOP_SimpleVtxProbCalc.h, (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// - -#ifndef INDETZVTOP_SIMPLEVTXPROBCALC_H -#define INDETZVTOP_SIMPLEVTXPROBCALC_H - -#include "AthenaBaseComps/AthAlgTool.h" -#include "InDetZVTOPVxFinder/IZVTOP_SimpleVtxProbCalc.h" - - -namespace InDet -{ - - /** @class ZVTOP_SimpleVtxProbCalc - - @author Tatjana Lenz <tatjana.lenz@cern.ch> - */ - - class ZVTOP_SimpleVtxProbCalc : public extends<AthAlgTool, IZVTOP_SimpleVtxProbCalc> - { - public: - ZVTOP_SimpleVtxProbCalc(const std::string&,const std::string&,const IInterface*); - - /** default destructor */ - virtual ~ZVTOP_SimpleVtxProbCalc (); - - /** standard Athena-Algorithm method */ - virtual StatusCode initialize() override; - /** standard Athena-Algorithm method */ - virtual StatusCode finalize () override; - - virtual double calcVtxProb(double & trk_func_sum, double & trk_func_sum2) const override; - }; -} // end of namespace - -#endif diff --git a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_SlowSpatialPointFinder.h b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_SlowSpatialPointFinder.h deleted file mode 100644 index eb7541f7423cf5653a76d2581effaf86e3595407..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_SlowSpatialPointFinder.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -/////////////////////////////////////////////////////////////////// -// ZVTOP_SlowSpatialPointFinder.h, (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// - -#ifndef INDETZVTOP_SLOWSPATIALPOINTFINDER_H -#define INDETZVTOP_SLOWSPATIALPOINTFINDER_H - -#include "AthenaBaseComps/AthAlgTool.h" -#include "InDetZVTOPVxFinder/IZVTOP_SpatialPointFinder.h" -#include "GaudiKernel/ToolHandle.h" -#include "TrkParameters/TrackParameters.h" -namespace Trk -{ - class Track; - class RecVertex; - class TrackParticleBase; - class IVertexLinearizedTrackFactory; - class Vertex; -} - -namespace Rec -{ - class TrackParticle; -} - -namespace InDet -{ - - /** @class ZVTOP_SlowSpatialPointFinder - - - HelperClass for Topological Vertex Finder -ZVTOP- - Calculates the spatial point, which define the region of interest, - the region where we later look for the maxima of the vertex probability - function. Since at least two of the tracks (or RecVertex and Trk::Track) - must contribute to a maximum in the vertex probability function, - we calculate for each track pair the spatial point. - The found spatial point is rejected if chi² of this point is larger as chi²_cut. - - @author Tatjana Lenz <tatjana.lenz@cern.ch> - */ - - class ZVTOP_SlowSpatialPointFinder : public extends<AthAlgTool, IZVTOP_SpatialPointFinder> - { - public: - ZVTOP_SlowSpatialPointFinder(const std::string&,const std::string&,const IInterface*); - - /** default destructor */ - virtual ~ZVTOP_SlowSpatialPointFinder (); - - /** standard Athena-Algorithm method */ - virtual StatusCode initialize() override; - /** standard Athena-Algorithm method */ - virtual StatusCode finalize () override; - - virtual Trk::Vertex* findSpatialPoint(const Trk::Track* trk_1, const Trk::Track* trk_2) const override; - virtual Trk::Vertex* findSpatialPoint(const Trk::RecVertex vtx, const Trk::Track* trk_1) const override; - virtual Trk::Vertex* findSpatialPoint(const Rec::TrackParticle* trk_1, const Rec::TrackParticle* trk_2) const override; - virtual Trk::Vertex* findSpatialPoint(const Trk::RecVertex vtx, const Rec::TrackParticle* trk_1) const override; - virtual Trk::Vertex* findSpatialPoint(const Trk::TrackParticleBase* trk_1, const Trk::TrackParticleBase* trk_2) const override; - virtual Trk::Vertex* findSpatialPoint(const Trk::RecVertex vtx, const Trk::TrackParticleBase* trk_1) const override; - virtual Trk::Vertex* findSpatialPoint(const Trk::TrackParameters* perigee_1, const Trk::TrackParameters* perigee_2) const override; - virtual Trk::Vertex* findSpatialPoint(const Trk::RecVertex vtx, const Trk::TrackParameters* perigee_1) const override; - - private: - - ToolHandle< Trk::IVertexLinearizedTrackFactory > m_linFactory; - double m_chi2; - - }; -} // end of namespace - -#endif - diff --git a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_SpatialPointFinder.h b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_SpatialPointFinder.h deleted file mode 100755 index e54ad926fdc58303ca115e9d84061385263c7b31..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_SpatialPointFinder.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -/////////////////////////////////////////////////////////////////// -// ZVTOP_SpatialPointFinder.h, (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// - -#ifndef INDETZVTOP_SPATIALPOINTFINDER_H -#define INDETZVTOP_SPATIALPOINTFINDER_H - -#include "AthenaBaseComps/AthAlgTool.h" -#include "InDetZVTOPVxFinder/IZVTOP_SpatialPointFinder.h" - -namespace Trk -{ - class Track; - class RecVertex; - class TrackParticleBase; - class Vertex; -} - -namespace Rec { - class TrackParticle; -} - -namespace InDet -{ - - /** @class ZVTOP_SpatialPointFinder - - - HelperClass for Topological Vertex Finder -ZVTOP- - Calculates the spatial point, which define the region of interest, - the region where we later look for the maxima of the vertex probability - function. Since at least two of the tracks (or RecVertex and Trk::Track) - must contribute to a maximum in the vertex probability function, - we calculate for each track pair the spatial point. - The found spatial point is rejected if chi² of this point is larger as chi²_cut. - - @author Tatjana Lenz <tatjana.lenz@cern.ch> - */ - - class ZVTOP_SpatialPointFinder : public extends<AthAlgTool, IZVTOP_SpatialPointFinder> - { - public: - ZVTOP_SpatialPointFinder(const std::string&,const std::string&,const IInterface*); - - /** default destructor */ - virtual ~ZVTOP_SpatialPointFinder (); - - /** standard Athena-Algorithm method */ - virtual StatusCode initialize() override; - /** standard Athena-Algorithm method */ - virtual StatusCode finalize () override; - - virtual Trk::Vertex* findSpatialPoint(const Trk::Track* trk_1, const Trk::Track* trk_2) const override; - virtual Trk::Vertex* findSpatialPoint(const Trk::RecVertex vtx, const Trk::Track* trk_1) const override; - virtual Trk::Vertex* findSpatialPoint(const Rec::TrackParticle* trk_1, const Rec::TrackParticle* trk_2) const override; - virtual Trk::Vertex* findSpatialPoint(const Trk::RecVertex vtx, const Rec::TrackParticle* trk_1) const override; - virtual Trk::Vertex* findSpatialPoint(const Trk::TrackParticleBase* trk_1, const Trk::TrackParticleBase* trk_2) const override; - virtual Trk::Vertex* findSpatialPoint(const Trk::RecVertex vtx, const Trk::TrackParticleBase* trk_1) const override; - virtual Trk::Vertex* findSpatialPoint(const Trk::TrackParameters* perigee_1, const Trk::TrackParameters* perigee_2) const override; - virtual Trk::Vertex* findSpatialPoint(const Trk::RecVertex vtx, const Trk::TrackParameters* perigee_1) const override; - - private: - double m_chi2; - - }; -} // end of namespace - -#endif diff --git a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_Tool.h b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_Tool.h deleted file mode 100755 index fea8df678cf6b4edcb806b35a273df70ad39b2e6..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_Tool.h +++ /dev/null @@ -1,100 +0,0 @@ -/* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -*/ - -/////////////////////////////////////////////////////////////////// -// ZVTOP_Tool.h, (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// - -#ifndef INDETZVTOP_TOOL_H -#define INDETZVTOP_TOOL_H - -#include "AthenaBaseComps/AthAlgTool.h" -#include "GaudiKernel/ToolHandle.h" -#include "GaudiKernel/ServiceHandle.h" -#include "InDetRecToolInterfaces/IVertexFinder.h" -#include "xAODTracking/Vertex.h" -#include "xAODTracking/TrackParticle.h" -#include "xAODTracking/VertexContainer.h" -#include "xAODTracking/TrackParticleContainer.h" - -class IBeamCondSvc; - -namespace Trk -{ - class IVertexFitter; -} - -namespace InDet -{ - - class IZVTOP_SpatialPointFinder; - class IZVTOP_TrkProbTubeCalc; - class IZVTOP_SimpleVtxProbCalc; - - /** @class ZVTOP_Tool - - ---Topological Vertex Finder Tool --- - This tool reconstructs a set of topological vertices each - associated with an independent subset of the charged tracks. - Vertices are reconstructed by associating tracks with 3D spatial regions - according to the vertex probability function which is based on the trajectories - and position resolution of the tracks. - Docu: "A Topological Vertex Reconstruction Algorithm for Hadronic Jets" - by David J. Jackson, SLAC-PUB-7215, December 1996 - - Following properties can be set/changed via jobOptions: - - ---Input: TrackCollection - - \c TracksName: The name of the StoreGate input container from - which the tracks are read. The default is "Tracks", the container - from the legacy converters/ambiguity processor. - - ---Output: VxContainer - - \c VxCollectionOutputName: The name of the StoreGate container where the fit - results are put. default is "VxCollection". - - ---Vertex Fitter: Billoir FullVertexFitter - - \c FitRoutine: The routine which should be used for the fitting. The - default is "FullVertexFitter". - - - - @author Tatjana Lenz <tatjana.lenz@cern.ch> - */ - class ZVTOP_Tool : virtual public IVertexFinder, public AthAlgTool - { - public: - ZVTOP_Tool(const std::string&,const std::string&,const IInterface*); - - /** default destructor */ - virtual ~ZVTOP_Tool (); - - /** standard Athena-Algorithm method */ - virtual StatusCode initialize() override ; - /** standard Athena-Algorithm method */ - virtual StatusCode finalize () override ; - - using IVertexFinder::findVertex; - virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex( - const TrackCollection* trackTES) const override ; - - virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex( - const xAOD::TrackParticleContainer* trackParticles) const override; - - private: - - ToolHandle <Trk::IVertexFitter> m_iVertexFitter; - ToolHandle <InDet::IZVTOP_SpatialPointFinder> m_iSpatialPointFinder; - ToolHandle <InDet::IZVTOP_TrkProbTubeCalc> m_iTrkProbTubeCalc; - ToolHandle <InDet::IZVTOP_SimpleVtxProbCalc> m_iVtxProbCalc; - - double m_resolvingCut; - double m_resolvingStep; - double m_vtxProb_cut; - double m_trk_chi2_cut; - ServiceHandle<IBeamCondSvc> m_iBeamCondSvc; //!< pointer to the beam condition service - }; -} // end of namespace - -#endif diff --git a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_TrkPartBaseVertexState.h b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_TrkPartBaseVertexState.h deleted file mode 100644 index f8ca7238b7274d6682bf820e0fac66436498634a..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_TrkPartBaseVertexState.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef IINDETZVTOP_TRKPARTBASEVERTEXSTATE_H -#define IINDETZVTOP_TRKPARTBASEVERTEXSTATE_H - -#include "VxVertex/Vertex.h" -#include <vector> - -namespace Trk{ - class TrackParticleBase; -} - -/** - * ZVTOP_Tool helper class - * to store the full vertex/tracks & vtx_probability - * information - * @author: Tatjana Lenz <Tatjana.Lenz@cern.ch> - */ - - -namespace InDet -{ - - class ZVTOP_TrkPartBaseVertexState - { -public: - - /**Default Constructor */ - ZVTOP_TrkPartBaseVertexState(); - ZVTOP_TrkPartBaseVertexState(double& vtx_prob, Trk::Vertex& vertex, bool& beam_spot, std::vector<const Trk::TrackParticleBase*>& tracks); - - /**virtual destructor of a class*/ - virtual ~ZVTOP_TrkPartBaseVertexState(); - - /**Copy Constructor */ - ZVTOP_TrkPartBaseVertexState (const ZVTOP_TrkPartBaseVertexState& vs); //copy-constructor - ZVTOP_TrkPartBaseVertexState &operator= (const ZVTOP_TrkPartBaseVertexState &) = default; - - //(sroe): why do these return references to protected data? - double& vtx_prob(void); - - Trk::Vertex& vertex(void); - - bool& beam_spot(void); - - std::vector<const Trk::TrackParticleBase*>& tracks(void); - - inline void set_beam_spot(bool); - -protected: - //vertex probability - double m_vtx_prob; - //associated vertex - Trk::Vertex m_vertex; - bool m_beam_spot; - // associated tracks - std::vector<const Trk::TrackParticleBase*> m_tracks; -};//end of class definitions - -inline double& ZVTOP_TrkPartBaseVertexState::vtx_prob(void) - { - return m_vtx_prob; - } - -inline Trk::Vertex& ZVTOP_TrkPartBaseVertexState::vertex(void) - { - return m_vertex; - } - -inline std::vector<const Trk::TrackParticleBase*>& ZVTOP_TrkPartBaseVertexState::tracks(void) - { - return m_tracks; - } -inline bool& ZVTOP_TrkPartBaseVertexState::beam_spot(void) - { - return m_beam_spot; - } -inline void ZVTOP_TrkPartBaseVertexState::set_beam_spot(bool beam_spot) - { - m_beam_spot = beam_spot; - } -}//end of namespace definitions - -#endif diff --git a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_TrkPartVertexState.h b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_TrkPartVertexState.h deleted file mode 100644 index 748ab31f5f36e7549e47d83d7f0590af6a58f832..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_TrkPartVertexState.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef IINDETZVTOP_TRKPARTVERTEXSTATE_H -#define IINDETZVTOP_TRKPARTVERTEXSTATE_H - -#include "VxVertex/Vertex.h" -#include <vector> -namespace Rec{ - class TrackParticle; -} -/** - * ZVTOP_Tool helper class - * to store the full vertex/tracks & vtx_probability - * information - * @author: Tatjana Lenz <Tatjana.Lenz@cern.ch> - */ - - -namespace InDet -{ - - class ZVTOP_TrkPartVertexState - { -public: - - /**Default Constructor */ - ZVTOP_TrkPartVertexState(); - ZVTOP_TrkPartVertexState(double& vtx_prob, Trk::Vertex& vertex, bool& IP, std::vector<const Rec::TrackParticle*>& tracks); - - /**virtual destructor of a class*/ - virtual ~ZVTOP_TrkPartVertexState(); - - /**Copy Constructor */ - ZVTOP_TrkPartVertexState (const ZVTOP_TrkPartVertexState& vs); //copy-constructor - ZVTOP_TrkPartVertexState &operator= (const ZVTOP_TrkPartVertexState &) = default; - - double& vtx_prob(void); - - Trk::Vertex& vertex(void); - - bool& IP(void); - - std::vector<const Rec::TrackParticle*>& tracks(void); - - inline void set_IP(bool); - -protected: - //vertex probability - double m_vtx_prob; - //associated vertex - Trk::Vertex m_vertex; - bool m_IP; - // associated tracks - std::vector<const Rec::TrackParticle*> m_tracks; -};//end of class definitions - -inline double& ZVTOP_TrkPartVertexState::vtx_prob(void) - { - return m_vtx_prob; - } - -inline Trk::Vertex& ZVTOP_TrkPartVertexState::vertex(void) - { - return m_vertex; - } - -inline std::vector<const Rec::TrackParticle*>& ZVTOP_TrkPartVertexState::tracks(void) - { - return m_tracks; - } -inline bool& ZVTOP_TrkPartVertexState::IP(void) - { - return m_IP; - } -inline void ZVTOP_TrkPartVertexState::set_IP(bool IP) - { - m_IP = IP; - } -}//end of namespace definitions - -#endif diff --git a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_TrkProbTubeCalc.h b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_TrkProbTubeCalc.h deleted file mode 100755 index 46c7f67a0a6586400b8e496664d9194323c02cbb..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_TrkProbTubeCalc.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -/////////////////////////////////////////////////////////////////// -// ZVTOP_TrkProbTubeCalc.h, (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// - -#ifndef INDETZVTOP_TRKPROBTUBECALC_H -#define INDETZVTOP_TRKPROBTUBECALC_H - -#include "AthenaBaseComps/AthAlgTool.h" -#include "GaudiKernel/ToolHandle.h" -#include "InDetZVTOPVxFinder/IZVTOP_TrkProbTubeCalc.h" -#include "TrkTrack/Track.h" -#include "VxVertex/RecVertex.h" -#include"Particle/TrackParticle.h" -namespace Trk -{ - class IExtrapolator; -} -namespace InDet -{ - - /** @class ZVTOP_TrkProbTubeCalc - - ZVTOP helper class, calculates the Gaussian probability - tube for the track trajectory. - - @author Tatjana Lenz <tatjana.lenz@cern.ch> - */ - - class ZVTOP_TrkProbTubeCalc : public extends<AthAlgTool, IZVTOP_TrkProbTubeCalc> - { - public: - ZVTOP_TrkProbTubeCalc(const std::string&,const std::string&,const IInterface*); - - /** default destructor */ - virtual ~ZVTOP_TrkProbTubeCalc (); - - /** standard Athena-Algorithm method */ - virtual StatusCode initialize() override; - /** standard Athena-Algorithm method */ - virtual StatusCode finalize () override; - - virtual double calcProbTube(const Trk::Track& trk, Trk::Vertex& vec) const override; - virtual double calcProbTube(const Rec::TrackParticle& trk, Trk::Vertex& vec) const override; - virtual double calcProbTube(const Trk::TrackParticleBase& trk, Trk::Vertex& vec) const override; - virtual double calcProbTube(const Trk::Perigee* trk, Trk::Vertex& vec) const override; - virtual double calcProbTube(const Trk::RecVertex& vtx, Trk::Vertex& vec) const override; - private: - - /** member variables for algorithm properties: */ - ToolHandle< Trk::IExtrapolator > m_extrapolator; - - }; -} // end of namespace - -#endif diff --git a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_VertexState.h b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_VertexState.h deleted file mode 100755 index 82733f11edd549b4fdf97a4c9399c4072b8517d8..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/InDetZVTOPVxFinder/ZVTOP_VertexState.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef IINDETZVTOP_VERTEXSTATE_H -#define IINDETZVTOP_VERTEXSTATE_H - -#include "VxVertex/Vertex.h" -#include <vector> -/** - * ZVTOP_Tool helper class - * to store the full vertex/tracks & vtx_probability - * information - * @author: Tatjana Lenz <Tatjana.Lenz@cern.ch> - */ - - namespace Trk{ - class Track; - } - - -namespace InDet -{ - - class ZVTOP_VertexState - { -public: - - /**Default Constructor */ - ZVTOP_VertexState(); - ZVTOP_VertexState(double& vtx_prob, Trk::Vertex& vertex, bool& beam_spot, std::vector<const Trk::Track*>& tracks); - - /**virtual destructor of a class*/ - virtual ~ZVTOP_VertexState(); - - /**Copy Constructor */ - ZVTOP_VertexState (const ZVTOP_VertexState& vs); //copy-constructor - ZVTOP_VertexState &operator= (const ZVTOP_VertexState &)= default; - - double& vtx_prob(void); - - Trk::Vertex& vertex(void); - - bool& beam_spot(void); - - std::vector<const Trk::Track*>& tracks(void); - - inline void set_beam_spot(bool); - -protected: - //vertex probability - double m_vtx_prob; - //associated vertex - Trk::Vertex m_vertex; - bool m_beam_spot; - // associated tracks - std::vector<const Trk::Track*> m_tracks; -};//end of class definitions - -inline double& ZVTOP_VertexState::vtx_prob(void) - { - return m_vtx_prob; - } - -inline Trk::Vertex& ZVTOP_VertexState::vertex(void) - { - return m_vertex; - } - -inline std::vector<const Trk::Track*>& ZVTOP_VertexState::tracks(void) - { - return m_tracks; - } -inline bool& ZVTOP_VertexState::beam_spot(void) - { - return m_beam_spot; - } -inline void ZVTOP_VertexState::set_beam_spot(bool beam_spot) - { - m_beam_spot = beam_spot; - } -}//end of namespace definitions - -#endif diff --git a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/doc/packagedoc.h b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/doc/packagedoc.h deleted file mode 100644 index 21b0bb2c4dcfc2693babcc47f697992f1a619cff..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/doc/packagedoc.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/** -@page InDetZVTOPVxFinder_page InDetZVTOPVxFinder Package - -Contains: -- ZVTOP_AmbiguitySolver.cxx (dummy) <br> -- ZVTOP_SimpleVtxProbCalc.cxx (helper class, calculates vtx probability at a given point) <br> -- ZVTOP_SpatialPointFinder.cxx (helper class, seed finder for vertex candidates) <br> -- ZVTOP_Tool.cxx (main tool) <br> -- ZVTOP_TrkProbTubeCalc.cxx (helper class, calculates track probabilities at a given point) <br> -- ZVTOP_VertexState.cxx (helper class) <br> - -Documentation: David J. Jackson, Nucl.Instrum.Meth.A388: 247-253, 1997 - -@author Tatjana Lenz <tatjana.lenz@cern.ch> - -@section InDetZVTOPVxFinder_InDetZVTOPVxFinderIntro Introduction - -This AlgTool reconstructs a set of vertices and associated subset of the charged tracks, the association accords to a vertex probability function which is based on the trajectories and position resolution of the tracks. The track probability function, \f$ f_i \f$ is defined as a Gaussian tube around a track: the width is given by a track covariance (= error) matrix. The vertex probability function is \f$ \sum f_i - \frac{ \sum f_i^2}{\sum f_i} \f$. The job is to search for local maxima of the vertex probability function. So you have to calculate the vertex probability function at euch space point in detector. To reduce the number of spatial points, all possible combinations of two track pairs are build. For each pair the spatial point is calculated (see ZVTOP_SpatialPointFinder), all spatial points are candidates for a vertex. To reduce the number of vertex candidates the vertex candidate cluster are build. The tracks associated with each cluster are fitted, the vertex fitter can be set/changed via jobOptions, default Billoir FullFitter. -On the fitted VxCandidate some quality cuts can be applied. The result is stored in a VxContainer. - - - -*/ diff --git a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_AmbiguitySolver.cxx b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_AmbiguitySolver.cxx deleted file mode 100755 index 9c82d40b6f338aa86a6a8c871178bf523d794b7d..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_AmbiguitySolver.cxx +++ /dev/null @@ -1,118 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -/////////////////////////////////////////////////////////////////// -// ZVTOP_AmbiguitySolver.cxx, (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// - -#include "InDetZVTOPVxFinder/ZVTOP_AmbiguitySolver.h" -#include "InDetZVTOPVxFinder/IZVTOP_TrkProbTubeCalc.h" -#include "InDetZVTOPVxFinder/IZVTOP_SimpleVtxProbCalc.h" -#include "VxVertex/VxCandidate.h" -#include "TrkTrack/Track.h" -#include "TrkParameters/TrackParameters.h" -#include "VxVertex/VxTrackAtVertex.h" -#include <map> - -//================ Constructor ================================================= - -InDet::ZVTOP_AmbiguitySolver::ZVTOP_AmbiguitySolver(const std::string& t, - const std::string& n, - const IInterface* p ) - : - base_class(t,n,p), - m_TrkProbTubeCalc("InDet::ZVTOP_TrkProbTubeCalc"), - m_VtxProbCalc("InDet::ZVTOP_VtxProbCalc") -{ - // template for property decalration - declareProperty("TrkProbTubeCalcTool",m_TrkProbTubeCalc); - declareProperty("VtxProbCalcTool",m_VtxProbCalc); -} - -//================ Destructor ================================================= - -InDet::ZVTOP_AmbiguitySolver::~ZVTOP_AmbiguitySolver() -{} - - -//================ Initialisation ================================================= - -StatusCode InDet::ZVTOP_AmbiguitySolver::initialize() -{ - //Gaussian Probability Tube for the Track Trajectory - ATH_CHECK( m_TrkProbTubeCalc.retrieve()); - //Vertex Probability Function - ATH_CHECK( m_VtxProbCalc.retrieve() ); - ATH_MSG_DEBUG( "initialize() successful "); - return StatusCode::SUCCESS; -} - -std::vector<xAOD::Vertex*> InDet::ZVTOP_AmbiguitySolver::solveAmbiguities(std::vector<xAOD::Vertex*> VertexContainer) const -{ - std::vector<xAOD::Vertex*> newVertexContainer; - std::vector<xAOD::Vertex*>::iterator itr = VertexContainer.begin(); - std::map<double, xAOD::Vertex*> vxprob_map; - double sum_TrkProbTube = 0.; - double sum2_TrkProbTube = 0.; - for (; itr != VertexContainer.end(); ++itr){ - Amg::Vector3D pos = (*itr)->position(); - Trk::Vertex vtx_pos(pos); - std::vector<Trk::VxTrackAtVertex> trksAtVtx = (*itr)->vxTrackAtVertex(); - std::vector<Trk::VxTrackAtVertex>::iterator trk_itr = trksAtVtx.begin(); - for (; trk_itr != trksAtVtx.end(); ++trk_itr ){ - const Trk::Perigee* perigee = dynamic_cast<const Trk::Perigee*>((*trk_itr).initialPerigee()); - if (not perigee) continue; - double TrkProbTube = m_TrkProbTubeCalc->calcProbTube(perigee, vtx_pos); - sum_TrkProbTube += TrkProbTube; - sum2_TrkProbTube += (TrkProbTube * TrkProbTube); - } - double vtx_prob = m_VtxProbCalc->calcVtxProb(sum_TrkProbTube, sum2_TrkProbTube); - vxprob_map.insert(std::map<double, xAOD::Vertex*>::value_type(vtx_prob,(*itr))); - } - - std::map<double, xAOD::Vertex*>::reverse_iterator mapItr = vxprob_map.rbegin(); - std::map<double, xAOD::Vertex*> initial_perigee_pos_map; - for(; mapItr!=vxprob_map.rend(); ++mapItr){ - xAOD::Vertex* vtx = (*mapItr).second; - std::vector<Trk::VxTrackAtVertex> trkAtVtx = vtx->vxTrackAtVertex(); - std::vector<Trk::VxTrackAtVertex>::iterator trkAtVtx_Iter = trkAtVtx.begin(); - for (; trkAtVtx_Iter!= trkAtVtx.end(); ++trkAtVtx_Iter){ - const Trk::Perigee* perigee = dynamic_cast<const Trk::Perigee*>((*trkAtVtx_Iter).initialPerigee()); - if (not perigee) continue; - Amg::Vector3D pos = perigee->position(); - initial_perigee_pos_map.insert(std::map<double, xAOD::Vertex*>::value_type(pos.mag(),vtx)); - } - } - mapItr = vxprob_map.rbegin(); - for (; mapItr!= vxprob_map.rend(); ++mapItr){ - xAOD::Vertex* vtx = (*mapItr).second; - std::vector<Trk::VxTrackAtVertex> trkAtVtx = vtx->vxTrackAtVertex(); - std::vector<Trk::VxTrackAtVertex>::iterator trkAtVtx_Iter = trkAtVtx.begin(); - for (; trkAtVtx_Iter!= trkAtVtx.end(); ++trkAtVtx_Iter){ - const Trk::Perigee* perigee = dynamic_cast<const Trk::Perigee*>((*trkAtVtx_Iter).initialPerigee()); - if (not perigee) continue; - double pos_mag = perigee->position().mag(); - std::map<double, xAOD::Vertex*>::iterator pos_magItr = initial_perigee_pos_map.find(pos_mag); - if (pos_magItr != initial_perigee_pos_map.end()) { - if (vtx != (*pos_magItr).second){ - trkAtVtx.erase(trkAtVtx_Iter); - if (trkAtVtx_Iter == trkAtVtx.end()) break; - } - } - } - if (trkAtVtx.size() > 1) { - newVertexContainer.push_back(vtx); - } - } - return newVertexContainer; -} -//================ Finalisation ================================================= - -StatusCode InDet::ZVTOP_AmbiguitySolver::finalize() -{ - return StatusCode::SUCCESS; -} - -//============================================================================================ - diff --git a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_SecVtxTool.cxx b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_SecVtxTool.cxx deleted file mode 100644 index ada2747a6e096222fef76bddade3c588a86307e4..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_SecVtxTool.cxx +++ /dev/null @@ -1,689 +0,0 @@ -/* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -*/ - -/////////////////////////////////////////////////////////////////// -// ZVTOP_Tool.cxx, (c) ATLAS Detector software -// begin : 30-10-2006 -// authors : Tatjana Lenz -// email : tatjana.lenz@cern.ch -// changes : -/////////////////////////////////////////////////////////////////// - -#include "InDetZVTOPVxFinder/ZVTOP_SecVtxTool.h" -#include "TrkVertexFitterInterfaces/IVertexFitter.h" -#include "InDetZVTOPVxFinder/IZVTOP_SpatialPointFinder.h" -#include "InDetZVTOPVxFinder/IZVTOP_TrkProbTubeCalc.h" -#include "InDetZVTOPVxFinder/IZVTOP_SimpleVtxProbCalc.h" -#include "InDetZVTOPVxFinder/IZVTOP_AmbiguitySolver.h" -#include "InDetZVTOPVxFinder/ZVTOP_TrkPartBaseVertexState.h" -#include "InDetZVTOPVxFinder/ZVTOP_VertexState.h" -#include "VxVertex/Vertex.h" -#include "VxVertex/VxTrackAtVertex.h" -#include "TrkParticleBase/TrackParticleBaseCollection.h" -#include "TrkTrack/Track.h" -#include "VxSecVertex/VxSecVertexInfo.h" -#include <map> -#include <utility> -//================ Constructor ================================================= - -InDet::ZVTOP_SecVtxTool::ZVTOP_SecVtxTool(const std::string& t, - const std::string& n, - const IInterface* p ) - : - AthAlgTool(t,n,p), - m_iVertexFitter("Trk::FullVertexFitter"), - m_iSpatialPointFinder("InDet::SpatialPointFinder"), - m_iTrkProbTubeCalc("InDet::TrkProbTubeCalc"), - m_iVtxProbCalc("InDet::VtxProbCalc"), - m_iAmbiguitySolver("InDet::ZVTOP_AmbiguitySolver") -{ - // template for property declaration - declareInterface<ISecVertexInJetFinder>(this); - declareProperty("VertexFitterTool",m_iVertexFitter); - declareProperty("SpatialPointFinderTool",m_iSpatialPointFinder); - declareProperty("TrkProbTubeCalcTool",m_iTrkProbTubeCalc); - declareProperty("VtxProbCalcTool",m_iVtxProbCalc); - declareProperty("AmbiguitySolverTool",m_iAmbiguitySolver); - declareProperty("ResolvingCutValue", m_resolvingCut = 0.6); - declareProperty("ResolvingStepValue", m_resolvingStep = 0.3); - declareProperty("VtxProbCut", m_vtxProb_cut = 0.00001); - declareProperty("MaxChi2PerTrack", m_trk_chi2_cut = 5.); -} - -//================ Destructor ================================================= - -InDet::ZVTOP_SecVtxTool::~ZVTOP_SecVtxTool(){} - -//================ Initialisation ================================================= - -StatusCode InDet::ZVTOP_SecVtxTool::initialize() -{ - StatusCode sc = AlgTool::initialize(); - - msg (MSG::INFO) << name() << " initialize()" << endmsg; - if (sc.isFailure()) return sc; - - /* Retrieve Tools*/ - //SpatialPointFinder - if ( m_iSpatialPointFinder.retrieve().isFailure() ) { - msg (MSG::FATAL) << "Failed to retrieve tool " << m_iSpatialPointFinder << endmsg; - return StatusCode::FAILURE; - } msg (MSG::INFO) << "Retrieved tool " << m_iSpatialPointFinder << endmsg; - - //Gaussian Probability Tube for the Track Trajectory - if ( m_iTrkProbTubeCalc.retrieve().isFailure() ) { - msg (MSG::FATAL) << "Failed to retrieve tool " << m_iTrkProbTubeCalc<< endmsg; - return StatusCode::FAILURE; - } msg (MSG::INFO) << "Retrieved tool " << m_iTrkProbTubeCalc << endmsg; - - //Vertex Probability Function - if ( m_iVtxProbCalc.retrieve().isFailure() ) { - msg (MSG::FATAL) << "Failed to retrieve tool " << m_iVtxProbCalc<< endmsg; - return StatusCode::FAILURE; - } msg (MSG::INFO) << "Retrieved tool " << m_iVtxProbCalc << endmsg; - - //VxFitter - if ( m_iVertexFitter.retrieve().isFailure() ) { - msg (MSG::FATAL) << "Failed to retrieve tool " << m_iVertexFitter << endmsg; - return StatusCode::FAILURE; - } msg (MSG::INFO) << "Retrieved tool " << m_iVertexFitter << endmsg; - - if ( m_iAmbiguitySolver.retrieve().isFailure() ) { - msg (MSG::FATAL) << "Failed to retrieve tool " << m_iAmbiguitySolver << endmsg; - return StatusCode::FAILURE; - } msg (MSG::INFO) << "Retrieved tool " << m_iAmbiguitySolver << endmsg; - - msg (MSG::INFO) << "initialize() successful in " << name() << endmsg; - return StatusCode::SUCCESS; -} - -//================ Finalisation ================================================================= - -StatusCode InDet::ZVTOP_SecVtxTool::finalize() -{ - StatusCode sc = AlgTool::finalize(); - return sc; -} - -//=========================================================================================== -// TrackParticle -//=========================================================================================== -Trk::VxSecVertexInfo* InDet::ZVTOP_SecVtxTool::findSecVertex(const Trk::RecVertex & primaryVertex, - const TLorentzVector & jetMomentum, - const std::vector<const Trk::TrackParticleBase*> & inputTracks) const -{ - //std::vector<Trk::VxCandidate*> secVertices; --David S. - std::vector<xAOD::Vertex*> secVertices; - //std::vector<Trk::VxCandidate*> new_secVertices(0); --David S. - std::vector<xAOD::Vertex*> new_secVertices(0); - //if (msgLvl(MSG::DEBUG)) msg () << "jet momentum Et s= "<<jetMomentum.et() << endmsg; --David S. - if (msgLvl(MSG::DEBUG)) msg () << "jet momentum Et s= "<<jetMomentum.Et() << endmsg; - if (!inputTracks.empty()) { - //some variables - typedef std::vector<const Trk::TrackParticleBase*>::const_iterator TrkPartVecIter; - std::vector<const Trk::TrackParticleBase*> trkColl; // the collection of tracks, which are assigned to one spatial point - std::vector<InDet::ZVTOP_TrkPartBaseVertexState*> vtxState_org;// vector of tracks and vertices, tracks can be assigned to more than one vertex, these ambiguities will be resolved later - std::multimap<double, InDet::ZVTOP_TrkPartBaseVertexState*> vtxProb_map; - //---------------------------------------------------------------------------// - //-------step1: find spatial points & calculate vtx probabilities-------// - //--------------------------------------------------------------------------// - std::vector< std::vector<InDet::ZVTOP_TrkPartBaseVertexState*> > vertex_objects; //vector of vtx candidate & track collection pairs - if (msgLvl(MSG::DEBUG)) msg () << "step ONE search for the spatial points, number of tracks = "<<inputTracks.size() << endmsg; - for (TrkPartVecIter itr_1 = inputTracks.begin(); itr_1 != inputTracks.end()-1; itr_1++) - { - double sum_TrkProbTube = 0.; - double sum2_TrkProbTube = 0.; - double vtxProb = 0.; - // trk-trk combination - for (TrkPartVecIter itr_2 = itr_1+1; itr_2 != inputTracks.end(); itr_2++) - { - Trk::Vertex* spatialPoint; - spatialPoint = m_iSpatialPointFinder->findSpatialPoint((*itr_1),(*itr_2)); - if (spatialPoint != nullptr) - { - double TrkProbTube_1 = m_iTrkProbTubeCalc->calcProbTube(*(*itr_1),*spatialPoint); - double TrkProbTube_2 = m_iTrkProbTubeCalc->calcProbTube(*(*itr_2),*spatialPoint); - sum_TrkProbTube = TrkProbTube_1 + TrkProbTube_2; - sum2_TrkProbTube = pow(TrkProbTube_1,2.) + pow(TrkProbTube_2,2.); - if (sum_TrkProbTube != 0. ) - { - vtxProb = m_iVtxProbCalc->calcVtxProb(sum_TrkProbTube, sum2_TrkProbTube); - trkColl.push_back((*itr_1)); - trkColl.push_back((*itr_2)); - bool IP = false; - if (vtxProb > m_vtxProb_cut) vtxState_org.push_back(new InDet::ZVTOP_TrkPartBaseVertexState(vtxProb, *spatialPoint, IP, trkColl )); - trkColl.clear(); - } - } - delete spatialPoint; - } - //trk-IP combination - Trk::Vertex* spatialPoint = nullptr; - spatialPoint = m_iSpatialPointFinder->findSpatialPoint(primaryVertex,(*itr_1)); - if (spatialPoint != nullptr) - { - double IPprobTube = m_iTrkProbTubeCalc->calcProbTube(primaryVertex,*spatialPoint); - double TrkProbTube = m_iTrkProbTubeCalc->calcProbTube(*(*itr_1),*spatialPoint); - sum_TrkProbTube = IPprobTube + TrkProbTube; - sum2_TrkProbTube = pow(TrkProbTube,2.) + pow(IPprobTube,2.); - if (sum_TrkProbTube != 0. ) - { - vtxProb = m_iVtxProbCalc->calcVtxProb(sum_TrkProbTube, sum2_TrkProbTube); - trkColl.push_back((*itr_1)); - bool IP = true; - if (vtxProb > m_vtxProb_cut) vtxState_org.push_back(new InDet::ZVTOP_TrkPartBaseVertexState(vtxProb, *spatialPoint, IP, trkColl )); - trkColl.clear(); - } - } - delete spatialPoint; - } - if (msgLvl(MSG::DEBUG)) msg () << " number of spatial points = "<<vtxState_org.size()<<endmsg; - //reduce the spatial point collection - typedef std::vector<InDet::ZVTOP_TrkPartBaseVertexState*>::iterator Sp_Iter; - std::vector< InDet::ZVTOP_TrkPartBaseVertexState*> vtxState; - for (Sp_Iter itr1 = vtxState_org.begin(); itr1 != vtxState_org.end(); itr1++) - { - - if (vtxState.empty()) vtxState.push_back(*itr1); - else - { - Trk::Vertex vtx_new = (*itr1)->vertex(); - bool can_be_resolved = false; - for (Sp_Iter itr2 = vtxState.begin(); itr2 != vtxState.end(); itr2++) - { - Trk::Vertex vtx_in = (*itr2)->vertex(); - double r_diff = sqrt(pow(vtx_new.position().x(),2.) + pow(vtx_new.position().y(),2.)) - sqrt(pow(vtx_in.position().x(),2.) + pow(vtx_in.position().y(),2.)); - double z_diff = vtx_new.position().z() - vtx_in.position().z(); - if (fabs(r_diff) > 0.001 && fabs(z_diff) > 0.001 && r_diff != 0. && z_diff != 0.) can_be_resolved = true; - else - { - for (unsigned int trk_itr = 0; trk_itr < (*itr1)->tracks().size(); trk_itr++) (*itr2)->tracks().push_back((*itr1)->tracks()[trk_itr]); - can_be_resolved = false; - break; - } - } - if (can_be_resolved) vtxState.push_back(*itr1); - } - } - for (Sp_Iter itr_sort = vtxState.begin(); itr_sort!= vtxState.end(); itr_sort++) vtxProb_map.insert(std::multimap<double, InDet::ZVTOP_TrkPartBaseVertexState*>::value_type((*itr_sort)->vtx_prob(), *itr_sort)); - - -//-------------------------------------------------------------------------------// -//----step2: vertex clustering, aim: to cluster all vertices together, ----// -//----which can not be resolved. The found vertex seeds and ---------// -//----associated tracks are taken as an input for the vertex fit. --------// -//------------------------------------------------------------------------------// - - if (!vtxState.empty() ){ - if (msgLvl(MSG::DEBUG)) msg () << " step TWO vertex clustering, number of reduced vertices = "<<vtxState.size()<< endmsg; - //sort the vtxState collection, starting with a highest vtx probability - std::vector<InDet::ZVTOP_TrkPartBaseVertexState*> vtxState_sorted; - std::multimap<double, InDet::ZVTOP_TrkPartBaseVertexState*>::reverse_iterator s= vtxProb_map.rbegin(); - for (; s!=vtxProb_map.rend(); s++) { - InDet::ZVTOP_TrkPartBaseVertexState* vtx_state = (*s).second; - vtxState_sorted.push_back(vtx_state); - } - //store first element in the vertex_objects ---->vector<vector<VertexState>> - std::vector<InDet::ZVTOP_TrkPartBaseVertexState*> vtx_coll; - vtx_coll.push_back(*(vtxState_sorted.begin())); - vertex_objects.push_back(vtx_coll);//store first seed - std::vector< InDet::ZVTOP_TrkPartBaseVertexState*> vtxState_new(vtxState_sorted); //copy of the vtxState_sorted - vtxState_new.erase(vtxState_new.begin()); // without first element - //loop over vtxState_sorted - for (Sp_Iter org_itr= vtxState_sorted.begin(); org_itr != vtxState_sorted.end(); org_itr++) - { - Trk::Vertex seed = (*org_itr)->vertex(); - //found where the seed is already stored - bool vtx_is_stored = false; - unsigned int vertex_objectsPosition = 0; - for (unsigned int vertex_objectsItr = 0; vertex_objectsItr!= vertex_objects.size(); vertex_objectsItr++) - { - //stored vertices in the line vertex_objectsItr - std::vector<InDet::ZVTOP_TrkPartBaseVertexState*> stored_vertices = vertex_objects[vertex_objectsItr]; - //---->inner loop - for (unsigned int stored_vtx_itr = 0; stored_vtx_itr!= stored_vertices.size(); stored_vtx_itr++) - { - Trk::Vertex storedVtx = stored_vertices[stored_vtx_itr]->vertex(); - double diff = ((*org_itr)->vertex().position().x() - storedVtx.position().x()) + ((*org_itr)->vertex().position().y() - storedVtx.position().y()) + ((*org_itr)->vertex().position().z() - storedVtx.position().z()); - if (fabs(diff) < 0.0001) - { - vertex_objectsPosition = vertex_objectsItr; - vtx_is_stored = true; - break; // break inner loop if found - } - } - if (vtx_is_stored) break; // break outer loop if found - } - if (!vtx_is_stored) { - //if not stored - std::vector<InDet::ZVTOP_TrkPartBaseVertexState*> new_vtx_coll; - new_vtx_coll.push_back(*org_itr); - vertex_objects.push_back(new_vtx_coll); - vertex_objectsPosition = vertex_objects.size() - 1; - } - for (Sp_Iter new_itr = vtxState_new.begin(); new_itr!= vtxState_new.end(); new_itr++) - { - Trk::Vertex cand = (*new_itr)->vertex(); - //calculate the vtx prob function for this seed - std::multimap<double, Trk::Vertex > vtx_prob_coll; - vtx_prob_coll.insert(std::multimap<double, Trk::Vertex >::value_type((*new_itr)->vtx_prob(),(*new_itr)->vertex())); - vtx_prob_coll.insert(std::multimap<double, Trk::Vertex >::value_type((*org_itr)->vtx_prob(),(*org_itr)->vertex())); - for (double alpha = m_resolvingStep; alpha <1.; alpha += m_resolvingStep) - { - Trk::Vertex SP_line = Trk::Vertex((*org_itr)->vertex().position() + alpha*((*new_itr)->vertex().position() - (*org_itr)->vertex().position())); - double sum_TrkProbTube = 0.; - double sum2_TrkProbTube = 0.; - for (TrkPartVecIter trk_itr = inputTracks.begin(); trk_itr != inputTracks.end(); trk_itr++) - { - double TrkProbTube = 0.; - TrkProbTube = m_iTrkProbTubeCalc->calcProbTube(*(*trk_itr),SP_line); - sum_TrkProbTube += TrkProbTube; - sum2_TrkProbTube += pow(TrkProbTube,2.); - } - double IPprobTube = m_iTrkProbTubeCalc->calcProbTube(primaryVertex,SP_line); - sum_TrkProbTube += IPprobTube; - sum2_TrkProbTube += pow(IPprobTube,2.); - double vtx_prob = m_iVtxProbCalc->calcVtxProb(sum_TrkProbTube, sum2_TrkProbTube); - vtx_prob_coll.insert(std::multimap<double, Trk::Vertex >::value_type(vtx_prob, SP_line)); - } - double vtx_prob_ratio = (*vtx_prob_coll.begin()).first/(*new_itr)->vtx_prob(); - if (vtx_prob_ratio >= m_resolvingCut) { - //check if the vertices can be resolved - vertex_objects[vertex_objectsPosition].push_back(*new_itr); - vtxState_new.erase(new_itr); - if (new_itr != vtxState_new.end()) --new_itr; - if (new_itr == vtxState_new.end()) break; - } - } - }//loop over orig reduced coll - }//if spatial point collection size > 0 - - - //--------------------------------------------------------------------------------// - //--------------------step3: call vertex fitter----------------------------------// - //--------------------------------------------------------------------------------// - - if (msgLvl(MSG::DEBUG)) msg () << " step THREE, vertex fit, vertex_objects size = "<<vertex_objects.size()<< endmsg; - //std::vector<Trk::VxCandidate* > theVxContainer; --David S. - std::vector<xAOD::Vertex*> theVertexContainer; - //prepare trk coll --> remove double tracks - std::vector<std::vector<InDet::ZVTOP_TrkPartBaseVertexState*> >::iterator vtx_itr = vertex_objects.begin(); - for (; vtx_itr!= vertex_objects.end(); vtx_itr++) - { - bool with_IP = false; - std::vector <const Trk::TrackParticleBase*> trk_coll(0); //--->trk_coll for the fit - std::vector<InDet::ZVTOP_TrkPartBaseVertexState*>::iterator itr = (*vtx_itr).begin(); - trk_coll.push_back((*itr)->tracks()[0]); - for (; itr != (*vtx_itr).end(); itr++) - { - for ( std::vector <const Trk::TrackParticleBase*>::iterator vs_itr = ((*itr)->tracks()).begin(); vs_itr!= ((*itr)->tracks()).end(); vs_itr++) - { - if (msgLvl(MSG::DEBUG)) msg () <<"old trk coll size = "<<trk_coll.size()<<", new track = "<<(*vs_itr)<<endmsg; - bool found = false; - for (std::vector <const Trk::TrackParticleBase*>::iterator trk_itr = trk_coll.begin(); trk_itr!= trk_coll.end(); trk_itr++) { - if (*vs_itr == *trk_itr) found = true; - } - if (!found) trk_coll.push_back(*vs_itr); - } - if ((*itr)->beam_spot()) with_IP = true; - if (msgLvl(MSG::DEBUG)) msg () <<"new track collection size = "<<trk_coll.size()<<endmsg; - } - //call the fitter - //Trk::VxCandidate * myVxCandidate(0); --David S. - xAOD::Vertex * myxAODVertex(nullptr); - //const Amg::Vector3D p(0.,0.,0.); --David S. - const Amg::Vector3D startingPoint(0.,0.,0.); - //Trk::Vertex startingPoint(p); --David S. - //if (!with_IP) myVxCandidate = m_iVertexFitter->fit(trk_coll,startingPoint); --David S. - if (!with_IP) myxAODVertex = m_iVertexFitter->fit(trk_coll,startingPoint); - bool bad_chi2 = true; - //if (myVxCandidate) --David S. - if (myxAODVertex) - { - while (bad_chi2) - { - //if (msgLvl(MSG::DEBUG)) msg () <<"rec Vertex = "<<myVxCandidate->recVertex().position()<<endmsg; --David S. - if (msgLvl(MSG::DEBUG)) msg () << "Vertex pos = " << myxAODVertex->position() << endmsg; - //std::vector< Trk::VxTrackAtVertex*> trkAtVtx = *(myVxCandidate->vxTrackAtVertex()); --David S. - std::vector<Trk::VxTrackAtVertex> trkAtVtx = myxAODVertex->vxTrackAtVertex(); - //std::vector< Trk::VxTrackAtVertex*>::iterator trkAtVtx_Iter = trkAtVtx.begin(); --David S. - std::vector<Trk::VxTrackAtVertex>::iterator trkAtVtx_Iter = trkAtVtx.begin(); - std::vector< const Trk::TrackParticleBase*>::iterator trk_Iter = trk_coll.begin(); - double largest_chi2 = 0.; - std::vector< const Trk::TrackParticleBase*>::iterator index; - for (; trkAtVtx_Iter!= trkAtVtx.end(); trkAtVtx_Iter++) - { - double chi2 = (*trkAtVtx_Iter).trackQuality().chiSquared(); - if (chi2 > largest_chi2) { - largest_chi2 = chi2; - index = trk_Iter; - } - trk_Iter++; - } - if (largest_chi2 > m_trk_chi2_cut) - { - if (trk_coll.size() < 3) break; - - trk_coll.erase(index); - if (trk_coll.size() >= 2) { - //if (myVxCandidate!=0) { delete myVxCandidate; myVxCandidate=0; } --David S. - if (myxAODVertex!=nullptr) { delete myxAODVertex; myxAODVertex=nullptr; } - //myVxCandidate = m_iVertexFitter->fit(trk_coll, startingPoint); --David S. - myxAODVertex = m_iVertexFitter->fit(trk_coll, startingPoint); - } - //if (myVxCandidate == 0) break; --David S. - if (myxAODVertex == nullptr) break; - - } else bad_chi2 = false; - } - } - //if (myVxCandidate && bad_chi2 == false) secVertices.push_back(myVxCandidate); --David S. - if (myxAODVertex && !bad_chi2) secVertices.push_back(myxAODVertex); - } - new_secVertices = m_iAmbiguitySolver->solveAmbiguities(secVertices); - if (msgLvl(MSG::DEBUG)) msg () <<"vertex container size = "<<secVertices.size()<<endmsg; - for (Sp_Iter iter = vtxState_org.begin(); iter != vtxState_org.end(); iter++) delete *iter; - - } else { - if (msgLvl(MSG::DEBUG)) msg () <<"No tracks in this event, provide to the next event" << endmsg; - } - - return new Trk::VxSecVertexInfo(secVertices); -} - -///////////////////////////////////////////////////////////////////////////////////////// -//for xAOD::IParticle --David S. -//Added purely to satisfy new inheritance in ISecVertexInJetFinder, not yet implemented -///////////////////////////////////////////////////////////////////////////////////////// -Trk::VxSecVertexInfo* InDet::ZVTOP_SecVtxTool::findSecVertex(const xAOD::Vertex & /*primaryVertex*/, const TLorentzVector & /*jetMomentum*/,const std::vector<const xAOD::IParticle*> & /*inputTracks*/) const { - - if(msgLvl(MSG::DEBUG)){ - msg(MSG::DEBUG) << "No ZVTOP_SecVtxTool implementation for xAOD::IParticle" << endmsg; - msg(MSG::DEBUG) << "Returning null VxSecVertexInfo*" << endmsg; - } - - Trk::VxSecVertexInfo* returnInfo(nullptr); - return returnInfo; - -} - -//////////////////////////////////////////////////////////// -//for Trk::Track -/////////////////////////////////////////////////////////// -Trk::VxSecVertexInfo* InDet::ZVTOP_SecVtxTool::findSecVertex(const Trk::RecVertex & primaryVertex,const TLorentzVector & jetMomentum, const std::vector<const Trk::Track*> & inputTracks) const -{ - //std::vector<Trk::VxCandidate*> secVertices; --David S. - std::vector<xAOD::Vertex*> secVertices; - //if (msgLvl(MSG::DEBUG)) msg () << "jet momentum Et = "<<jetMomentum.et() << endmsg; --David S. - if (msgLvl(MSG::DEBUG)) msg () << "jet momentum Et = "<<jetMomentum.Et() << endmsg; - if (!inputTracks.empty()) { - //some variables - typedef std::vector<const Trk::Track*>::const_iterator TrackDataVecIter; - std::vector<const Trk::Track*> trkColl(0); // the collection of tracks, which are assigned to one spatial point - std::vector<InDet::ZVTOP_VertexState*> vtxState_org(0);// vector of tracks and vertices, tracks can be assigned to more than one vertex, these ambiguities will be resolved later - std::multimap<double, InDet::ZVTOP_VertexState*> vtxProb_map; - //---------------------------------------------------------------------------// - //-------step1: find spatial points & calculate vtx probabilities-------// - //--------------------------------------------------------------------------// - - std::vector< std::vector<InDet::ZVTOP_VertexState*> > vertex_objects(0); //vector of vtx candidate & track collection pairs - - if (msgLvl(MSG::DEBUG)) msg () << "step ONE search for the spatial points, number of tracks = "<<inputTracks.size() << endmsg; - for (TrackDataVecIter itr_1 = inputTracks.begin(); itr_1 != inputTracks.end()-1; itr_1++) - { - double sum_TrkProbTube = 0.; - double sum2_TrkProbTube = 0.; - double vtxProb = 0.; - // trk-trk combination - for (TrackDataVecIter itr_2 = itr_1+1; itr_2 != inputTracks.end(); itr_2++) - { - Trk::Vertex* spatialPoint; - spatialPoint = m_iSpatialPointFinder->findSpatialPoint((*itr_1),(*itr_2)); - if (spatialPoint != nullptr) - { - double TrkProbTube_1 = m_iTrkProbTubeCalc->calcProbTube(*(*itr_1),*spatialPoint); - double TrkProbTube_2 = m_iTrkProbTubeCalc->calcProbTube(*(*itr_2),*spatialPoint); - sum_TrkProbTube = TrkProbTube_1 + TrkProbTube_2; - sum2_TrkProbTube = pow(TrkProbTube_1,2.) + pow(TrkProbTube_2,2.); - if (sum_TrkProbTube != 0. ) - { - vtxProb = m_iVtxProbCalc->calcVtxProb(sum_TrkProbTube, sum2_TrkProbTube); - trkColl.push_back((*itr_1)); - trkColl.push_back((*itr_2)); - bool IP = false; - if (vtxProb > m_vtxProb_cut) vtxState_org.push_back(new InDet::ZVTOP_VertexState(vtxProb, *spatialPoint, IP, trkColl )); - trkColl.clear(); - } - } - delete spatialPoint; - } - //trk-IP combination - Trk::Vertex* spatialPoint = nullptr; - spatialPoint = m_iSpatialPointFinder->findSpatialPoint(primaryVertex,(*itr_1)); - if (spatialPoint != nullptr) - { - double BeamProbTube = m_iTrkProbTubeCalc->calcProbTube(primaryVertex,*spatialPoint); - double TrkProbTube = m_iTrkProbTubeCalc->calcProbTube(*(*itr_1),*spatialPoint); - sum_TrkProbTube = BeamProbTube + TrkProbTube; - sum2_TrkProbTube = pow(TrkProbTube,2.) + pow(BeamProbTube,2.); - if (sum_TrkProbTube != 0. ) - { - vtxProb = m_iVtxProbCalc->calcVtxProb(sum_TrkProbTube, sum2_TrkProbTube); - trkColl.push_back((*itr_1)); - bool IP = true; - if (vtxProb > m_vtxProb_cut) vtxState_org.push_back(new InDet::ZVTOP_VertexState(vtxProb, *spatialPoint, IP, trkColl )); - trkColl.clear(); - } - } - delete spatialPoint; - } - if (msgLvl(MSG::DEBUG)) msg () << " number of spatial points = "<<vtxState_org.size()<<endmsg; - //reduce the spatial point collection - typedef std::vector<InDet::ZVTOP_VertexState*>::iterator Sp_Iter; - std::vector< InDet::ZVTOP_VertexState*> vtxState; - for (Sp_Iter itr1 = vtxState_org.begin(); itr1 != vtxState_org.end(); itr1++) - { - - if (vtxState.empty()) vtxState.push_back(*itr1); - else { - Trk::Vertex vtx_new = (*itr1)->vertex(); - bool can_be_resolved = false; - for (Sp_Iter itr2 = vtxState.begin(); itr2 != vtxState.end(); itr2++) - { - Trk::Vertex vtx_in = (*itr2)->vertex(); - double r_diff = sqrt(pow(vtx_new.position().x(),2.) + pow(vtx_new.position().y(),2.)) - sqrt(pow(vtx_in.position().x(),2.) + pow(vtx_in.position().y(),2.)); - double z_diff = vtx_new.position().z() - vtx_in.position().z(); - if (fabs(r_diff) > 0.001 && fabs(z_diff) > 0.001 && r_diff != 0. && z_diff != 0.) can_be_resolved = true; - else - { - for (unsigned int trk_itr = 0; trk_itr < (*itr1)->tracks().size(); trk_itr++) (*itr2)->tracks().push_back((*itr1)->tracks()[trk_itr]); - can_be_resolved = false; - break; - } - } - if (can_be_resolved) vtxState.push_back(*itr1); - } - } - for (Sp_Iter itr_sort = vtxState.begin(); itr_sort!= vtxState.end(); itr_sort++) vtxProb_map.insert(std::multimap<double, InDet::ZVTOP_VertexState*>::value_type((*itr_sort)->vtx_prob(), *itr_sort)); - - - //-------------------------------------------------------------------------------// - //----step2: vertex clustering, aim: to cluster all vertices together, ----// - //----which can not be resolved. The found vertex seeds and ---------// - //----associated tracks are taken as an input for the vertex fit. --------// - //------------------------------------------------------------------------------// - - - if (!vtxState.empty() ){ - if (msgLvl(MSG::DEBUG)) msg () << " step TWO vertex clustering, number of reduced vertices = "<<vtxState.size()<< endmsg; - //sort the vtxState collection, starting with a highest vtx probability - std::vector<InDet::ZVTOP_VertexState*> vtxState_sorted; - unsigned int IP_counter = 0; - std::multimap<double, InDet::ZVTOP_VertexState*>::reverse_iterator s= vtxProb_map.rbegin(); - for (; s!=vtxProb_map.rend(); s++) { - InDet::ZVTOP_VertexState* vtx_state = (*s).second; - if (vtx_state->beam_spot()) IP_counter += 1; - if (IP_counter > 1) vtx_state->set_beam_spot(false); - vtxState_sorted.push_back(vtx_state); - } - //store first element in the vertex_objects ---->vector<vector<VertexState>> - std::vector<InDet::ZVTOP_VertexState*> vtx_coll; - vtx_coll.push_back(*(vtxState_sorted.begin())); - vertex_objects.push_back(vtx_coll);//store first seed - std::vector< InDet::ZVTOP_VertexState*> vtxState_new(vtxState_sorted); //copy of the vtxState_sorted - vtxState_new.erase(vtxState_new.begin()); // without first element - //loop over vtxState_sorted - for (Sp_Iter org_itr= vtxState_sorted.begin(); org_itr != vtxState_sorted.end(); org_itr++) - { - Trk::Vertex seed = (*org_itr)->vertex(); - //found where the seed is already stored - bool vtx_is_stored = false; - unsigned int vertex_objectsPosition = 0; - for (unsigned int vertex_objectsItr = 0; vertex_objectsItr!= vertex_objects.size(); vertex_objectsItr++) - { - //stored vertices in the line vertex_objectsItr - std::vector<InDet::ZVTOP_VertexState*> stored_vertices = vertex_objects[vertex_objectsItr]; - //---->inner loop - for (unsigned int stored_vtx_itr = 0; stored_vtx_itr!= stored_vertices.size(); stored_vtx_itr++) - { - Trk::Vertex storedVtx = stored_vertices[stored_vtx_itr]->vertex(); - double diff = ((*org_itr)->vertex().position().x() - storedVtx.position().x()) + ((*org_itr)->vertex().position().y() - storedVtx.position().y()) + ((*org_itr)->vertex().position().z() - storedVtx.position().z()); - if (fabs(diff) < 0.0001) - { - vertex_objectsPosition = vertex_objectsItr; - vtx_is_stored = true; - break; // break inner loop if found - } - } - if (vtx_is_stored) break; // break outer loop if found - } - if (!vtx_is_stored) { - //if not stored - std::vector<InDet::ZVTOP_VertexState*> new_vtx_coll; - new_vtx_coll.push_back(*org_itr); - vertex_objects.push_back(new_vtx_coll); - vertex_objectsPosition = vertex_objects.size() - 1; - } - for (Sp_Iter new_itr = vtxState_new.begin(); new_itr!= vtxState_new.end(); new_itr++) - { - Trk::Vertex cand = (*new_itr)->vertex(); - //calculate the vtx prob function for this seed - std::multimap<double, Trk::Vertex > vtx_prob_coll; - vtx_prob_coll.insert(std::multimap<double, Trk::Vertex >::value_type((*new_itr)->vtx_prob(),(*new_itr)->vertex())); - vtx_prob_coll.insert(std::multimap<double, Trk::Vertex >::value_type((*org_itr)->vtx_prob(),(*org_itr)->vertex())); - for (double alpha = m_resolvingStep; alpha <1.; alpha += m_resolvingStep) - { - Trk::Vertex SP_line = Trk::Vertex((*org_itr)->vertex().position() + alpha*((*new_itr)->vertex().position() - (*org_itr)->vertex().position())); - double sum_TrkProbTube = 0.; - double sum2_TrkProbTube = 0.; - for (TrackDataVecIter trk_itr = inputTracks.begin(); trk_itr != inputTracks.end(); trk_itr++) - { - double TrkProbTube = 0.; - TrkProbTube = m_iTrkProbTubeCalc->calcProbTube(*(*trk_itr),SP_line); - sum_TrkProbTube += TrkProbTube; - sum2_TrkProbTube += pow(TrkProbTube,2.); - } - double BeamProbTube = m_iTrkProbTubeCalc->calcProbTube(primaryVertex,SP_line); - sum_TrkProbTube += BeamProbTube; - sum2_TrkProbTube += pow(BeamProbTube,2.); - double vtx_prob = m_iVtxProbCalc->calcVtxProb(sum_TrkProbTube, sum2_TrkProbTube); - vtx_prob_coll.insert(std::multimap<double, Trk::Vertex >::value_type(vtx_prob, SP_line)); - } - double vtx_prob_ratio = (*vtx_prob_coll.begin()).first/(*new_itr)->vtx_prob(); - if (vtx_prob_ratio >= m_resolvingCut) { - //check if the vertices can be resolved - vertex_objects[vertex_objectsPosition].push_back(*new_itr); - vtxState_new.erase(new_itr); - if (new_itr != vtxState_new.end()) --new_itr; - if (new_itr == vtxState_new.end()) break; - } - } - }//loop over orig reduced coll - }//if spatial point collection size > 0 - - - //--------------------------------------------------------------------------------// - //--------------------step3: call vertex fitter----------------------------------// - //--------------------------------------------------------------------------------// - - if (msgLvl(MSG::DEBUG)) msg () << " step THREE, vertex fit, vertex_objects size = "<<vertex_objects.size()<< endmsg; - //std::vector<Trk::VxCandidate* > theVxContainer; --David S. - std::vector<xAOD::Vertex*> theVertexContainer; - //prepare trk coll --> remove double tracks - std::vector<std::vector<InDet::ZVTOP_VertexState*> >::iterator vtx_itr = vertex_objects.begin(); - for (; vtx_itr!= vertex_objects.end(); vtx_itr++) - { - bool with_IP = false; - std::vector <const Trk::Track*> trk_coll(0); //--->trk_coll for the fit - std::vector<InDet::ZVTOP_VertexState*>::iterator itr = (*vtx_itr).begin(); - trk_coll.push_back((*itr)->tracks()[0]); - for (; itr != (*vtx_itr).end(); itr++) - { - for ( std::vector <const Trk::Track*>::iterator vs_itr = ((*itr)->tracks()).begin(); vs_itr!= ((*itr)->tracks()).end(); vs_itr++) - { - bool found = false; - for (std::vector <const Trk::Track*>::iterator trk_itr = trk_coll.begin(); trk_itr!= trk_coll.end(); trk_itr++) { - if (*vs_itr == *trk_itr) found = true; - } - if (!found) trk_coll.push_back(*vs_itr); - } - if ((*itr)->beam_spot()) with_IP = true; - } - //call the fitter - //Trk::VxCandidate * myVxCandidate(0); --David S. - xAOD::Vertex * myxAODVertex(nullptr); - //if (!with_IP) myVxCandidate = m_iVertexFitter->fit(trk_coll); --David S. - if (!with_IP) myxAODVertex = m_iVertexFitter->fit(trk_coll); - bool bad_chi2 = true; - //if (myVxCandidate) { --David S. - if (myxAODVertex) { - while (bad_chi2) - { - //std::vector< Trk::VxTrackAtVertex*> trkAtVtx = *(myVxCandidate->vxTrackAtVertex()); --David S. - std::vector<Trk::VxTrackAtVertex> trkAtVtx = myxAODVertex->vxTrackAtVertex(); - //std::vector< Trk::VxTrackAtVertex*>::iterator trkAtVtx_Iter = trkAtVtx.begin(); --David S. - std::vector<Trk::VxTrackAtVertex>::iterator trkAtVtx_Iter = trkAtVtx.begin(); - std::vector< const Trk::Track*>::iterator trk_Iter = trk_coll.begin(); - double largest_chi2 = 0.; - std::vector< const Trk::Track*>::iterator index; - for (; trkAtVtx_Iter!= trkAtVtx.end(); trkAtVtx_Iter++) - { - double chi2 = (*trkAtVtx_Iter).trackQuality().chiSquared(); - if (chi2 > largest_chi2) { - largest_chi2 = chi2; - index = trk_Iter; - } - trk_Iter++; - } - if (largest_chi2 > m_trk_chi2_cut) - { - if (trk_coll.size() < 3) break; - - trk_coll.erase(index); - if (trk_coll.size() >= 2) { - //if (myVxCandidate!=0) { delete myVxCandidate; myVxCandidate=0; } --David S. - if (myxAODVertex!=nullptr) { delete myxAODVertex; myxAODVertex=nullptr; } - //myVxCandidate = m_iVertexFitter->fit(trk_coll); --David S. - myxAODVertex = m_iVertexFitter->fit(trk_coll); - } - //if (myVxCandidate == 0) break; --David S. - if (myxAODVertex == nullptr) break; - - } else bad_chi2 = false; - } - } - //if (myVxCandidate && bad_chi2 == false) secVertices.push_back(myVxCandidate); --David S. - if (myxAODVertex && !bad_chi2) secVertices.push_back(myxAODVertex); - } - if (msgLvl(MSG::DEBUG)) msg () <<"vertex container size = "<<secVertices.size()<<endmsg; - for (Sp_Iter iter = vtxState_org.begin(); iter != vtxState_org.end(); iter++) delete *iter; - } else { - if (msgLvl(MSG::DEBUG)) msg () <<"No tracks in this event, provide to the next event" << endmsg; - } - - return new Trk::VxSecVertexInfo(secVertices); - - -} - diff --git a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_SimpleVtxProbCalc.cxx b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_SimpleVtxProbCalc.cxx deleted file mode 100755 index 272566468230d2a4d46582183b4cabbbd2111c58..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_SimpleVtxProbCalc.cxx +++ /dev/null @@ -1,52 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -/////////////////////////////////////////////////////////////////// -// ZVTOP_SimpleVtxProbCalc.cxx, (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// - -#include "InDetZVTOPVxFinder/ZVTOP_SimpleVtxProbCalc.h" - -//================ Constructor ================================================= - -InDet::ZVTOP_SimpleVtxProbCalc::ZVTOP_SimpleVtxProbCalc(const std::string& t, - const std::string& n, - const IInterface* p ) - : - base_class(t,n,p) -{ - // template for property decalration - //declareProperty("PropertyName", m_propertyName); -} - -//================ Destructor ================================================= - -InDet::ZVTOP_SimpleVtxProbCalc::~ZVTOP_SimpleVtxProbCalc() -{} - - -//================ Initialisation ================================================= - -StatusCode InDet::ZVTOP_SimpleVtxProbCalc::initialize() -{ - ATH_CHECK( AlgTool::initialize() ); - ATH_MSG_INFO ( "initialize() successful in " << name() ); - return StatusCode::SUCCESS; -} - -//================ Finalisation ================================================= - -StatusCode InDet::ZVTOP_SimpleVtxProbCalc::finalize() -{ - return AlgTool::finalize(); -} - -//============================================================================================ -double InDet::ZVTOP_SimpleVtxProbCalc::calcVtxProb(double & trk_func_sum, double & trk_func_sum2) const -{ - double vtx_prob = 0.; - if (trk_func_sum != 0.) vtx_prob = trk_func_sum - trk_func_sum2/trk_func_sum; - return vtx_prob; -} - diff --git a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_SlowSpatialPointFinder.cxx b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_SlowSpatialPointFinder.cxx deleted file mode 100644 index ee93309594b1b7046ef75f3c941dd0986ecb0101..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_SlowSpatialPointFinder.cxx +++ /dev/null @@ -1,255 +0,0 @@ -/* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -*/ - -/////////////////////////////////////////////////////////////////// -// ZVTOP_SpatialPointFinder.cxx, (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// - -#include "InDetZVTOPVxFinder/ZVTOP_SlowSpatialPointFinder.h" -#include "TrkParameters/TrackParameters.h" -#include "VxVertex/Vertex.h" -#include "Particle/TrackParticle.h" -#include "EventPrimitives/EventPrimitives.h" -#include "VxVertex/LinearizedTrack.h" -#include "TrkVertexFitterInterfaces/IVertexLinearizedTrackFactory.h" - -//================ Constructor ================================================= - -InDet::ZVTOP_SlowSpatialPointFinder::ZVTOP_SlowSpatialPointFinder(const std::string& t, const std::string& n, const IInterface* p ) - : - base_class(t,n,p) -{ - // template for property declaration - declareProperty("Chi2_cut_value", m_chi2); - declareProperty ( "LinearizedTrackFactory", m_linFactory ); -} - -//================ Destructor ================================================= - -InDet::ZVTOP_SlowSpatialPointFinder::~ZVTOP_SlowSpatialPointFinder() -{} - - -//================ Initialisation ================================================= - -StatusCode InDet::ZVTOP_SlowSpatialPointFinder::initialize() -{ - - StatusCode sc = AlgTool::initialize(); - - if (sc.isFailure()) return sc; - // get tool svc - if(m_linFactory.retrieve().isFailure()) - { - msg (MSG::ERROR) <<"Could not find ToolSvc."<<endmsg; - return sc; - } msg (MSG::INFO) << "Retrieved tool " << m_linFactory << endmsg; - - msg (MSG::INFO) << "initialize() successful in " << name() << endmsg; - return StatusCode::SUCCESS; -} - -//================ Finalisation ================================================= - -StatusCode InDet::ZVTOP_SlowSpatialPointFinder::finalize() -{ - StatusCode sc = AlgTool::finalize(); - return sc; -} -//============================================================================================ -Trk::Vertex* InDet::ZVTOP_SlowSpatialPointFinder::findSpatialPoint(const Trk::Track* trk_1, const Trk::Track* trk_2) const -{ - const Trk::TrackParameters* perigee_1(dynamic_cast<const Trk::TrackParameters*>(trk_1->perigeeParameters())); - const Trk::TrackParameters* perigee_2(dynamic_cast<const Trk::TrackParameters*>(trk_2->perigeeParameters())); - if (!perigee_1 | !perigee_2) { - if (msgLvl(MSG::VERBOSE)) msg() << "Dynamic cast to MeasuredPerigee failed. Skipping this pair" << endmsg; - return nullptr; - } - Trk::Vertex* vertex = findSpatialPoint(perigee_1, perigee_2); - return vertex; - //if measured perigee -} - -//============================================================================================ - -Trk::Vertex* InDet::ZVTOP_SlowSpatialPointFinder::findSpatialPoint(const Trk::RecVertex vtx, const Trk::Track* trk_1) const -{ - const Trk::TrackParameters *perigee_1(dynamic_cast<const Trk::TrackParameters*>(trk_1->perigeeParameters())); - if (!perigee_1) { - if (msgLvl(MSG::VERBOSE)) msg() << "Dynamic cast to MeasuredPerigee failed. Skipping this pair" << endmsg; - return nullptr; - } - //we need Trk::Vertex - Trk::Vertex* vertex = findSpatialPoint(vtx, perigee_1); - return vertex; - -} - -//============================================================================================ -Trk::Vertex* InDet::ZVTOP_SlowSpatialPointFinder::findSpatialPoint(const Rec::TrackParticle* trk_1, const Rec::TrackParticle* trk_2) const -{ - const Trk::TrackParameters* perigee_1(trk_1->measuredPerigee()); - const Trk::TrackParameters* perigee_2(trk_2->measuredPerigee()); - if (!perigee_1 | !perigee_2) { - if (msgLvl(MSG::VERBOSE)) msg() << "Dynamic cast to MeasuredPerigee failed. Skipping this pair" << endmsg; - return nullptr; - } - //we need Trk::Vertex - Trk::Vertex* vertex = findSpatialPoint(perigee_1, perigee_2); - return vertex; - //if measured perigee -} - -//============================================================================================ -Trk::Vertex* InDet::ZVTOP_SlowSpatialPointFinder::findSpatialPoint(const Trk::RecVertex vtx, const Rec::TrackParticle* trk_1) const -{ - const Trk::TrackParameters* perigee_1(trk_1->measuredPerigee()); - if (!perigee_1) { - if (msgLvl(MSG::VERBOSE)) msg() << "Dynamic cast to MeasuredPerigee failed. Skipping this pair" << endmsg; - return nullptr; - } - Trk::Vertex* vertex = findSpatialPoint(vtx, perigee_1); - return vertex; - -} - -//============================================================================================ -Trk::Vertex* InDet::ZVTOP_SlowSpatialPointFinder::findSpatialPoint(const Trk::TrackParticleBase* trk_1, const Trk::TrackParticleBase* trk_2) const -{ - const Trk::TrackParameters* perigee_1 = dynamic_cast<const Trk::TrackParameters*>(&(trk_1)->definingParameters()); - const Trk::TrackParameters* perigee_2 = dynamic_cast<const Trk::TrackParameters*>(&(trk_2)->definingParameters()); - if (!perigee_1 | !perigee_2) { - if (msgLvl(MSG::VERBOSE)) msg() << "Dynamic cast to MeasuredPerigee failed. Skipping this pair" << endmsg; - return nullptr; - } - //we need Trk::Vertex - Trk::Vertex* vertex = findSpatialPoint(perigee_1, perigee_2); - return vertex; - //if measured perigee -} -//============================================================================================ -Trk::Vertex* InDet::ZVTOP_SlowSpatialPointFinder::findSpatialPoint(const Trk::RecVertex vtx, const Trk::TrackParticleBase* trk_1) const -{ - const Trk::TrackParameters* perigee_1 = dynamic_cast<const Trk::TrackParameters*>(&(trk_1)->definingParameters()); - if (!perigee_1) { - if (msgLvl(MSG::VERBOSE)) msg() << "Dynamic cast to MeasuredPerigee failed. Skipping this pair" << endmsg; - return nullptr; - } - Trk::Vertex* vertex = findSpatialPoint(vtx, perigee_1); - return vertex; - -} - -//============================================================================================= - -Trk::Vertex* InDet::ZVTOP_SlowSpatialPointFinder::findSpatialPoint(const Trk::TrackParameters* perigee_1, const Trk::TrackParameters* perigee_2) const -{ - Amg::Vector3D spatialPoint; - //we need Trk::Vertex - double chi2(0.); - const Amg::Vector3D lin_point(0.,0.,0.); // we start our linearization always at ATLAS origin! - Trk::Vertex linPoint(lin_point); - for (unsigned int i = 0; i < 3; i++){ - Trk::LinearizedTrack* linTrack1 = m_linFactory->linearizedTrack (perigee_1, linPoint.position() ); - Trk::LinearizedTrack* linTrack2 = m_linFactory->linearizedTrack (perigee_2, linPoint.position() ); - if (linTrack1 && linTrack2) - { - Amg::Vector3D locXpVec_1 = linTrack1->expectedPositionAtPCA(); - locXpVec_1[0] = locXpVec_1[0] - linPoint.position()[0]; - locXpVec_1[1] = locXpVec_1[1] - linPoint.position()[1]; - locXpVec_1[2] = locXpVec_1[2] - linPoint.position()[2]; - - Amg::Vector3D locXpVec_2 = linTrack2->expectedPositionAtPCA(); - locXpVec_2[0] = locXpVec_2[0] - linPoint.position()[0]; - locXpVec_2[1] = locXpVec_2[1] - linPoint.position()[1]; - locXpVec_2[2] = locXpVec_2[2] - linPoint.position()[2]; - - AmgMatrix(2,2) billoirCovMat_1 = linTrack1->expectedCovarianceAtPCA().block<2,2>(0,0); - AmgMatrix(2,2) billoirCovMat_2 = linTrack2->expectedCovarianceAtPCA().block<2,2>(0,0); - AmgMatrix(2,2) billoirWeightMat_1 = billoirCovMat_1.inverse().eval(); - AmgMatrix(2,2) billoirWeightMat_2 = billoirCovMat_2.inverse().eval(); - AmgMatrix(3,3) DtWD_sum; - Amg::Vector3D DtWDx_sum; - AmgMatrix(3,3) DtWD_1; - AmgMatrix(3,3) DtWD_2; - // D matrix for d0 and z0 - AmgMatrix(2,3) D_1 = linTrack1->positionJacobian().block<2,3>(0,0); - AmgMatrix(2,3) D_2 = linTrack2->positionJacobian().block<2,3>(0,0); - // Calculate DtWD and DtWD*x and sum them - DtWD_1 = D_1.transpose()*billoirWeightMat_1*D_1; - DtWD_2 = D_2.transpose()*billoirWeightMat_2*D_2; - DtWD_sum = DtWD_1 + DtWD_2; - DtWDx_sum = DtWD_1 * locXpVec_1 + DtWD_2* locXpVec_2; - AmgMatrix(3,3) cov_spatialPoint = DtWD_sum.inverse(); - spatialPoint = cov_spatialPoint * DtWDx_sum; - Amg::Vector3D XpVec_sp_1 = locXpVec_1 - spatialPoint; - Amg::Vector3D XpVec_sp_2 = locXpVec_2 - spatialPoint; - chi2 = XpVec_sp_1.dot(DtWD_1*XpVec_sp_1) + XpVec_sp_2.dot(DtWD_2*XpVec_sp_2); - spatialPoint[0] += linPoint.position()[0]; - spatialPoint[1] += linPoint.position()[1]; - spatialPoint[2] += linPoint.position()[2]; - if (msgLvl(MSG::VERBOSE)) msg() <<"found spatial point = ("<<spatialPoint[0]<<", "<<spatialPoint[1]<<", "<<spatialPoint[2]<<")"<< endmsg; - if (msgLvl(MSG::VERBOSE)) msg() <<"chi2 = "<<chi2<<endmsg; - linPoint = Trk::Vertex(spatialPoint); - } - delete linTrack1; linTrack1=nullptr; delete linTrack2; linTrack2=nullptr; - }// two iterations - if (chi2 <= m_chi2) return new Trk::Vertex(spatialPoint); - - if (msgLvl(MSG::VERBOSE)) msg() <<"found spatial point candidate doesn't pass chi2_cut" << endmsg; - return nullptr; - -} - -//======================================================================================================== -Trk::Vertex* InDet::ZVTOP_SlowSpatialPointFinder::findSpatialPoint(const Trk::RecVertex vtx, const Trk::TrackParameters* perigee_1) const -{ - Amg::Vector3D spatialPoint; - //we need Trk::Vertex - double chi2(0.); - const Amg::Vector3D lin_point(0.,0.,0.); // we start our linearization always at ATLAS origin! - Trk::Vertex linPoint(lin_point); - for (unsigned int i = 0; i < 3; i++){ - Trk::LinearizedTrack* linTrack1 = m_linFactory->linearizedTrack (perigee_1, linPoint.position() ); - if (linTrack1) - { - Amg::Vector3D locXpVec_1(0.,0.,0.); - AmgMatrix(3,3) DtWD_1; - AmgMatrix(3,3) vtx_weight; - locXpVec_1[0]= locXpVec_1[0] - linPoint.position()[0]; - locXpVec_1[1]= locXpVec_1[1] - linPoint.position()[1]; - locXpVec_1[2]= locXpVec_1[2] - linPoint.position()[2]; - - AmgMatrix(3,3) DtWD_sum; - Amg::Vector3D DtWDx_sum; - AmgMatrix(2,2) billoirCovMat_1 = linTrack1->expectedCovarianceAtPCA().block<2,2>(0,0); - AmgMatrix(2,2) billoirWeightMat_1 = billoirCovMat_1.inverse().eval(); - // D matrix for d0 and z0 - AmgMatrix(2,3) D_1 = linTrack1->positionJacobian().block<2,3>(0,0); - // Calculate DtWD and DtWD*x and sum them - DtWD_1 = D_1.transpose()*billoirWeightMat_1*D_1 ; - vtx_weight = vtx.covariancePosition().inverse(); - DtWD_sum = DtWD_1 + vtx_weight; - Amg::Vector3D vtx_pos(3,0); vtx_pos[0] = vtx.position().x(); vtx_pos[1] = vtx.position().y(); vtx_pos[2] = vtx.position().z(); - DtWDx_sum = DtWD_1 * locXpVec_1 + vtx_weight*vtx_pos; - AmgMatrix(3,3) cov_spatialPoint = DtWD_sum.inverse(); - spatialPoint = cov_spatialPoint * DtWDx_sum; - Amg::Vector3D XpVec_sp_1 = locXpVec_1 - spatialPoint; - Amg::Vector3D sp_vtx = spatialPoint - vtx_pos; - chi2 = XpVec_sp_1.dot(DtWD_1*XpVec_sp_1) + sp_vtx.dot(vtx_weight*sp_vtx); - spatialPoint[0] += linPoint.position()[0]; - spatialPoint[1] += linPoint.position()[1]; - spatialPoint[2] += linPoint.position()[2]; - if (msgLvl(MSG::VERBOSE)) msg() <<"found spatial point = ("<<spatialPoint[0]<<", "<<spatialPoint[1]<<", "<<spatialPoint[2]<<")"<< endmsg; - if (msgLvl(MSG::VERBOSE)) msg() <<"chi2 = "<<chi2<<endmsg; - linPoint = Trk::Vertex (spatialPoint); - } - delete linTrack1; linTrack1=nullptr; - } - if (chi2 <= m_chi2) return new Trk::Vertex(spatialPoint); - - if (msgLvl(MSG::VERBOSE)) msg() <<"found spatial point candidate doesn't pass chi2_cut" << endmsg; - return nullptr; - -} diff --git a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_SpatialPointFinder.cxx b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_SpatialPointFinder.cxx deleted file mode 100755 index 971ff9b1fd2a6acde7e7cd35981e6ccc70ac1a2a..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_SpatialPointFinder.cxx +++ /dev/null @@ -1,251 +0,0 @@ -/* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -*/ - -/////////////////////////////////////////////////////////////////// -// ZVTOP_SpatialPointFinder.cxx, (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// - -#include "InDetZVTOPVxFinder/ZVTOP_SpatialPointFinder.h" -#include "TrkParameters/TrackParameters.h" -#include "VxVertex/Vertex.h" -#include "Particle/TrackParticle.h" -#include "EventPrimitives/EventPrimitives.h" -#include "TrkParticleBase/TrackParticleBase.h" -#include <cmath> -//================ Constructor ================================================= - -InDet::ZVTOP_SpatialPointFinder::ZVTOP_SpatialPointFinder(const std::string& t, - const std::string& n, - const IInterface* p ) - : - base_class(t,n,p) -{ - // template for property declaration - declareProperty("Chi2_cut_value", m_chi2); -} - -//================ Destructor ================================================= - -InDet::ZVTOP_SpatialPointFinder::~ZVTOP_SpatialPointFinder() -{} - - -//================ Initialisation ================================================= - -StatusCode InDet::ZVTOP_SpatialPointFinder::initialize() -{ - ATH_MSG_DEBUG( "initialize() successful" ); - return StatusCode::SUCCESS; -} - -//================ Finalisation ================================================= - -StatusCode InDet::ZVTOP_SpatialPointFinder::finalize() -{ - return StatusCode::SUCCESS; -} -//============================================================================================ -Trk::Vertex* InDet::ZVTOP_SpatialPointFinder::findSpatialPoint(const Trk::Track* trk_1, const Trk::Track* trk_2) const -{ - const Trk::TrackParameters* perigee_1(dynamic_cast<const Trk::TrackParameters*>(trk_1->perigeeParameters())); - const Trk::TrackParameters* perigee_2(dynamic_cast<const Trk::TrackParameters*>(trk_2->perigeeParameters())); - if ((!perigee_1) or (!perigee_2)) { - ATH_MSG_DEBUG( "Dynamic cast to MeasuredPerigee failed. Skipping this pair" ); - return nullptr; - } - Trk::Vertex * vertex = findSpatialPoint(perigee_1,perigee_2); - return vertex; - //if measured perigee -} - -//=============================================================================================== -Trk::Vertex* InDet::ZVTOP_SpatialPointFinder::findSpatialPoint(const Trk::RecVertex vtx, const Trk::Track* trk_1) const -{ - const Trk::TrackParameters *perigee_1(dynamic_cast<const Trk::TrackParameters*>(trk_1->perigeeParameters())); - if (!perigee_1) { - ATH_MSG_DEBUG( "Dynamic cast to MeasuredPerigee failed. Skipping this pair" ); - return nullptr; - } - Trk::Vertex * vertex = findSpatialPoint(vtx,perigee_1); - return vertex; - -} - -//============================================================================================ -Trk::Vertex* InDet::ZVTOP_SpatialPointFinder::findSpatialPoint(const Rec::TrackParticle* trk_1, const Rec::TrackParticle* trk_2) const -{ - const Trk::TrackParameters* perigee_1(trk_1->measuredPerigee()); - const Trk::TrackParameters* perigee_2(trk_2->measuredPerigee()); - if ((!perigee_1) or (!perigee_2)) { - ATH_MSG_DEBUG( "Dynamic cast to MeasuredPerigee failed. Skipping this pair" ); - return nullptr; - } - Trk::Vertex * vertex = findSpatialPoint(perigee_1,perigee_2); - return vertex; - //if measured perigee -} - -//============================================================================================ -Trk::Vertex* InDet::ZVTOP_SpatialPointFinder::findSpatialPoint(const Trk::RecVertex vtx, const Rec::TrackParticle* trk_1) const -{ - const Trk::TrackParameters* perigee_1(trk_1->measuredPerigee()); - if (!perigee_1) { - ATH_MSG_DEBUG( "Dynamic cast to MeasuredPerigee failed. Skipping this pair" ); - return nullptr; - } - Trk::Vertex * vertex = findSpatialPoint(vtx,perigee_1); - return vertex; - -} -//============================================================================================ -Trk::Vertex* InDet::ZVTOP_SpatialPointFinder::findSpatialPoint(const Trk::TrackParticleBase* trk_1, const Trk::TrackParticleBase* trk_2) const -{ - const Trk::TrackParameters* perigee_1 = dynamic_cast<const Trk::TrackParameters*>(&trk_1->definingParameters()); - const Trk::TrackParameters* perigee_2 = dynamic_cast<const Trk::TrackParameters*>(&trk_2->definingParameters()); - if ((!perigee_1) or (!perigee_2)) { - ATH_MSG_DEBUG ("Dynamic cast to MeasuredPerigee failed. Skipping this pair" ); - return nullptr; - } - Trk::Vertex * vertex = findSpatialPoint(perigee_1,perigee_2); - return vertex; - //if measured perigee -} - -//============================================================================================ -Trk::Vertex* InDet::ZVTOP_SpatialPointFinder::findSpatialPoint(const Trk::RecVertex vtx, const Trk::TrackParticleBase* trk_1) const -{ - const Trk::TrackParameters* perigee_1 = dynamic_cast<const Trk::TrackParameters*>(&trk_1->definingParameters()); - if (!perigee_1) { - ATH_MSG_DEBUG( "Dynamic cast to MeasuredPerigee failed. Skipping this pair" ); - return nullptr; - } - Trk::Vertex * vertex = findSpatialPoint(vtx,perigee_1); - return vertex; - -} - -//=============================================================================================== - - -Trk::Vertex* InDet::ZVTOP_SpatialPointFinder::findSpatialPoint(const Trk::TrackParameters* param_1, const Trk::TrackParameters* param_2) const -{ - Amg::Vector3D spatialPoint; - const Trk::Perigee* perigee_1 =dynamic_cast<const Trk::Perigee*>(param_1); - const Trk::Perigee* perigee_2 =dynamic_cast<const Trk::Perigee*>(param_2); - if ((not perigee_1) or (not perigee_2)){ - ATH_MSG_DEBUG( "Dynamic cast to MeasuredPerigee failed in findSpatialPoint" ); - return nullptr; - } - - double cot_theta_1 = 1./std::tan(perigee_1->parameters()[Trk::theta]); - double sphi_1 = std::sin(perigee_1->parameters()[Trk::phi]); - double cphi_1 = std::cos(perigee_1->parameters()[Trk::phi]); - Amg::Vector3D locXpVec_1; - locXpVec_1[0]= -perigee_1->parameters()[Trk::d0]*sphi_1; - locXpVec_1[1]= perigee_1->parameters()[Trk::d0]*cphi_1; - locXpVec_1[2]= perigee_1->parameters()[Trk::z0]; - - double cot_theta_2 = 1./std::tan(perigee_2->parameters()[Trk::theta]); - double sphi_2 = std::sin(perigee_2->parameters()[Trk::phi]); - double cphi_2 = std::cos(perigee_2->parameters()[Trk::phi]); - Amg::Vector3D locXpVec_2; - locXpVec_2[0]= -perigee_2->parameters()[Trk::d0]*sphi_2; - locXpVec_2[1]= perigee_2->parameters()[Trk::d0]*cphi_2; - locXpVec_2[2]= perigee_2->parameters()[Trk::z0]; - - AmgMatrix(3,3) DtWD_sum; - Amg::Vector3D DtWDx_sum; - double chi2(0.); - AmgMatrix(3,3) DtWD_1; - AmgMatrix(3,3) DtWD_2; - AmgMatrix(2,2) cov_mat_1; - AmgMatrix(2,2) cov_mat_2; - cov_mat_1 =(* perigee_1->covariance()).block<2,2>(0,0); - cov_mat_2 =(* perigee_2->covariance()).block<2,2>(0,0); - - // and the weightmatrix - AmgMatrix(2,2) weight_mat_1 = cov_mat_1.inverse().eval(); - AmgMatrix(2,2) weight_mat_2 = cov_mat_2.inverse().eval(); - - // calculate the D matrix - AmgMatrix(2,3) D_1; - AmgMatrix(2,3) D_2; - D_1(0,0) = -sphi_1 ; D_1(0,1) = cphi_1 ; D_1(0,2) = 0.; - D_1(1,0) = -cphi_1*cot_theta_1 ; D_1(1,1) = -sphi_1*cot_theta_1 ; D_1(1,2) = 1.; - D_2(0,0) = -sphi_2 ; D_2(0,1) = cphi_2 ; D_2(0,2) = 0.; - D_2(1,0) = -cphi_2*cot_theta_2 ; D_2(1,1) = -sphi_2*cot_theta_2 ; D_2(1,2) = 1.; - // Calculate DtWD and DtWD*x and sum them - DtWD_1 = D_1.transpose()*weight_mat_1*D_1; - DtWD_2 = D_2.transpose()*weight_mat_2*D_2; - DtWD_sum = DtWD_1 + DtWD_2; - DtWDx_sum = DtWD_1*locXpVec_1 + DtWD_2*locXpVec_2; - AmgMatrix(3,3) cov_spatialPoint = DtWD_sum.inverse(); - spatialPoint = cov_spatialPoint * DtWDx_sum; - Amg::Vector3D XpVec_sp_1 = locXpVec_1 - spatialPoint; - Amg::Vector3D XpVec_sp_2 = locXpVec_2 - spatialPoint; - chi2 = XpVec_sp_1.dot(DtWD_1*XpVec_sp_1) + XpVec_sp_2.dot(DtWD_2*XpVec_sp_2); - if (chi2 <= m_chi2) - { - ATH_MSG_DEBUG("found spatial point = ("<<spatialPoint[0]<<", "<<spatialPoint[1]<<", "<<spatialPoint[2]<<")"); - return new Trk::Vertex(spatialPoint); - } - - ATH_MSG_DEBUG("found spatial point candidate doesn't pass chi2_cut" ); - return nullptr; - - -} - - -//============================================================================================ - -Trk::Vertex* InDet::ZVTOP_SpatialPointFinder::findSpatialPoint(const Trk::RecVertex vtx, const Trk::TrackParameters* param_1) const -{ - Amg::Vector3D spatialPoint; - const Trk::Perigee* perigee_1 =dynamic_cast<const Trk::Perigee*>(param_1); - if (not perigee_1){ - ATH_MSG_DEBUG("cast of perigee failed in findSpatialPoint" ); - return nullptr; - } - double cot_theta_1 = 1./std::tan(perigee_1->parameters()[Trk::theta]); - double sphi_1 = std::sin(perigee_1->parameters()[Trk::phi]); - double cphi_1 = std::cos(perigee_1->parameters()[Trk::phi]); - Amg::Vector3D locXpVec_1; - AmgMatrix(3,3) DtWD_1; - AmgMatrix(3,3) vtx_weight; - double chi2(0.); - locXpVec_1[0]= -perigee_1->parameters()[Trk::d0]*sphi_1; - locXpVec_1[1]= perigee_1->parameters()[Trk::d0]*cphi_1; - locXpVec_1[2]= perigee_1->parameters()[Trk::z0]; - - AmgMatrix(3,3) DtWD_sum; - Amg::Vector3D DtWDx_sum; - AmgMatrix(2,2) cov_mat_1 = (*perigee_1->covariance()).block<2,2>(0,0); - // and the weightmatrix - AmgMatrix(2,2) weight_mat_1 = cov_mat_1.inverse(); - AmgMatrix(2,3) D_1; - D_1(0,0) = -sphi_1 ; D_1(0,1) = cphi_1 ; D_1(0,2) = 0.; - D_1(1,0) = -cphi_1*cot_theta_1 ; D_1(1,1) = -sphi_1*cot_theta_1 ; D_1(1,2) = 1.; - DtWD_1 = D_1.transpose()*weight_mat_1*D_1; - vtx_weight = vtx.covariancePosition().inverse(); - DtWD_sum = DtWD_1 + vtx_weight; - Amg::Vector3D vtx_pos; vtx_pos[0] = vtx.position().x(); vtx_pos[1] = vtx.position().y(); vtx_pos[2] = vtx.position().z(); - DtWDx_sum = DtWD_1*locXpVec_1 + vtx_weight*vtx_pos; - AmgMatrix(3,3) cov_spatialPoint = DtWD_sum.inverse(); - spatialPoint = cov_spatialPoint * DtWDx_sum; - Amg::Vector3D XpVec_sp_1 = locXpVec_1 - spatialPoint; - Amg::Vector3D sp_vtx = spatialPoint - vtx_pos; - chi2 = XpVec_sp_1.dot(DtWD_1*XpVec_sp_1) + sp_vtx.dot(vtx_weight*sp_vtx); - if (chi2 <= m_chi2) - { - if (msgLvl(MSG::DEBUG)) msg() <<"found spatial point = ("<<spatialPoint[0]<<", "<<spatialPoint[1]<<", "<<spatialPoint[2]<<")"<< endmsg; - return new Trk::Vertex(spatialPoint); - } - - if (msgLvl(MSG::DEBUG)) msg() <<"found spatial point candidate doesn't pass chi2_cut" << endmsg; - return nullptr; - - -} - diff --git a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_Tool.cxx b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_Tool.cxx deleted file mode 100755 index 7799f4eb48d0b0575255fa0e9685549d675a5482..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_Tool.cxx +++ /dev/null @@ -1,490 +0,0 @@ -/* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -*/ - -/////////////////////////////////////////////////////////////////// -// ZVTOP_Tool.cxx, (c) ATLAS Detector software -// begin : 30-10-2006 -// authors : Tatjana Lenz -// email : tatjana.lenz@cern.ch -// changes : -/////////////////////////////////////////////////////////////////// - -#include "InDetZVTOPVxFinder/ZVTOP_Tool.h" -#include "TrkVertexFitterInterfaces/IVertexFitter.h" -#include "InDetZVTOPVxFinder/ZVTOP_SpatialPointFinder.h" -#include "InDetZVTOPVxFinder/ZVTOP_TrkPartBaseVertexState.h" -#include "InDetZVTOPVxFinder/ZVTOP_VertexState.h" -#include "InDetZVTOPVxFinder/IZVTOP_TrkProbTubeCalc.h" -#include "InDetZVTOPVxFinder/IZVTOP_SimpleVtxProbCalc.h" -#include "VxVertex/Vertex.h" -#include "VxVertex/VxTrackAtVertex.h" -#include "TrkTrack/LinkToTrack.h" -#include "InDetBeamSpotService/IBeamCondSvc.h" -#include "AthContainers/DataVector.h" -#include "TrkTrack/TrackCollection.h" -#include "VxVertex/VxContainer.h" -#include "xAODTracking/VertexContainer.h" -#include "xAODTracking/TrackParticleContainer.h" -#include <map> -#include <utility> -//================ Constructor ================================================= - -InDet::ZVTOP_Tool::ZVTOP_Tool(const std::string& t, - const std::string& n, - const IInterface* p ) - : - AthAlgTool(t,n,p), - m_iVertexFitter("Trk::FullVertexFitter"), - m_iSpatialPointFinder("InDet::SpatialPointFinder"), - m_iTrkProbTubeCalc("InDet::TrkProbTubeCalc"), - m_iVtxProbCalc("InDet::VtxProbCalc"), - m_iBeamCondSvc("BeamCondSvc",n) -{ - // template for property declaration - declareInterface<IVertexFinder>(this); - declareProperty("VertexFitterTool",m_iVertexFitter); - declareProperty("SpatialPointFinderTool",m_iSpatialPointFinder); - declareProperty("TrkProbTubeCalcTool",m_iTrkProbTubeCalc); - declareProperty("VtxProbCalcTool",m_iVtxProbCalc); - declareProperty("ResolvingCutValue", m_resolvingCut = 0.6); - declareProperty("ResolvingStepValue", m_resolvingStep = 0.3); - declareProperty("VtxProbCut", m_vtxProb_cut = 0.00001); - declareProperty("MaxChi2PerTrack", m_trk_chi2_cut = 5.); - declareProperty("BeamPositionSvc", m_iBeamCondSvc); -} - -//================ Destructor ================================================= - -InDet::ZVTOP_Tool::~ZVTOP_Tool() -{} - - -//================ Initialisation ================================================= - -StatusCode InDet::ZVTOP_Tool::initialize() -{ - StatusCode sc = AlgTool::initialize(); - - msg (MSG::INFO) << name() << " initialize()" << endmsg; - if (sc.isFailure()) return sc; - - /* Retrieve Tools*/ - //SpatialPointFinder - if ( m_iSpatialPointFinder.retrieve().isFailure() ) { - msg (MSG::FATAL) << "Failed to retrieve tool " << m_iSpatialPointFinder << endmsg; - return StatusCode::FAILURE; - } msg (MSG::INFO) << "Retrieved tool " << m_iSpatialPointFinder << endmsg; - - //Gaussian Probability Tube for the Track Trajectory - if ( m_iTrkProbTubeCalc.retrieve().isFailure() ) { - msg (MSG::FATAL) << "Failed to retrieve tool " << m_iTrkProbTubeCalc<< endmsg; - return StatusCode::FAILURE; - } msg (MSG::INFO) << "Retrieved tool " << m_iTrkProbTubeCalc << endmsg; - - //Vertex Probability Function - if ( m_iVtxProbCalc.retrieve().isFailure() ) { - msg (MSG::FATAL) << "Failed to retrieve tool " << m_iVtxProbCalc<< endmsg; - return StatusCode::FAILURE; - } msg (MSG::INFO) << "Retrieved tool " << m_iVtxProbCalc << endmsg; - - //Beam Spot - sc = m_iBeamCondSvc.retrieve(); - if (sc.isFailure()) - { - msg (MSG::ERROR) << "Could not find BeamCondSvc." << endmsg; - return sc; - } - //VxFitter - if ( m_iVertexFitter.retrieve().isFailure() ) { - msg (MSG::FATAL) << "Failed to retrieve tool " << m_iVertexFitter << endmsg; - return StatusCode::FAILURE; - } msg (MSG::INFO) << "Retrieved tool " << m_iVertexFitter << endmsg; - msg (MSG::INFO) << "initialize() successful in " << name() << endmsg; - return StatusCode::SUCCESS; -} - -//================ Finalisation ================================================= - -StatusCode InDet::ZVTOP_Tool::finalize() -{ - StatusCode sc = AlgTool::finalize(); - return sc; -} - -//============================================================================================ -//VxContainer* InDet::ZVTOP_Tool::findVertex(const TrackCollection* trackTES) --David S. -std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> -InDet::ZVTOP_Tool::findVertex(const TrackCollection* trackTES) const -{ -//VxContainer* newVxContainer = new VxContainer; --David S. -xAOD::VertexContainer* newVertexContainer = new xAOD::VertexContainer; -xAOD::VertexAuxContainer* newVertexAuxContainer = new xAOD::VertexAuxContainer; -newVertexContainer->setStore( newVertexAuxContainer ); -if (!trackTES->empty()) { - //some variables - typedef DataVector<Trk::Track>::const_iterator TrackDataVecIter; - const Trk::RecVertex beam_spot = m_iBeamCondSvc->beamVtx(); - - // new Fitter EDM takes xAOD::Vertex instead of Trk::RecVertex as beam_spot constraint, so create one out of beamVtx() --David S. - xAOD::Vertex theconstraint = xAOD::Vertex(); // Default constructor creates a private store - theconstraint.setPosition( beam_spot.position() ); - theconstraint.setCovariancePosition( beam_spot.covariancePosition() ); - theconstraint.setFitQuality( beam_spot.fitQuality().chiSquared(), beam_spot.fitQuality().doubleNumberDoF() ); - - std::vector<const Trk::Track*> trkColl(0); // the collection of tracks, which are assigned to one spatial point - std::vector<InDet::ZVTOP_VertexState*> vtxState_org(0);// vector of tracks and vertices, tracks can be assigned to more than one vertex, these ambiguities will be resolved later - std::multimap<double, InDet::ZVTOP_VertexState*> vtxProb_map; - //---------------------------------------------------------------------------// - //-------step1: find spatial points & calculate vtx probabilities-------// - //--------------------------------------------------------------------------// - - std::vector< std::vector<InDet::ZVTOP_VertexState*> > vertex_objects(0); //vector of vtx candidate & track collection pairs - - if (msgLvl(MSG::DEBUG)) msg() << "step ONE search for the spatial points, number of tracks = "<<(*trackTES).size() << endmsg; - for (TrackDataVecIter itr_1 = (*trackTES).begin(); itr_1 != (*trackTES).end()-1; itr_1++) - { - double sum_TrkProbTube = 0.; - double sum2_TrkProbTube = 0.; - double vtxProb = 0.; - // trk-trk combination - for (TrackDataVecIter itr_2 = itr_1+1; itr_2 != (*trackTES).end(); itr_2++) - { - Trk::Vertex* spatialPoint; - spatialPoint = m_iSpatialPointFinder->findSpatialPoint((*itr_1),(*itr_2)); - if (spatialPoint != nullptr) - { - double TrkProbTube_1 = m_iTrkProbTubeCalc->calcProbTube(*(*itr_1),*spatialPoint); - double TrkProbTube_2 = m_iTrkProbTubeCalc->calcProbTube(*(*itr_2),*spatialPoint); - sum_TrkProbTube = TrkProbTube_1 + TrkProbTube_2; - sum2_TrkProbTube = pow(TrkProbTube_1,2.) + pow(TrkProbTube_2,2.); - if (sum_TrkProbTube != 0. ) - { - vtxProb = m_iVtxProbCalc->calcVtxProb(sum_TrkProbTube, sum2_TrkProbTube); - trkColl.push_back((*itr_1)); - trkColl.push_back((*itr_2)); - bool beam_spot = false; - if (vtxProb > m_vtxProb_cut) vtxState_org.push_back(new InDet::ZVTOP_VertexState(vtxProb, *spatialPoint, beam_spot, trkColl )); - trkColl.clear(); - } - } - delete spatialPoint; - } - //trk-IP combination - Trk::Vertex* spatialPoint = nullptr; - spatialPoint = m_iSpatialPointFinder->findSpatialPoint(beam_spot,(*itr_1)); - if (spatialPoint != nullptr) - { - double BeamProbTube = m_iTrkProbTubeCalc->calcProbTube(beam_spot,*spatialPoint); - double TrkProbTube = m_iTrkProbTubeCalc->calcProbTube(*(*itr_1),*spatialPoint); - sum_TrkProbTube = BeamProbTube + TrkProbTube; - sum2_TrkProbTube = pow(TrkProbTube,2.) + pow(BeamProbTube,2.); - if (sum_TrkProbTube != 0. ) - { - vtxProb = m_iVtxProbCalc->calcVtxProb(sum_TrkProbTube, sum2_TrkProbTube); - trkColl.push_back((*itr_1)); - bool beam_spot = true; - if (vtxProb > m_vtxProb_cut) vtxState_org.push_back(new InDet::ZVTOP_VertexState(vtxProb, *spatialPoint, beam_spot, trkColl )); - trkColl.clear(); - } - } - delete spatialPoint; - } - if (msgLvl(MSG::DEBUG)) msg() << " number of spatial points = "<<vtxState_org.size()<<endmsg; - //reduce the spatial point collection - typedef std::vector<InDet::ZVTOP_VertexState*>::iterator Sp_Iter; - std::vector< InDet::ZVTOP_VertexState*> vtxState; - for (Sp_Iter itr1 = vtxState_org.begin(); itr1 != vtxState_org.end(); itr1++) - { - - if (vtxState.empty()) vtxState.push_back(*itr1); - else { - Trk::Vertex vtx_new = (*itr1)->vertex(); - bool can_be_resolved = false; - for (Sp_Iter itr2 = vtxState.begin(); itr2 != vtxState.end(); itr2++) - { - Trk::Vertex vtx_in = (*itr2)->vertex(); - double r_diff = sqrt(pow(vtx_new.position().x(),2.) + pow(vtx_new.position().y(),2.)) - sqrt(pow(vtx_in.position().x(),2.) + pow(vtx_in.position().y(),2.)); - double z_diff = vtx_new.position().z() - vtx_in.position().z(); - if (fabs(r_diff) > 0.001 && fabs(z_diff) > 0.001 && r_diff != 0. && z_diff != 0.) can_be_resolved = true; - else { - for (unsigned int trk_itr = 0; trk_itr < (*itr1)->tracks().size(); trk_itr++) (*itr2)->tracks().push_back((*itr1)->tracks()[trk_itr]); - can_be_resolved = false; - break; - } - } - if (can_be_resolved) vtxState.push_back(*itr1); - } - } - for (Sp_Iter itr_sort = vtxState.begin(); itr_sort!= vtxState.end(); itr_sort++) vtxProb_map.insert(std::multimap<double, InDet::ZVTOP_VertexState*>::value_type((*itr_sort)->vtx_prob(), *itr_sort)); - - -//-------------------------------------------------------------------------------// -//----step2: vertex clustering, aim: to cluster all vertices together, ----// -//----which can not be resolved. The found vertex seeds and ---------// -//----associated tracks are taken as an input for the vertex fit. --------// -//------------------------------------------------------------------------------// - - - if (!vtxState.empty() ){ - if (msgLvl(MSG::DEBUG)) msg() << " step TWO vertex clustering, number of reduced vertices = "<<vtxState.size()<< endmsg; - //sort the vtxState collection, starting with a highest vtx probability - std::vector<InDet::ZVTOP_VertexState*> vtxState_sorted; - unsigned int IP_counter = 0; - std::multimap<double, InDet::ZVTOP_VertexState*>::reverse_iterator s= vtxProb_map.rbegin(); - for (; s!=vtxProb_map.rend(); s++) { - InDet::ZVTOP_VertexState* vtx_state = (*s).second; - if (vtx_state->beam_spot()) IP_counter += 1; - if (IP_counter > 1) vtx_state->set_beam_spot(false); - vtxState_sorted.push_back(vtx_state); - } - //store first element in the vertex_objects ---->vector<vector<VertexState>> - std::vector<InDet::ZVTOP_VertexState*> vtx_coll; - vtx_coll.push_back(*(vtxState_sorted.begin())); - vertex_objects.push_back(vtx_coll);//store first seed - std::vector< InDet::ZVTOP_VertexState*> vtxState_new(vtxState_sorted); //copy of the vtxState_sorted - vtxState_new.erase(vtxState_new.begin()); // without first element - //loop over vtxState_sorted - for (Sp_Iter org_itr= vtxState_sorted.begin(); org_itr != vtxState_sorted.end(); org_itr++) - { - Trk::Vertex seed = (*org_itr)->vertex(); - //found where the seed is already stored - bool vtx_is_stored = false; - unsigned int vertex_objectsPosition = 0; - for (unsigned int vertex_objectsItr = 0; vertex_objectsItr!= vertex_objects.size(); vertex_objectsItr++) - { - //stored vertices in the line vertex_objectsItr - std::vector<InDet::ZVTOP_VertexState*> stored_vertices = vertex_objects[vertex_objectsItr]; - //---->inner loop - for (unsigned int stored_vtx_itr = 0; stored_vtx_itr!= stored_vertices.size(); stored_vtx_itr++) - { - Trk::Vertex storedVtx = stored_vertices[stored_vtx_itr]->vertex(); - double diff = ((*org_itr)->vertex().position().x() - storedVtx.position().x()) + ((*org_itr)->vertex().position().y() - storedVtx.position().y()) + ((*org_itr)->vertex().position().z() - storedVtx.position().z()); - if (fabs(diff) < 0.0001) - { - vertex_objectsPosition = vertex_objectsItr; - vtx_is_stored = true; - break; // break inner loop if found - } - } - if (vtx_is_stored) break; // break outer loop if found - } - if (!vtx_is_stored) { - //if not stored - std::vector<InDet::ZVTOP_VertexState*> new_vtx_coll; - new_vtx_coll.push_back(*org_itr); - vertex_objects.push_back(new_vtx_coll); - vertex_objectsPosition = vertex_objects.size() - 1; - } - for (Sp_Iter new_itr = vtxState_new.begin(); new_itr!= vtxState_new.end(); new_itr++) - { - Trk::Vertex cand = (*new_itr)->vertex(); - //calculate the vtx prob function for this seed - std::multimap<double, Trk::Vertex > vtx_prob_coll; - vtx_prob_coll.insert(std::multimap<double, Trk::Vertex >::value_type((*new_itr)->vtx_prob(),(*new_itr)->vertex())); - vtx_prob_coll.insert(std::multimap<double, Trk::Vertex >::value_type((*org_itr)->vtx_prob(),(*org_itr)->vertex())); - for (double alpha = m_resolvingStep; alpha <1.; alpha += m_resolvingStep) - { - Trk::Vertex SP_line = Trk::Vertex((*org_itr)->vertex().position() + alpha*((*new_itr)->vertex().position() - (*org_itr)->vertex().position())); - double sum_TrkProbTube = 0.; - double sum2_TrkProbTube = 0.; - for (TrackDataVecIter trk_itr = (*trackTES).begin(); trk_itr != (*trackTES).end(); trk_itr++) - { - double TrkProbTube = 0.; - TrkProbTube = m_iTrkProbTubeCalc->calcProbTube(*(*trk_itr),SP_line); - sum_TrkProbTube += TrkProbTube; - sum2_TrkProbTube += pow(TrkProbTube,2.); - } - double BeamProbTube = m_iTrkProbTubeCalc->calcProbTube(beam_spot,SP_line); - sum_TrkProbTube += BeamProbTube; - sum2_TrkProbTube += pow(BeamProbTube,2.); - double vtx_prob = m_iVtxProbCalc->calcVtxProb(sum_TrkProbTube, sum2_TrkProbTube); - vtx_prob_coll.insert(std::multimap<double, Trk::Vertex >::value_type(vtx_prob, SP_line)); - } - double vtx_prob_ratio = (*vtx_prob_coll.begin()).first/(*new_itr)->vtx_prob(); - if (vtx_prob_ratio >= m_resolvingCut) { - //check if the vertices can be resolved - vertex_objects[vertex_objectsPosition].push_back(*new_itr); - vtxState_new.erase(new_itr); - if (new_itr != vtxState_new.end()) --new_itr; - if (new_itr == vtxState_new.end()) break; - } - } - }//loop over orig reduced coll - }//if spatial point collection size > 0 - - - //--------------------------------------------------------------------------------// - //--------------------step3: call vertex fitter----------------------------------// - //--------------------------------------------------------------------------------// - - if (msgLvl(MSG::DEBUG)) msg() << " step THREE, vertex fit, vertex_objects size = "<<vertex_objects.size()<< endmsg; - //std::vector<Trk::VxCandidate* > theVxContainer; --David S. - std::vector< xAOD::Vertex* > theVertexContainer; - //prepare trk coll --> remove double tracks - std::vector<std::vector<InDet::ZVTOP_VertexState*> >::iterator vtx_itr = vertex_objects.begin(); - for (; vtx_itr!= vertex_objects.end(); vtx_itr++) - { - bool with_beam_spot = false; - std::vector <const Trk::Track*> trk_coll(0); //--->trk_coll for the fit - std::vector<InDet::ZVTOP_VertexState*>::iterator itr = (*vtx_itr).begin(); - trk_coll.push_back((*itr)->tracks()[0]); - for (; itr != (*vtx_itr).end(); itr++) - { - for ( std::vector <const Trk::Track*>::iterator vs_itr = ((*itr)->tracks()).begin(); vs_itr!= ((*itr)->tracks()).end(); vs_itr++) - { - bool found = false; - for (std::vector <const Trk::Track*>::iterator trk_itr = trk_coll.begin(); trk_itr!= trk_coll.end(); trk_itr++) { - if (*vs_itr == *trk_itr) found = true; - } - if (!found) trk_coll.push_back(*vs_itr); - } - if ((*itr)->beam_spot()) with_beam_spot = true; - } - //call the fitter - //Trk::VxCandidate * myVxCandidate(0); --David S. - xAOD::Vertex * myxAODVertex(nullptr); - //if (with_beam_spot) myVxCandidate = m_iVertexFitter->fit(trk_coll,beam_spot); --David S. - if (with_beam_spot) myxAODVertex = m_iVertexFitter->fit(trk_coll,theconstraint); - //else myVxCandidate = m_iVertexFitter->fit(trk_coll); --David S. - else myxAODVertex = m_iVertexFitter->fit(trk_coll); - bool bad_chi2 = true; - //if (myVxCandidate) { --David S. - if (myxAODVertex) { - while (bad_chi2) - { - //std::vector< Trk::VxTrackAtVertex*> trkAtVtx = *(myVxCandidate->vxTrackAtVertex()); --David S. - std::vector< Trk::VxTrackAtVertex > trkAtVtx = myxAODVertex->vxTrackAtVertex(); - //std::vector< Trk::VxTrackAtVertex*>::iterator trkAtVtx_Iter = trkAtVtx.begin(); --David S. - std::vector< Trk::VxTrackAtVertex >::iterator trkAtVtx_Iter = trkAtVtx.begin(); - std::vector< const Trk::Track*>::iterator trk_Iter = trk_coll.begin(); - double largest_chi2 = 0.; - std::vector< const Trk::Track*>::iterator index; - for (; trkAtVtx_Iter!= trkAtVtx.end(); trkAtVtx_Iter++) - { - double chi2 = (*trkAtVtx_Iter).trackQuality().chiSquared(); - if (chi2 > largest_chi2) { - largest_chi2 = chi2; - index = trk_Iter; - } - trk_Iter++; - } - if (largest_chi2 > m_trk_chi2_cut) - { - if (trk_coll.size() < 3) break; - - trk_coll.erase(index); - if (trk_coll.size() >= 2) { - //if (myVxCandidate!=0) { delete myVxCandidate; myVxCandidate=0; } --David S. - if (myxAODVertex!=nullptr) { delete myxAODVertex; myxAODVertex=nullptr; } - //if (with_beam_spot) myVxCandidate = m_iVertexFitter->fit(trk_coll, beam_spot); --David S. - if (with_beam_spot) myxAODVertex = m_iVertexFitter->fit(trk_coll, theconstraint); - //else myVxCandidate = m_iVertexFitter->fit(trk_coll); --David S. - else myxAODVertex = m_iVertexFitter->fit(trk_coll); - } - //if (myVxCandidate == 0) break; --David S. - if (myxAODVertex == nullptr) break; - - } else bad_chi2 = false; - } - } - //if (myVxCandidate && bad_chi2 == false && with_beam_spot) newVxContainer->push_back(myVxCandidate); --David S. - if (myxAODVertex && !bad_chi2 && with_beam_spot) newVertexContainer->push_back(myxAODVertex); - //if (myVxCandidate && bad_chi2 == false && !with_beam_spot) theVxContainer.push_back(myVxCandidate); --David S. - if (myxAODVertex && !bad_chi2 && !with_beam_spot) theVertexContainer.push_back(myxAODVertex); - } - //if (msgLvl(MSG::DEBUG)) msg() <<"vertex container size = "<<theVxContainer.size()<<endmsg; --David S. - if (msgLvl(MSG::DEBUG)) msg() << "vertex container size = " << theVertexContainer.size() << endmsg; - - //ambiguity solving for two track vertices - //typedef std::vector<Trk::VxCandidate* >::iterator theVxContainerIter; --David S. - typedef std::vector< xAOD::Vertex* >::iterator theVertexContainerIter; - //theVxContainerIter iter = theVxContainer.begin(); --David S. - theVertexContainerIter iter = theVertexContainer.begin(); - //theVxContainerIter iter_end = theVxContainer.end(); --David S. - theVertexContainerIter iter_end = theVertexContainer.end(); - //std::vector<Trk::VxCandidate*> twoTrkContainer(0); --David S. - std::vector< xAOD::Vertex* > twoTrkContainer(0); - for (; iter!= iter_end; iter++) - { - //Trk::VxCandidate* theVxCandidate(*iter); --David S. - xAOD::Vertex* thexAODVertex(*iter); - //if (theVxCandidate->vxTrackAtVertex()->size() == 2 ) twoTrkContainer.push_back(theVxCandidate); --David S. - if (thexAODVertex->vxTrackAtVertex().size() == 2 ) twoTrkContainer.push_back(thexAODVertex); - //else newVxContainer->push_back(theVxCandidate); --David S. - else newVertexContainer->push_back(thexAODVertex); - } - //std::vector<Trk::VxCandidate*>::iterator twoTrk_itr = twoTrkContainer.begin(); --David S. - std::vector< xAOD::Vertex* >::iterator twoTrk_itr = twoTrkContainer.begin(); - for (; twoTrk_itr!= twoTrkContainer.end(); twoTrk_itr++) - { - // TODO: make sure that links are actually set in VxTrackAtVertices! --David S. - //Trk::ITrackLink* trklink1 = (*(*twoTrk_itr)->vxTrackAtVertex())[0]->trackOrParticleLink(); --David S. - Trk::ITrackLink* trklink1 = (*twoTrk_itr)->vxTrackAtVertex()[0].trackOrParticleLink(); - Trk::LinkToTrack* linkToTrack1 = dynamic_cast<Trk::LinkToTrack*>(trklink1); - const Trk::Track* first_trk = linkToTrack1->cachedElement(); - //double first_trk_chi2 = (*(*twoTrk_itr)->vxTrackAtVertex())[0]->trackQuality().chiSquared(); --David S. - double first_trk_chi2 = (*twoTrk_itr)->vxTrackAtVertex()[0].trackQuality().chiSquared(); - //Trk::ITrackLink* trklink2 = (*(*twoTrk_itr)->vxTrackAtVertex())[1]->trackOrParticleLink(); --David S. - Trk::ITrackLink* trklink2 = (*twoTrk_itr)->vxTrackAtVertex()[1].trackOrParticleLink(); - Trk::LinkToTrack* linkToTrack2 = dynamic_cast<Trk::LinkToTrack*>(trklink2); - const Trk::Track* second_trk = linkToTrack2->cachedElement(); - //double second_trk_chi2 = (*(*twoTrk_itr)->vxTrackAtVertex())[1]->trackQuality().chiSquared(); --David S. - double second_trk_chi2 = (*twoTrk_itr)->vxTrackAtVertex()[1].trackQuality().chiSquared(); - - //VxContainer::iterator Citer = newVxContainer->begin(); --David S. - xAOD::VertexContainer::iterator Citer = newVertexContainer->begin(); - //VxContainer::iterator Citer_end = newVxContainer->end(); --David S. - xAOD::VertexContainer::iterator Citer_end = newVertexContainer->end(); - bool first_found = false; - bool second_found = false; - ////loop over all VxCandidates --David S. - //loop over all Vertices - for (; Citer != Citer_end; Citer++) - { - //unsigned int size = (*Citer)->vxTrackAtVertex()->size(); --David S. - unsigned int size = (*Citer)->vxTrackAtVertex().size(); - for (unsigned int counter = 0; counter < size; counter++) - { - // TODO: make sure that links are actually set in VxTrackAtVertices! --David S. - //Trk::ITrackLink* trklink = (*(*Citer)->vxTrackAtVertex())[counter]->trackOrParticleLink(); --David S. - Trk::ITrackLink* trklink = (*Citer)->vxTrackAtVertex()[counter].trackOrParticleLink(); - Trk::LinkToTrack* linkToTrack = dynamic_cast<Trk::LinkToTrack*>(trklink); - const Trk::Track* trk= linkToTrack->cachedElement(); - //double trk_chi2 = (*(*Citer)->vxTrackAtVertex())[counter]->trackQuality().chiSquared(); --David S. - double trk_chi2 = (*Citer)->vxTrackAtVertex()[counter].trackQuality().chiSquared(); - if (trk == first_trk && trk_chi2 < first_trk_chi2 ) first_found = true; - if (trk == second_trk && trk_chi2 < second_trk_chi2) second_found = true; - } - } - //if (first_found==false && second_found==false) newVxContainer->push_back(*twoTrk_itr); --David S. - if (!first_found && !second_found) newVertexContainer->push_back(*twoTrk_itr); - else delete *twoTrk_itr; - //}//end loop over two track Vx Candidates --David S. - }//end loop over two track Vertices - //if (msgLvl(MSG::DEBUG)) msg() <<"new VxContainer size = "<<newVxContainer->size()<<endmsg; --David S. - if (msgLvl(MSG::DEBUG)) msg() << "new VertexContainer size = " << newVertexContainer->size() << endmsg; - for (Sp_Iter iter = vtxState_org.begin(); iter != vtxState_org.end(); iter++) delete *iter; -} else { - if (msgLvl(MSG::DEBUG)) msg() <<"No tracks in this event, provide to the next event" << endmsg; - } - -//return newVxContainer; --David S. -return std::make_pair(newVertexContainer, newVertexAuxContainer); -} - -std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> -InDet::ZVTOP_Tool::findVertex( - const xAOD::TrackParticleContainer* trackParticles) const -{ - if(msgLvl(MSG::DEBUG)){ - msg(MSG::DEBUG) << "N=" << trackParticles->size() - << " xAOD::TrackParticles found" << endmsg; - msg(MSG::DEBUG) << "No ZVTOP_Tool implementation for xAOD::TrackParticle" - << endmsg; - } - xAOD::VertexContainer *xAODContainer(nullptr); - xAOD::VertexAuxContainer *xAODAuxContainer(nullptr); - return std::make_pair(xAODContainer, xAODAuxContainer); -} - diff --git a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_TrkPartBaseVertexState.cxx b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_TrkPartBaseVertexState.cxx deleted file mode 100644 index a31df49cf99ae32ae044703349d7e273834f1c72..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_TrkPartBaseVertexState.cxx +++ /dev/null @@ -1,29 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/*************************************************************************** - ZVTOP_TrkPartBaseVertexState.cxx - Description - ------------------- - authors : Tatjana Lenz <tatjana.lenz@cern.ch> - ***************************************************************************/ -#include "InDetZVTOPVxFinder/ZVTOP_TrkPartBaseVertexState.h" -#include "TrkParticleBase/TrackParticleBase.h" - - -namespace InDet { - - ZVTOP_TrkPartBaseVertexState::ZVTOP_TrkPartBaseVertexState():m_vtx_prob(),m_vertex(),m_beam_spot(), m_tracks(0){} - - ZVTOP_TrkPartBaseVertexState::ZVTOP_TrkPartBaseVertexState(double& vtx_prob, Trk::Vertex& vertex, bool& beam_spot, std::vector<const Trk::TrackParticleBase*>& tracks): m_vtx_prob(vtx_prob), m_vertex(vertex), m_beam_spot(beam_spot), m_tracks(tracks){} - - ZVTOP_TrkPartBaseVertexState::ZVTOP_TrkPartBaseVertexState(const ZVTOP_TrkPartBaseVertexState& vs): - m_vtx_prob(vs.m_vtx_prob), - m_vertex(vs.m_vertex), - m_beam_spot(vs.m_beam_spot), - m_tracks(vs.m_tracks) - { - - } - ZVTOP_TrkPartBaseVertexState::~ZVTOP_TrkPartBaseVertexState() {} -} // end of namespace diff --git a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_TrkPartVertexState.cxx b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_TrkPartVertexState.cxx deleted file mode 100644 index 6c05a6f4b8978c7e27c2510ad358196c9f10bf46..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_TrkPartVertexState.cxx +++ /dev/null @@ -1,29 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/*************************************************************************** - ZVTOP_TrkPartVertexState.cxx - Description - ------------------- - authors : Tatjana Lenz <tatjana.lenz@cern.ch> - ***************************************************************************/ - -#include "InDetZVTOPVxFinder/ZVTOP_TrkPartVertexState.h" -#include "Particle/TrackParticle.h" - -namespace InDet { - - ZVTOP_TrkPartVertexState::ZVTOP_TrkPartVertexState():m_vtx_prob(),m_vertex(),m_IP(), m_tracks(0){} - - ZVTOP_TrkPartVertexState::ZVTOP_TrkPartVertexState(double& vtx_prob, Trk::Vertex& vertex, bool& IP, std::vector<const Rec::TrackParticle*>& tracks): m_vtx_prob(vtx_prob), m_vertex(vertex), m_IP(IP), m_tracks(tracks){} - - ZVTOP_TrkPartVertexState::ZVTOP_TrkPartVertexState(const ZVTOP_TrkPartVertexState& vs): - m_vtx_prob(vs.m_vtx_prob), - m_vertex(vs.m_vertex), - m_IP(vs.m_IP), - m_tracks(vs.m_tracks) - { - - } - ZVTOP_TrkPartVertexState::~ZVTOP_TrkPartVertexState() {} -} // end of namespace diff --git a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_TrkProbTubeCalc.cxx b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_TrkProbTubeCalc.cxx deleted file mode 100755 index ea50ad0fcaaf7130f7eb5e9be8b14075f8960d01..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_TrkProbTubeCalc.cxx +++ /dev/null @@ -1,123 +0,0 @@ -/* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -*/ - -/////////////////////////////////////////////////////////////////// -// ZVTOP_TrkProbTubeCalc.cxx, (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// - -#include "InDetZVTOPVxFinder/ZVTOP_TrkProbTubeCalc.h" -#include "TrkSurfaces/PerigeeSurface.h" -#include "TrkParameters/TrackParameters.h" -#include "VxVertex/Vertex.h" -#include "CLHEP/Matrix/SymMatrix.h" -#include "CLHEP/Matrix/Vector.h" -#include "EventPrimitives/EventPrimitives.h" -#include "TrkExInterfaces/IExtrapolator.h" -#include <cmath> - -//================ Constructor ================================================= - -InDet::ZVTOP_TrkProbTubeCalc::ZVTOP_TrkProbTubeCalc(const std::string& t, - const std::string& n, - const IInterface* p ) - : - base_class(t,n,p) -{ - // template for property declaration - declareProperty("Extrapolator", m_extrapolator); -} - -//================ Destructor ================================================= - -InDet::ZVTOP_TrkProbTubeCalc::~ZVTOP_TrkProbTubeCalc() -{} - - -//================ Initialisation ================================================= - -StatusCode InDet::ZVTOP_TrkProbTubeCalc::initialize() -{ - /* Get the right extrapolator tool from ToolSvc */ - ATH_CHECK( m_extrapolator.retrieve() ); - ATH_MSG_DEBUG( "initialize() successful"); - return StatusCode::SUCCESS; -} - -//================ Finalisation ================================================= - -StatusCode InDet::ZVTOP_TrkProbTubeCalc::finalize() -{ - return StatusCode::SUCCESS; -} - -//============================================================================================ -double InDet::ZVTOP_TrkProbTubeCalc::calcProbTube(const Trk::Track& trk, Trk::Vertex& vec) const -{ - double probTube = 0.; - //perigee surface - const Trk::Perigee* trkPer(dynamic_cast<const Trk::Perigee*>(trk.perigeeParameters())); - if (not trkPer) return 0.; - probTube = calcProbTube(trkPer, vec); - return probTube; -} - -//============================================================================================ -double InDet::ZVTOP_TrkProbTubeCalc::calcProbTube(const Trk::RecVertex& beam_spot, Trk::Vertex& vec) const -{ - double probTube = 0.; - Amg::Vector3D diff; - diff[0]= beam_spot.position()[0] - vec.position()[0]; - diff[1]= beam_spot.position()[1] - vec.position()[1]; - diff[2]= beam_spot.position()[2] - vec.position()[2]; - AmgMatrix(3,3) beam_spot_weight = beam_spot.covariancePosition().inverse(); - probTube = std::exp(-0.5*diff.transpose()*beam_spot_weight*diff); - return probTube; -} -//============================================================================================ -double InDet::ZVTOP_TrkProbTubeCalc::calcProbTube(const Rec::TrackParticle& trk, Trk::Vertex& vec) const -{ - double probTube = 0.; - const Trk::Perigee* trkPer(trk.measuredPerigee()); - probTube = calcProbTube(trkPer,vec); - return probTube; -} - -double InDet::ZVTOP_TrkProbTubeCalc::calcProbTube(const Trk::TrackParticleBase& trk, Trk::Vertex& vec) const -{ - double probTube = 0.; - //perigee surface - const Trk::Perigee* trkPer = dynamic_cast<const Trk::Perigee*>(&(trk.definingParameters())); - if (not trkPer) return 0; - probTube = calcProbTube(trkPer,vec); - return probTube; -} - -double InDet::ZVTOP_TrkProbTubeCalc::calcProbTube(const Trk::Perigee* trkPer, Trk::Vertex& vec) const { - - double probTube = 0.; - const Amg::Vector3D& lp =vec.position(); - Trk::PerigeeSurface perigeeSurface(lp); - double f_phi0 = trkPer->parameters()[Trk::phi0]; - double f_theta = trkPer->parameters()[Trk::theta]; - double f_qOverP = trkPer->parameters()[Trk::qOverP]; - Trk::Perigee * extrapolatedPerigee(const_cast<Trk::Perigee*>(dynamic_cast<const Trk::Perigee*>(m_extrapolator->extrapolateDirectly(*trkPer, perigeeSurface)))); - if (extrapolatedPerigee) { - AmgVector(5) diff; - diff[0]= extrapolatedPerigee->parameters()[Trk::d0]; - diff[1]= extrapolatedPerigee->parameters()[Trk::z0]; - diff[2]= extrapolatedPerigee->parameters()[Trk::phi0] - f_phi0; - diff[3]= extrapolatedPerigee->parameters()[Trk::theta] - f_theta; - diff[4]= extrapolatedPerigee->parameters()[Trk::qOverP] - f_qOverP; - if (extrapolatedPerigee->covariance() != nullptr) { - AmgMatrix(5,5) exp_perigee_weight = (*extrapolatedPerigee->covariance()).inverse(); - probTube = std::exp(-0.5*diff.transpose()*exp_perigee_weight*diff); - } else { - ATH_MSG_DEBUG( "extrapolateted perigee has NO information on the covariance matrix" ); - } - } else { - ATH_MSG_DEBUG( "Perigee was not extrapolated!" ); - } - delete extrapolatedPerigee; - return probTube; -} diff --git a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_VertexState.cxx b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_VertexState.cxx deleted file mode 100755 index 2747211ab030395a5d21458dd8293da23b19d371..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/ZVTOP_VertexState.cxx +++ /dev/null @@ -1,29 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/*************************************************************************** - ZVTOP_VertexState.cxx - Description - ------------------- - authors : Tatjana Lenz <tatjana.lenz@cern.ch> - ***************************************************************************/ - -#include "InDetZVTOPVxFinder/ZVTOP_VertexState.h" -#include "TrkTrack/Track.h" - -namespace InDet { - - ZVTOP_VertexState::ZVTOP_VertexState():m_vtx_prob(),m_vertex(),m_beam_spot(), m_tracks(0){} - - ZVTOP_VertexState::ZVTOP_VertexState(double& vtx_prob, Trk::Vertex& vertex, bool& beam_spot, std::vector<const Trk::Track*>& tracks): m_vtx_prob(vtx_prob), m_vertex(vertex), m_beam_spot(beam_spot), m_tracks(tracks){} - - ZVTOP_VertexState::ZVTOP_VertexState(const ZVTOP_VertexState& vs): - m_vtx_prob(vs.m_vtx_prob), - m_vertex(vs.m_vertex), - m_beam_spot(vs.m_beam_spot), - m_tracks(vs.m_tracks) - { - - } - ZVTOP_VertexState::~ZVTOP_VertexState() {} -} // end of namespace diff --git a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/components/InDetZVTOPVxFinder_entries.cxx b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/components/InDetZVTOPVxFinder_entries.cxx deleted file mode 100644 index 390f7cfe8c9d453d03f7ffd9f8b0c9012a9611cb..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/src/components/InDetZVTOPVxFinder_entries.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "InDetZVTOPVxFinder/ZVTOP_Tool.h" -#include "InDetZVTOPVxFinder/ZVTOP_SecVtxTool.h" -#include "InDetZVTOPVxFinder/ZVTOP_SpatialPointFinder.h" -#include "InDetZVTOPVxFinder/ZVTOP_SlowSpatialPointFinder.h" -#include "InDetZVTOPVxFinder/ZVTOP_TrkProbTubeCalc.h" -#include "InDetZVTOPVxFinder/ZVTOP_SimpleVtxProbCalc.h" -#include "InDetZVTOPVxFinder/ZVTOP_AmbiguitySolver.h" - -DECLARE_COMPONENT( InDet::ZVTOP_Tool ) -DECLARE_COMPONENT( InDet::ZVTOP_SecVtxTool ) -DECLARE_COMPONENT( InDet::ZVTOP_SpatialPointFinder ) -DECLARE_COMPONENT( InDet::ZVTOP_SlowSpatialPointFinder ) -DECLARE_COMPONENT( InDet::ZVTOP_TrkProbTubeCalc ) -DECLARE_COMPONENT( InDet::ZVTOP_SimpleVtxProbCalc ) -DECLARE_COMPONENT( InDet::ZVTOP_AmbiguitySolver ) - diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/ClusterMakerTool.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/ClusterMakerTool.cxx index 9df4750836aa9e60a2c9d0d6f4e4cbe9cb48af3e..e08afbcac13274388492338131d4cbb3235d2915 100644 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/ClusterMakerTool.cxx +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/ClusterMakerTool.cxx @@ -25,6 +25,8 @@ #include "EventPrimitives/EventPrimitives.h" +#include <memory> + using CLHEP::micrometer; namespace { @@ -168,7 +170,7 @@ PixelCluster* ClusterMakerTool::pixelCluster( // error matrix const Amg::Vector2D& colRow = width.colRow();// made ref to avoid // unnecessary copy EJWM - Amg::MatrixX* errorMatrix = new Amg::MatrixX(2,2); + std::unique_ptr<Amg::MatrixX> errorMatrix{std::make_unique<Amg::MatrixX>(2,2)}; errorMatrix->setIdentity(); // switches are more readable **OPT** @@ -231,7 +233,7 @@ PixelCluster* ClusterMakerTool::pixelCluster( PixelCluster* newCluster = new PixelCluster(clusterID, locpos, rdoList, lvl1a, totList,chargeList, - width, element, errorMatrix, omegax, omegay, + width, element, errorMatrix.release(), omegax, omegay, split, splitProb1, splitProb2); @@ -365,7 +367,7 @@ PixelCluster* ClusterMakerTool::pixelCluster( // error matrix const Amg::Vector2D& colRow = width.colRow();// made ref to avoid // unnecessary copy EJWM - Amg::MatrixX* errorMatrix = new Amg::MatrixX(2,2); + std::unique_ptr<Amg::MatrixX> errorMatrix{std::make_unique<Amg::MatrixX>(2,2)}; errorMatrix->setIdentity(); // switches are more readable **OPT** @@ -378,7 +380,6 @@ PixelCluster* ClusterMakerTool::pixelCluster( const PixelID* pid = dynamic_cast<const PixelID*>(aid); if (not pid){ ATH_MSG_ERROR("Dynamic cast failed at "<<__LINE__<<" of ClusterMakerTool.cxx."); - delete errorMatrix;errorMatrix=nullptr; return nullptr; } int layer = pid->layer_disk(clusterID); @@ -438,7 +439,7 @@ PixelCluster* ClusterMakerTool::pixelCluster( chargeList, width, element, - errorMatrix, + errorMatrix.release(), omegax, omegay, split, @@ -483,7 +484,7 @@ SCT_Cluster* ClusterMakerTool::sctCluster( const Amg::Vector2D& colRow = width.colRow();// made ref to avoid // unnecessary copy EJWM - Amg::MatrixX* errorMatrix = new Amg::MatrixX(2,2); + std::unique_ptr<Amg::MatrixX> errorMatrix{std::make_unique<Amg::MatrixX>(2,2)}; errorMatrix->setIdentity(); // switches are more readable **OPT** @@ -539,9 +540,7 @@ SCT_Cluster* ClusterMakerTool::sctCluster( errorMatrix->fillSymmetric(1,1,sn2*v0+cs2*v1); } - // delete localPos; - // localPos=0; - SCT_Cluster* newCluster = new SCT_Cluster(clusterID, locpos, rdoList , width, element, errorMatrix); + SCT_Cluster* newCluster = new SCT_Cluster(clusterID, locpos, rdoList , width, element, errorMatrix.release()); return newCluster; } diff --git a/InnerDetector/InDetRecTools/SiSpacePointTool/SiSpacePointTool/SiSpacePointMakerTool.h b/InnerDetector/InDetRecTools/SiSpacePointTool/SiSpacePointTool/SiSpacePointMakerTool.h index 7dc072a7da2374c69ebe18778f65dfa8ccbec320..b891997216141b6660141243708fd13b48148dfb 100644 --- a/InnerDetector/InDetRecTools/SiSpacePointTool/SiSpacePointTool/SiSpacePointMakerTool.h +++ b/InnerDetector/InDetRecTools/SiSpacePointTool/SiSpacePointTool/SiSpacePointMakerTool.h @@ -7,14 +7,12 @@ #include "AthenaBaseComps/AthAlgTool.h" -#include "AthenaKernel/SlotSpecificObj.h" #include "GeoPrimitives/GeoPrimitives.h" #include "InDetPrepRawData/PixelClusterCollection.h" #include "InDetPrepRawData/SCT_ClusterCollection.h" #include "SiSpacePointTool/SCTinformation.h" #include "TrkSpacePoint/SpacePoint.h" -#include <mutex> #include <string> class SCT_ID; @@ -58,9 +56,6 @@ namespace InDet { /// Finalize virtual StatusCode finalize() override; - /// To trigger cleanup for new event - void newEvent() const; - /// Convert clusters to space points: SCT_Clusters -> SCT_SpacePoints Trk::SpacePoint* makeSCT_SpacePoint(const InDet::SiCluster& cluster1, const InDet::SiCluster& cluster2, const Amg::Vector3D& vertexVec, @@ -115,41 +110,6 @@ namespace InDet { const SCT_ID* m_idHelper{nullptr}; //@} - /// @name Mutex to protect data members in const methods - //@{ - mutable std::mutex m_mutex; - //@} - - /// @class CacheEntry - /// To hold event dependent data - struct CacheEntry { - EventContext::ContextEvt_t m_evt{EventContext::INVALID_CONTEXT_EVT}; //!< Event number, slot number, used to check if already processed event or not. - std::vector<Trk::SpacePoint*> m_tmpSpacePoints{}; //!< SpacePoint cache - std::vector<SCTinformation> m_SCT0{}; //!< SCTinformation vector for 0-th element (side 0) - std::vector<SCTinformation> m_SCT1{}; //!< SCTinformation vector for 1-st element (side 1) - const InDetDD::SiDetectorElement* m_element0{nullptr}; //!< SiDetectorElement for 0-th element (side 0) - const InDetDD::SiDetectorElement* m_element1{nullptr}; //!< SiDetectorElement for 1-st element (side 1) - const InDetDD::SiDetectorElement* m_elementOLD{nullptr}; //!< SiDetectorElement cache - /// Clear all members of event dependent data - void clear() { - if (m_tmpSpacePoints.size()) { - for (Trk::SpacePoint* sp : m_tmpSpacePoints) { - delete sp; - } - } - m_tmpSpacePoints.clear(); - m_SCT0.clear(); - m_SCT1.clear(); - m_element0 = nullptr; - m_element1 = nullptr; - m_elementOLD = nullptr; - }; - }; - - /// SG::SlotSpecificObj is used to hold event dependent data cache. - /// Guarded by m_mutex in const methods. - mutable SG::SlotSpecificObj<CacheEntry> m_cache ATLAS_THREAD_SAFE; - /// update range accordingly to the gap between the stereo modules void updateRange(const InDetDD::SiDetectorElement* element1, const InDetDD::SiDetectorElement* element2, diff --git a/InnerDetector/InDetRecTools/SiSpacePointTool/src/SiSpacePointMakerTool.cxx b/InnerDetector/InDetRecTools/SiSpacePointTool/src/SiSpacePointMakerTool.cxx index 5caa00056c528bf7943cd03f6bbcb289372daa78..36439c690ba128d542491d020b4c3ee34432db4a 100644 --- a/InnerDetector/InDetRecTools/SiSpacePointTool/src/SiSpacePointMakerTool.cxx +++ b/InnerDetector/InDetRecTools/SiSpacePointTool/src/SiSpacePointMakerTool.cxx @@ -48,18 +48,6 @@ namespace InDet { return StatusCode::SUCCESS; } //-------------------------------------------------------------------------- - void SiSpacePointMakerTool::newEvent() const { - const EventContext& ctx{Gaudi::Hive::currentContext()}; - std::lock_guard<std::mutex> lock{m_mutex}; - CacheEntry* ent{m_cache.get(ctx)}; - if (ent->m_evt!=ctx.evt()) { // New event in this slot - ent->clear(); - ent->m_evt = ctx.evt(); - } else { - ent->m_elementOLD = nullptr; - } - } - //-------------------------------------------------------------------------- Trk::SpacePoint* SiSpacePointMakerTool::makeSCT_SpacePoint(const InDet::SiCluster& cluster1, const InDet::SiCluster& cluster2, const Amg::Vector3D& vertexVec, diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ATLxk.h b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ATLxk.h index addfdb5985a6f7ff33c437992e331ac745990040..a0e802ff8b68ba0c9b87fc4233f69534fb9a73ec 100644 --- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ATLxk.h +++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ATLxk.h @@ -107,6 +107,14 @@ namespace InDet { /// produced accordingly methods find /////////////////////////////////////////////////////////////////// //@{ + /** This method will update the data.seedOutput member to be the next seed pointed at by + * the data.i_seed_Pro iterator over the data.l_seeds_Pro list. + * Some poor quality PPS seeds will be skipped, this cut is implemented within the SiSpacePointsSeed::set3 method. + * If we run out of seeds after having previously reached a premature abort condition, + * seed finding will automatically be continued until all seeds have been found. + * @param[in] ctx: Event contex + * @param[in,out] data Event data, updated and used to obtain the next seed to return + **/ virtual const SiSpacePointsSeed* next(const EventContext& ctx, EventData& data) const override; //@} @@ -119,17 +127,21 @@ namespace InDet { private: /// enum for array sizes - enum Size {SizeRF=53, - SizeZ=11, - SizeRFZ=SizeRF*SizeZ, - SizeI=9, - SizeRFV=100, - SizeZV=3, - SizeRFZV=SizeRFV*SizeZV, - SizeIV=6}; - + /// Note that this stores the maximum capacities, the actual binnings + /// do not always use the full size. See data members below for the + /// actual binning paramaters, which are determined in buildFramework. + //@{ + enum Size {arraySizePhi=53, ///< capacity of the 1D phi arrays + arraySizeZ=11, ///< capacity of the 1D z arrays + arraySizePhiZ=arraySizePhi*arraySizeZ, ///< capacity for the 2D phi-z arrays + arraySizeNeighbourBins=9, ///< array size to store neighbouring phi-z-regions in the seed finding + arraySizePhiV=100, ///< array size in phi for vertexing + arraySizeZV=3, ///< array size in z for vertexing + arraySizePhiZV=arraySizePhiV*arraySizeZV, ///< array size in phi-Z 2D for the vertexing + arraySizeNeighbourBinsVertex=6}; ///< array size to store neighbouring phi-z regions for the vertexing + //@} /////////////////////////////////////////////////////////////////// - // Private data and methods + /// Private data and methods /////////////////////////////////////////////////////////////////// /// @name Data handles @@ -139,7 +151,7 @@ namespace InDet { SG::ReadHandleKey<SpacePointOverlapCollection> m_spacepointsOverlap{this, "SpacePointsOverlapName", "OverlapSpacePoints"}; SG::ReadHandleKey<Trk::PRDtoTrackMap> m_prdToTrackMap{this,"PRDtoTrackMap","","option PRD-to-track association"}; SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey{this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot"}; - // Read handle for conditions object to get the field cache + /// Read handle for conditions object to get the field cache SG::ReadCondHandleKey<AtlasFieldCacheCondObj> m_fieldCondObjInputKey {this, "AtlasFieldCacheCondObj", "fieldCondObj", "Name of the Magnetic Field conditions object key"}; //@} @@ -169,12 +181,12 @@ namespace InDet { //@{ FloatProperty m_etamin{this, "etaMin", 0.}; FloatProperty m_r_rmax{this, "radMax", 600.}; - FloatProperty m_r_rstep{this, "radStep", 2.}; - FloatProperty m_r3max{this, "maxRadius3", 600.}; //!< This is always overwritten by m_r_rmax. + FloatProperty m_binSizeR{this, "radStep", 2.}; + FloatProperty m_r3max{this, "maxRadius3", 600.}; ///< This is always overwritten by m_r_rmax. FloatProperty m_drmin{this, "mindRadius", 5.}; - FloatProperty m_diver{this, "maxdImpact", 10.}; - FloatProperty m_diversss{this, "maxdImpactSSS", 50.}; - FloatProperty m_divermax{this, "maxdImpactForDecays", 20.}; + FloatProperty m_maxdImpact{this, "maxdImpact", 10.}; + FloatProperty m_maxdImpactSSS{this, "maxdImpactSSS", 50.}; + FloatProperty m_maxdImpactDecays{this, "maxdImpactForDecays", 20.}; FloatProperty m_ptmin{this, "pTmin", 500.}; //@} @@ -192,7 +204,7 @@ namespace InDet { FloatProperty m_r2max{this, "maxRadius2", 600.}; FloatProperty m_r3min{this, "minRadius3", 0.}; FloatProperty m_rapcut{this, "RapidityCut", 2.7}; - FloatProperty m_diverpps{this, "maxdImpactPPS", 1.7}; + FloatProperty m_maxdImpactPPS{this, "maxdImpactPPS", 1.7}; //@} /// @name Data member, which is not updated at all. @@ -202,22 +214,30 @@ namespace InDet { /// @name Data members, which are updated only in buildFrameWork in initialize //@{ - float m_dzdrmin0{0.}; - float m_dzdrmax0{0.}; - float m_ipt{0.}; - float m_ipt2{0.}; - float m_COF{0.}; - int m_r_size{0}; - int m_fNmax{0}; - int m_fvNmax{0}; - int m_rfz_b[SizeRFZ]; - int m_rfz_t[SizeRFZ]; - int m_rfz_ib[SizeRFZ][SizeI]; - int m_rfz_it[SizeRFZ][SizeI]; - int m_rfzv_n[SizeRFZV]; - int m_rfzv_i[SizeRFZV][SizeIV]; - float m_sF{0}; - float m_sFv{0}; + /// conversion factors and cached cut values + float m_dzdrmin0{0.}; ///< implicitly store eta cut + float m_dzdrmax0{0.}; ///< implicitly store eta cut + float m_ipt{0.}; ///< inverse of 90% of the ptmin cut + float m_ipt2{0.}; ///< inverse square of 90% of the pt min cut + static constexpr float m_COF{134*.05*9}; ///< conversion factor. A very magic number indeed. + + /// @name Binning parameters + ///@{ + int m_nBinsR{0}; ///< number of bins in the radial coordinate + int m_maxPhiBin{0}; ///< number of bins in phi + int m_maxBinPhiVertex{0}; ///< number of bins in phi for vertices + float m_inverseBinSizePhi{0}; ///< cache the inverse bin size in phi which we use - needed to evaluate phi bin locations + float m_inverseBinSizePhiVertex{0};///< as above but for vertex + ///@} + + /// arrays associating bins to each other for SP formation + std::array<int,arraySizePhiZ> m_nNeighbourCellsBottom; ///< number of neighbouring phi-z bins to consider when looking for "bottom SP" candidates for each phi-z bin + std::array<int,arraySizePhiZ> m_nNeighbourCellsTop; ///< number of neighbouring phi-z bins to consider when looking for "top SP" candidates for each phi-z bin + std::array<std::array<int, arraySizeNeighbourBins>, arraySizePhiZ> m_neighbourCellsBottom; ///< mapping of neighbour cells in the 2D phi-z binning to consider for the "bottom SP" search for central SPs in each phi-z bin. Number of valid entries stored in m_nNeighboursPhiZbottom + std::array<std::array<int, arraySizeNeighbourBins>, arraySizePhiZ> m_neighbourCellsTop; ///< mapping of neighbour cells in the 2D phi-z binning to consider for the "top SP" search for central SPs in each phi-z bin. Number of valid entries stored in m_nNeighboursPhiZtop + + std::array<int,arraySizePhiZV> m_nNeighboursVertexPhiZ; + std::array<std::array<int, arraySizeNeighbourBinsVertex>, arraySizePhiZ> m_neighboursVertexPhiZ; //@} /////////////////////////////////////////////////////////////////// @@ -234,43 +254,144 @@ namespace InDet { MsgStream& dumpConditions(EventData& data, MsgStream& out) const; MsgStream& dumpEvent (EventData& data, MsgStream& out) const; + /// prepare several data members with cached cut values, + /// conversion factors, binnings, etc void buildFrameWork(); + /* updates the beam spot information stored in the event data + * object. + * @param[out] data: Event data, receives update to the x/y/zbeam members + **/ void buildBeamFrameWork(EventData& data) const; + /** Create a SiSpacePointForSeed from the space point. + * This will also add the point to the data object's + * l_spforseed list and update its i_spforseed iterator + * to point to the entry after the new SP + * for further additions. + * Returns a nullptr if the SP fails the eta cut, + * should we apply one + * @param[in,out] data: Provides beam spot location, receives updates to the l_spforseed and i_spforseed members + * @param[in] sp: Input space point. + **/ SiSpacePointForSeed* newSpacePoint(EventData& data, const Trk::SpacePoint*const& sp) const; + void newSeed(EventData& data, SiSpacePointForSeed*& p1, SiSpacePointForSeed*& p2, float z) const; + /** This inserts a seed into the set of saved seeds. + * It internally respects the user-configured max number of seeds per central + * space point. Once this is exceeded, the new seed will replace worse-quality + * seeds if there are any, otherwise it will not insert anything. + * @param[in,out] data Event data - update OneSeeds_Pro and mapOneSeeds_Pro members + * @param[in] p1 First space point for this seed + * @param[in] p2 Second space point for this seed + * @param[in] p3 Third space point for this seed + * @param[in] z z0 IP estimate + * @param[in] q quality estimate (based on d0, plus modifiers) + **/ void newOneSeed(EventData& data, SiSpacePointForSeed*& p1, SiSpacePointForSeed*& p2, SiSpacePointForSeed*& p3, float z, float q) const; + /** This creates all possible seeds with the passed central and bottom SP, using all top SP + * candidates which are stored in the data.CmSp member. Seeds are scored by a quality score + * seeded by abs(d0), and modified if there is a second-seed confirmation or in case of PPP/SSS + * topologies. Then, they are written out via the newOneSeed method. + * @param[in,out] data Event data, used to read top SP candidates and write out found seeds (see newOneSeed). + * @param[in] SPb Bottom Space point for the seed creation + * @param[in] SP0 Central Space point for the seed creation + * @param[in] Zob z0 estimate + **/ void newOneSeedWithCurvaturesComparison (EventData& data, SiSpacePointForSeed*& SPb, SiSpacePointForSeed*& SP0, float Zob) const; + /// fills the seeds from the mapOneSeeds_Pro member into the l_seeds_Pro member of the data object, applying some more + /// quality requirements on the way. + /// @param[in,out] data Event data which is modified void fillSeeds(EventData& data) const; + + /** this method populates the data object's "histograms" (implemented as nested vectors). + * using the list of r-binned space points in the object assumed to have been previously + * set (for example via the newEvent method of this class). + * @param[in,out] data: Event data which will be updated. + **/ void fillLists(EventData& data) const; void erase(EventData& data) const; void production2Sp(EventData& data) const; + + + /** Top-level method for 3-SP seed production. + * This method loops over each eta-Z region, and in each region + * calls the extended production3Sp method below to do the actual work. + * @param[in,out] data Event data which will be updated + **/ void production3Sp(EventData& data) const; + + /** \brief: Seed production from space points. + * + * This method will try to find 3-SP combinations within a + * local phi-z region in the detector. + * + * The central SP of the seed will be taken from this region + * (technically via the first entry of the bottom candidate array, + * which always points to the phi-z bin of interest itself). + * + * The top SP is allowed to come from the same or one of several close-by + * phi-Z bins, as is the bottom SP. + * + * All SP collections are expected to be internally sorted in the radial coordinate. + * + * @param[in,out] data: Event data + * @param[in,out] iter_bottomCands: collection of iterators over SP collections for up to 9 phi-z cells to consider for the bottom space-point search + * @param[in,out] iter_endBottomCands: collection of end-iterators over the + * SP collections for up to 9 phi-z cells to consider for the bottom space-point search + * @param[in,out] iter_topCands: collection of iterators over SP collections for up to 9 phi-z cells to consider for the top space-point search + * @param[in,out] iter_endTopCands: collection of end-iterators over the + * SP collections for up to 9 phi-z cells to consider for the top space-point search + * @param[in] numberBottomCells: Number of bottom cells to consider. Determines how many entries in iter_(end)bottomCands are expected to be valid. + * @param[in] numberTopCells: Number of top cells to consider.Determines how many entries in iter_(end)topCands are expected to be valid. + * @param[out] nseed: Number of seeds found + **/ void production3Sp (EventData& data, - std::vector<InDet::SiSpacePointForSeed*>::iterator* rb, - std::vector<InDet::SiSpacePointForSeed*>::iterator* rbe, - std::vector<InDet::SiSpacePointForSeed*>::iterator* rt, - std::vector<InDet::SiSpacePointForSeed*>::iterator* rte, - const int NB, const int NT, int& nseed) const; + std::array<std::vector<InDet::SiSpacePointForSeed*>::iterator, arraySizeNeighbourBins> & iter_bottomCands, + std::array<std::vector<InDet::SiSpacePointForSeed*>::iterator, arraySizeNeighbourBins> & iter_endBottomCands, + std::array<std::vector<InDet::SiSpacePointForSeed*>::iterator, arraySizeNeighbourBins> & iter_topCands, + std::array<std::vector<InDet::SiSpacePointForSeed*>::iterator, arraySizeNeighbourBins> & iter_endTopCands, + const int numberBottomCells, const int numberTopCells, int& nseed) const; + + /// as above, but for the trigger void production3SpTrigger (EventData& data, - std::vector<InDet::SiSpacePointForSeed*>::iterator* rb, - std::vector<InDet::SiSpacePointForSeed*>::iterator* rbe, - std::vector<InDet::SiSpacePointForSeed*>::iterator* rt, - std::vector<InDet::SiSpacePointForSeed*>::iterator* rte, - const int NB, const int NT, int& nseed) const; + std::array<std::vector<InDet::SiSpacePointForSeed*>::iterator, arraySizeNeighbourBins> & rb, + std::array<std::vector<InDet::SiSpacePointForSeed*>::iterator, arraySizeNeighbourBins> & rbe, + std::array<std::vector<InDet::SiSpacePointForSeed*>::iterator, arraySizeNeighbourBins> & rt, + std::array<std::vector<InDet::SiSpacePointForSeed*>::iterator, arraySizeNeighbourBins> & rte, + const int numberBottomCells, const int numberTopCells, int& nseed) const; + /** This method updates the EventData based on the passed list of vertices. + * The list may be empty. + * Updates the isvertex, l_vertex, zminU and zmaxU members of the data object. + * Always returns false. + * @param[in,out] data Event data to update + * @param[in] lV possibly empty list of vertices + **/ bool newVertices(EventData& data, const std::list<Trk::Vertex>& lV) const; + /** This method is called within next() when we are out of vertices. + * It will internally trigger a re-run of production3Sp if we are out of seeds + * and data.endlist is not set (indicating the search is not finished). + **/ void findNext(EventData& data) const; bool isZCompatible(EventData& data, const float& Zv, const float& R, const float& T) const; - void convertToBeamFrameWork(EventData& data, const Trk::SpacePoint*const& sp, float* r) const; + + /** This method popualtes the r array + * with the space point's coordinates + * relative to the beam spot. + * @param[in] data Event data + * @param[in] sp: Space point to take the global position from + * @param[out] r: 3-array, will be populated with the relative coordinates + **/ + void convertToBeamFrameWork(EventData& data, const Trk::SpacePoint*const& sp, std::array<float,3> & r) const; + bool isUsed(const Trk::SpacePoint* sp, const Trk::PRDtoTrackMap &prd_to_track_map) const; void initializeEventData(EventData& data) const; diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_ATLxk.cxx b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_ATLxk.cxx index 70aea30a74f19b8bb675501a19f5bd7d8585d966..a89d4d99ee23c74303e893615b4a7b5d3ed7eaca 100644 --- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_ATLxk.cxx +++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_ATLxk.cxx @@ -20,7 +20,7 @@ #include <ostream> /////////////////////////////////////////////////////////////////// -// Constructor +/// Constructor /////////////////////////////////////////////////////////////////// InDet::SiSpacePointsSeedMaker_ATLxk::SiSpacePointsSeedMaker_ATLxk @@ -30,7 +30,7 @@ InDet::SiSpacePointsSeedMaker_ATLxk::SiSpacePointsSeedMaker_ATLxk } /////////////////////////////////////////////////////////////////// -// Initialisation +/// Initialisation /////////////////////////////////////////////////////////////////// StatusCode InDet::SiSpacePointsSeedMaker_ATLxk::initialize() @@ -41,19 +41,18 @@ StatusCode InDet::SiSpacePointsSeedMaker_ATLxk::initialize() ATH_CHECK(m_spacepointsSCT.initialize(m_sct)); ATH_CHECK(m_spacepointsOverlap.initialize(m_useOverlap)); - // Get beam geometry - // + /// Get beam geometry if (not m_beamSpotKey.empty()) { ATH_CHECK(m_beamSpotKey.initialize()); } ATH_CHECK( m_fieldCondObjInputKey.initialize() ); - // PRD-to-track association (optional) + /// PRD-to-track association (optional) ATH_CHECK( m_prdToTrackMap.initialize( !m_prdToTrackMap.key().empty())); - // Build framework - // + /// Build framework. Will set up internal variables + /// *not* related to the event data object buildFrameWork(); if (msgLvl(MSG::DEBUG)) { @@ -67,7 +66,7 @@ StatusCode InDet::SiSpacePointsSeedMaker_ATLxk::initialize() } /////////////////////////////////////////////////////////////////// -// Finalize +/// Finalize /////////////////////////////////////////////////////////////////// StatusCode InDet::SiSpacePointsSeedMaker_ATLxk::finalize() @@ -76,31 +75,38 @@ StatusCode InDet::SiSpacePointsSeedMaker_ATLxk::finalize() } /////////////////////////////////////////////////////////////////// -// Initialize tool for new event +/// Initialize tool for new event /////////////////////////////////////////////////////////////////// void InDet::SiSpacePointsSeedMaker_ATLxk::newEvent(const EventContext& ctx, EventData& data, int iteration) const { + /// if not done so, book the arrays etc inside the event data object if (not data.initialized) initializeEventData(data); data.trigger = false; if (!m_pixel && !m_sct) return; + /// pass the iteration info into our data object data.iteration = iteration; if (iteration <=0) data.iteration = 0; + /// Erase any existing entries in the data object erase(data); data.dzdrmin = m_dzdrmin0; data.dzdrmax = m_dzdrmax0; - data.umax = 100.; - if (!data.iteration) { + data.maxScore = 100.; ///< max score, where low scores are "better". + + /// in the first iteration, initialise the beam framework - beam spot position and direction + if (data.iteration == 0) { if (not m_beamSpotKey.empty()) { buildBeamFrameWork(data); } - double f[3], gP[3] ={10.,10.,0.}; + /// Read the field information + double magField[3]{0,0,0}; + double globalPos[3] ={10.,10.,0.}; MagField::AtlasFieldCache fieldCache; - // Get field cache object + /// Get field cache object SG::ReadCondHandle<AtlasFieldCacheCondObj> readHandle{m_fieldCondObjInputKey, ctx}; const AtlasFieldCacheCondObj* fieldCondObj{*readHandle}; if (fieldCondObj == nullptr) { @@ -110,28 +116,56 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::newEvent(const EventContext& ctx, Even fieldCondObj->getInitializedCache (fieldCache); if (fieldCache.solenoidOn()) { - fieldCache.getFieldZR(gP,f); - - data.K = 2./(300.*f[2]); + /// retrieve field + fieldCache.getFieldZR(globalPos,magField); + /** + * Knowing the field (note that the field cache returns the field in units of kiloTesla!) + * allows to set the circle-radius to pT conversion factor. + * + * See for example ATLAS-CONF-2010-072 + * R[mm] =pT[GeV] / (3·10−4×B[T]) = pT[MeV] / (300 *Bz[kT]) + * + * We actually estimate the circle diameter, 2R, in the seeding. + * So what we want is: 2R = pT[MeV] x 2 / (300 x Bz) = K x pT[MeV]. + **/ + data.K = 2./(300.*magField[2]); } else { data.K = 2./(300.* 5. ); } - + /** helper variables allowing us to directly apply our pt cut on the variables + * available at seed level. + * ipt2K is 1 / (K * 0.9 * pt cut)² + **/ data.ipt2K = m_ipt2/(data.K*data.K); + /// related to the mysterious magic number, m_COF{134*.05*9} data.ipt2C = m_ipt2*m_COF; data.COFK = m_COF*(data.K*data.K); + + /// set the spacepoint iterator to the beginning of the space-point list data.i_spforseed = data.l_spforseed.begin(); - } else { - data.r_first = 0; + } ///< end if-statement for iteration 0 + else { /// for the second iteration (PPP pass), don't redo the full init required the first time + data.r_first = 0; ///< reset the first radial bin + /// call fillLists to repopulate the candidate space points and exit fillLists(data); return; } + /// the following will only happen in the first iteration + data.checketa = data.dzdrmin > 1.; if (m_dbm) data.checketa = false; - float irstep = 1./m_r_rstep; - int irmax = m_r_size-1; + /// build the r-binning. + float oneOverBinSizeR = 1./m_binSizeR; + int maxBinR = m_nBinsR-1; + + /** This cleans up remaining entries in the data object. + * In standard execution, we only run this in the first + * iterations on a newly created data object, + * in which case this loop will not ever be entered. + * Leaving it in place for nonstandard use cases. + **/ for (int i=0; i<data.nr; ++i) { int n = data.r_index[i]; data.r_map[n] = 0; @@ -139,6 +173,7 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::newEvent(const EventContext& ctx, Even } data.ns = data.nr = 0; + /// read the prd to track map, in case we want to use it. SG::ReadHandle<Trk::PRDtoTrackMap> prd_to_track_map; const Trk::PRDtoTrackMap *prd_to_track_map_cptr = nullptr; if (!m_prdToTrackMap.key().empty()) { @@ -149,43 +184,64 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::newEvent(const EventContext& ctx, Even prd_to_track_map_cptr = prd_to_track_map.cptr(); } + ///////////////////////////// + /// Now, we will populate the space point list in the event data object once. + ///////////////////////////// + + /// reset the first r index data.r_first = 0; - // Get pixels space points containers from store gate - // + + /// Get pixels space points containers from store gate if (!m_dbm && m_pixel) { SG::ReadHandle<SpacePointContainer> spacepointsPixel{m_spacepointsPixel, ctx}; if (spacepointsPixel.isValid()) { - + /// loop over the pixel space points for (const SpacePointCollection* spc: *spacepointsPixel) { for (const Trk::SpacePoint* sp: *spc) { - + + /// if we use the PRD to track map and this SP has already been used in a track, bail out + /// also skip any SP outside the r binning if ((prd_to_track_map_cptr && isUsed(sp,*prd_to_track_map_cptr)) || sp->r() > m_r_rmax) continue; - // Remove DBM space points - // + /// Remove DBM space points + /// const InDetDD::SiDetectorElement* de= static_cast<const InDetDD::SiDetectorElement*>(sp->clusterList().first->detectorElement()); if (!de || de->isDBM()) continue; + /** create a SiSpacePointForSeed from the space point. + * This will also add the point to the l_spforseed list and update + * the i_spforseed iterator + **/ InDet::SiSpacePointForSeed* sps = newSpacePoint(data, sp); + /// this can occur if we fail the eta cut if (!sps) continue; - int ir = static_cast<int>(sps->radius()*irstep); - if (ir>irmax) ir = irmax; - data.r_Sorted[ir].push_back(sps); - ++data.r_map[ir]; - if (data.r_map[ir]==1) data.r_index[data.nr++] = ir; - if (ir > data.r_first) data.r_first = ir; + /// determine the r-bin of this SP. + /// done by dividing the radius by the bin size. + int radiusBin = static_cast<int>(sps->radius()*oneOverBinSizeR); + /// catch outliers + if (radiusBin>maxBinR) radiusBin = maxBinR; + + /// now add the SP to the r-binned vector + data.r_Sorted[radiusBin].push_back(sps); + /// increment the counter for this bin + ++data.r_map[radiusBin]; + /// if this is the first time we see this bin in use, we update the index map for this bin + /// to the radius bin index + if (data.r_map[radiusBin]==1) data.r_index[data.nr++] = radiusBin; + /// if this is the highest bin we saw so far, update the r_first member of the data object to this bin + if (radiusBin > data.r_first) data.r_first = radiusBin; + /// update the space point counter ++data.ns; - } - } - } - ++data.r_first; - } + } ///< end loop over space points in collection + }///< end loop over pixel SP collections + } ///< end if-statement on valid pixel SP container + ++data.r_first; ///< increment r_first past the last occupied bin we saw + } ///< end pixel case - // Get sct space points containers from store gate - // + /// Get sct space points containers from store gate if (!m_dbm && m_sct) { SG::ReadHandle<SpacePointContainer> spacepointsSCT{m_spacepointsSCT, ctx}; @@ -193,49 +249,61 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::newEvent(const EventContext& ctx, Even for (const SpacePointCollection* spc: *spacepointsSCT) { for (const Trk::SpacePoint* sp: *spc) { - + /// as for the pixel, veto already used SP if we are using the PRD to track map in later passes of track finding. + /// Also, veto SP outside the maximum radius if ((prd_to_track_map_cptr && isUsed(sp,*prd_to_track_map_cptr)) || sp->r() > m_r_rmax) continue; + /// create a space point and write it into the data object's list of points InDet::SiSpacePointForSeed* sps = newSpacePoint(data, sp); if (!sps) continue; - int ir = static_cast<int>(sps->radius()*irstep); - if (ir>irmax) ir = irmax; - data.r_Sorted[ir].push_back(sps); - ++data.r_map[ir]; - if (data.r_map[ir]==1) data.r_index[data.nr++] = ir; + /// as for PIX, determine the radial bin. + /// Note that for the SCT we do not update data.r_first. + int radiusBin = static_cast<int>(sps->radius()*oneOverBinSizeR); + if (radiusBin>maxBinR) radiusBin = maxBinR; + /// again store the SP in the r-binned vectors + data.r_Sorted[radiusBin].push_back(sps); + /// update the count of SP in the given bin + ++data.r_map[radiusBin]; + /// update the r_index map and data.nr if needed + if (data.r_map[radiusBin]==1) data.r_index[data.nr++] = radiusBin; + /// and increment the SP count too. ++data.ns; } } } - // Get sct overlap space points containers from store gate - // + /// Get sct overlap space points containers from store gate if (m_useOverlap && !data.checketa) { SG::ReadHandle<SpacePointOverlapCollection> spacepointsOverlap{m_spacepointsOverlap, ctx}; if (spacepointsOverlap.isValid()) { for (const Trk::SpacePoint* sp: *spacepointsOverlap) { - + /// usual rejection of SP used in previous track finding passes if we run with the PRT to track map + check of the max radius if ((prd_to_track_map_cptr && isUsed(sp, *prd_to_track_map_cptr)) || sp->r() > m_r_rmax) continue; + /// SP creation, entry into list of the data object InDet::SiSpacePointForSeed* sps = newSpacePoint(data, sp); if (!sps) continue; - int ir = static_cast<int>(sps->radius()*irstep); - if (ir>irmax) ir = irmax; - data.r_Sorted[ir].push_back(sps); - ++data.r_map[ir]; - if (data.r_map[ir]==1) data.r_index[data.nr++] = ir; + /// radial bin determination + int radiusBin = static_cast<int>(sps->radius()*oneOverBinSizeR); + if (radiusBin>maxBinR) radiusBin = maxBinR; + /// insert into the "histogram" vector + data.r_Sorted[radiusBin].push_back(sps); + /// update the counter for each bin content + ++data.r_map[radiusBin]; + /// update the bin index list and occupied bin counter + if (data.r_map[radiusBin]==1) data.r_index[data.nr++] = radiusBin; + /// and the total SP count too. ++data.ns; } } } } - // Get pixels space points containers from store gate for DBM reconstruction - // + /// Get pixels space points containers from store gate for DBM reconstruction if (m_dbm) { SG::ReadHandle<SpacePointContainer> spacepointsPixel{m_spacepointsPixel, ctx}; @@ -244,35 +312,42 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::newEvent(const EventContext& ctx, Even for (const SpacePointCollection* spc: *spacepointsPixel) { for (const Trk::SpacePoint* sp: *spc) { - // Keep only DBM space points - // + /// Keep only DBM space points const InDetDD::SiDetectorElement* de= static_cast<const InDetDD::SiDetectorElement*>(sp->clusterList().first->detectorElement()); if (!de || !de->isDBM() || sp->r() > m_r_rmax) continue; + /// the following logic follows what is done above for the other species, + /// please see there for detailed explanation InDet::SiSpacePointForSeed* sps = newSpacePoint(data, sp); if (!sps) continue; - int ir = static_cast<int>(sps->radius()*irstep); - if (ir>irmax) ir = irmax; - data.r_Sorted[ir].push_back(sps); - ++data.r_map[ir]; - if (data.r_map[ir]==1) data.r_index[data.nr++] = ir; - if (ir > data.r_first) data.r_first = ir; + + int radiusBin = static_cast<int>(sps->radius()*oneOverBinSizeR); + if (radiusBin>maxBinR) radiusBin = maxBinR; + data.r_Sorted[radiusBin].push_back(sps); + ++data.r_map[radiusBin]; + if (data.r_map[radiusBin]==1) data.r_index[data.nr++] = radiusBin; + if (radiusBin > data.r_first) data.r_first = radiusBin; ++data.ns; } } } ++data.r_first; } + /// negative iterations are not used in the current run-3 reco if (iteration < 0) data.r_first = 0; + + /// populates the phi-z sorted histograms using the spacepoint lists and r-binning. + /// after this call, we have a 3D binning fillLists(data); } /////////////////////////////////////////////////////////////////// -// Initialize tool for new region +/// Initialize tool for new region /////////////////////////////////////////////////////////////////// +/// not used in offline reco (trigger specific) void InDet::SiSpacePointsSeedMaker_ATLxk::newRegion (const EventContext& ctx, EventData& data, const std::vector<IdentifierHash>& vPixel, const std::vector<IdentifierHash>& vSCT) const @@ -286,13 +361,14 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::newRegion data.dzdrmin = m_dzdrmin0; data.dzdrmax = m_dzdrmax0; - data.umax = 100.; + data.maxScore = 100.; if (not m_beamSpotKey.empty()) { buildBeamFrameWork(data); } - double f[3], gP[3] ={10.,10.,0.}; + double magField[3]{0,0,0}; + double globalPos[3] ={10.,10.,0.}; MagField::AtlasFieldCache fieldCache; // Get field cache object @@ -305,10 +381,11 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::newRegion } fieldCondObj->getInitializedCache (fieldCache); + // initialise pt cuts and conversion factors if (fieldCache.solenoidOn()) { - fieldCache.getFieldZR(gP,f); + fieldCache.getFieldZR(globalPos,magField); - data.K = 2./(300.*f[2]); + data.K = 2./(300.*magField[2]); } else { data.K = 2./(300.* 5. ); } @@ -319,8 +396,8 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::newRegion data.i_spforseed = data.l_spforseed.begin(); - float irstep = 1./m_r_rstep; - int irmax = m_r_size-1; + float oneOverBinSizeR = 1./m_binSizeR; + int maxBinR = m_nBinsR-1; data.r_first = 0; data.checketa = false; @@ -349,8 +426,8 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::newRegion float r = sp->r(); if (r > m_r_rmax) continue; InDet::SiSpacePointForSeed* sps = newSpacePoint(data, sp); - int ir = static_cast<int>(sps->radius()*irstep); - if (ir>irmax) ir = irmax; + int ir = static_cast<int>(sps->radius()*oneOverBinSizeR); + if (ir>maxBinR) ir = maxBinR; data.r_Sorted[ir].push_back(sps); ++data.r_map[ir]; if (data.r_map[ir]==1) data.r_index[data.nr++] = ir; @@ -377,8 +454,8 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::newRegion float r = sp->r(); if (r > m_r_rmax) continue; InDet::SiSpacePointForSeed* sps = newSpacePoint(data, sp); - int ir = static_cast<int>(sps->radius()*irstep); - if (ir>irmax) ir = irmax; + int ir = static_cast<int>(sps->radius()*oneOverBinSizeR); + if (ir>maxBinR) ir = maxBinR; data.r_Sorted[ir].push_back(sps); ++data.r_map[ir]; if (data.r_map[ir]==1) data.r_index[data.nr++] = ir; @@ -391,7 +468,7 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::newRegion } /////////////////////////////////////////////////////////////////// -// Initialize tool for new region +/// Initialize tool for new region /////////////////////////////////////////////////////////////////// void InDet::SiSpacePointsSeedMaker_ATLxk::newRegion @@ -399,15 +476,15 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::newRegion const std::vector<IdentifierHash>& vPixel, const std::vector<IdentifierHash>& vSCT, const IRoiDescriptor& IRD) const { - constexpr float pi2 = 2.*M_PI; + constexpr float twoPi = 2.*M_PI; if (not data.initialized) initializeEventData(data); newRegion(ctx, data, vPixel, vSCT); data.trigger = true; - double dzdrmin = 1./tan(2.*atan(exp(-IRD.etaMinus()))); - double dzdrmax = 1./tan(2.*atan(exp(-IRD.etaPlus ()))); + double dzdrmin = 1./std::tan(2.*std::atan(std::exp(-IRD.etaMinus()))); + double dzdrmax = 1./std::tan(2.*std::atan(std::exp(-IRD.etaPlus ()))); data.zminB = IRD.zedMinus()-data.zbeam[0]; // min bottom Z data.zmaxB = IRD.zedPlus ()-data.zbeam[0]; // max bottom Z @@ -415,14 +492,14 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::newRegion data.zmaxU = data.zmaxB+550.*dzdrmax; double fmax = IRD.phiPlus (); double fmin = IRD.phiMinus(); - if (fmin > fmax) fmin -= pi2; + if (fmin > fmax) fmin -= twoPi; data.ftrig = (fmin+fmax)*.5; data.ftrigW = (fmax-fmin)*.5; } /////////////////////////////////////////////////////////////////// -// Methods to initilize different strategies of seeds production -// with two space points with or without vertex constraint +/// Methods to initilize different strategies of seeds production +/// with two space points with or without vertex constraint /////////////////////////////////////////////////////////////////// void InDet::SiSpacePointsSeedMaker_ATLxk::find2Sp(EventData& data, const std::list<Trk::Vertex>& lv) const @@ -458,21 +535,26 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::find2Sp(EventData& data, const std::li } /////////////////////////////////////////////////////////////////// -// Methods to initilize different strategies of seeds production -// with three space points with or without vertex constraint +/// Methods to initilize different strategies of seeds production +/// with three space points with or without vertex constraint /////////////////////////////////////////////////////////////////// void InDet::SiSpacePointsSeedMaker_ATLxk::find3Sp(const EventContext&, EventData& data, const std::list<Trk::Vertex>& lv) const { if (not data.initialized) initializeEventData(data); + /// reset the Z interval stored in the data object data.zminU = m_zmin; data.zmaxU = m_zmax; - + /// mode 2 if we have no vertices in the list, otherwise mode 3 int mode = 2; if (lv.begin()!=lv.end()) mode = 3; + /** copy the vertices into the data object, if we have any. + * Note that by construction, newv will ALWAYS be false, also if we + * pass vertices. + **/ bool newv = newVertices(data, lv); - + /// update the data object's config if (newv || !data.state || data.nspoint!=3 || data.mode!=mode || data.nlist) { data.i_seede_Pro = data.l_seeds_Pro.begin(); data.state = 1; @@ -483,8 +565,10 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::find3Sp(const EventContext&, EventData data.fvNmin = 0; data.fNmin = 0; data.zMin = 0; - production3Sp(data); + production3Sp(data); ///< This performs the actual seed finding } + /// reset the i_seed_Pro iterator - this is used to return the seeds to the + /// consumer when they call next() data.i_seed_Pro = data.l_seeds_Pro.begin(); @@ -495,23 +579,30 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::find3Sp(const EventContext&, EventData } /////////////////////////////////////////////////////////////////// -// Methods to initilize different strategies of seeds production -// with three space points with or without vertex constraint +/// Methods to initilize different strategies of seeds production +/// with three space points with or without vertex constraint /////////////////////////////////////////////////////////////////// void InDet::SiSpacePointsSeedMaker_ATLxk::find3Sp(const EventContext&, EventData& data, const std::list<Trk::Vertex>& lv, const double* ZVertex) const { if (not data.initialized) initializeEventData(data); + /// Update the data object's Z interval based on the interval passed as arg to this + /// function. data.zminU = ZVertex[0]; - if (data.zminU < m_zmin) data.zminU = m_zmin; + if (data.zminU < m_zmin) data.zminU = m_zmin; ///< don't go beyond user-specified intervals data.zmaxU = ZVertex[1]; - if (data.zmaxU > m_zmax) data.zmaxU = m_zmax; + if (data.zmaxU > m_zmax) data.zmaxU = m_zmax; ///< don't go beyond user-specified intervals + /// mode 2 when working with the Z constraint int mode = 2; if (lv.begin()!=lv.end()) mode = 3; + /** copy the vertices into the data object, if we have any. + * Note that by construction, newv will ALWAYS be false, also if we + * pass vertices. + **/ bool newv = newVertices(data, lv); - + /// update the data object's config if (newv || !data.state || data.nspoint!=3 || data.mode!=mode || data.nlist) { data.i_seede_Pro = data.l_seeds_Pro.begin(); data.state = 1; @@ -522,8 +613,10 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::find3Sp(const EventContext&, EventData data.fvNmin = 0; data.fNmin = 0; data.zMin = 0; - production3Sp(data); + production3Sp(data); ///< This performs the actual seed finding } + /// reset the i_seed_Pro iterator - this is used to return the seeds to the + /// consumer when they call next() data.i_seed_Pro = data.l_seeds_Pro.begin(); if (msgLvl(MSG::DEBUG)) { @@ -533,9 +626,9 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::find3Sp(const EventContext&, EventData } /////////////////////////////////////////////////////////////////// -// Methods to initilize different strategies of seeds production -// with variable number space points with or without vertex constraint -// Variable means (2,3,4,....) any number space points +/// Methods to initilize different strategies of seeds production +/// with variable number space points with or without vertex constraint +/// Variable means (2,3,4,....) any number space points /////////////////////////////////////////////////////////////////// void InDet::SiSpacePointsSeedMaker_ATLxk::findVSp(const EventContext&, EventData& data, const std::list<Trk::Vertex>& lv) const @@ -570,7 +663,7 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::findVSp(const EventContext&, EventData } /////////////////////////////////////////////////////////////////// -// Dumps relevant information into the MsgStream +/// Dumps relevant information into the MsgStream /////////////////////////////////////////////////////////////////// MsgStream& InDet::SiSpacePointsSeedMaker_ATLxk::dump(EventData& data, MsgStream& out) const @@ -582,7 +675,7 @@ MsgStream& InDet::SiSpacePointsSeedMaker_ATLxk::dump(EventData& data, MsgStream& } /////////////////////////////////////////////////////////////////// -// Dumps conditions information into the MsgStream +/// Dumps conditions information into the MsgStream /////////////////////////////////////////////////////////////////// MsgStream& InDet::SiSpacePointsSeedMaker_ATLxk::dumpConditions(EventData &data, MsgStream& out) const @@ -636,7 +729,7 @@ MsgStream& InDet::SiSpacePointsSeedMaker_ATLxk::dumpConditions(EventData &data, <<std::setw(12)<<std::setprecision(5)<<m_r_rmax <<" |"<<endmsg; out<<"| radius step | " - <<std::setw(12)<<std::setprecision(5)<<m_r_rstep + <<std::setw(12)<<std::setprecision(5)<<m_binSizeR <<" |"<<endmsg; out<<"| min Z-vertex position | " <<std::setw(12)<<std::setprecision(5)<<m_zmin @@ -687,13 +780,13 @@ MsgStream& InDet::SiSpacePointsSeedMaker_ATLxk::dumpConditions(EventData &data, <<std::setw(12)<<std::setprecision(5)<<m_dzdrver <<" |"<<endmsg; out<<"| max impact | " - <<std::setw(12)<<std::setprecision(5)<<m_diver + <<std::setw(12)<<std::setprecision(5)<<m_maxdImpact <<" |"<<endmsg; out<<"| max impact pps | " - <<std::setw(12)<<std::setprecision(5)<<m_diverpps + <<std::setw(12)<<std::setprecision(5)<<m_maxdImpactPPS <<" |"<<endmsg; out<<"| max impact sss | " - <<std::setw(12)<<std::setprecision(5)<<m_diversss + <<std::setw(12)<<std::setprecision(5)<<m_maxdImpactSSS <<" |"<<endmsg; out<<"|---------------------------------------------------------------------|" <<endmsg; @@ -727,7 +820,7 @@ MsgStream& InDet::SiSpacePointsSeedMaker_ATLxk::dumpConditions(EventData &data, } /////////////////////////////////////////////////////////////////// -// Dumps event information into the MsgStream +/// Dumps event information into the MsgStream /////////////////////////////////////////////////////////////////// MsgStream& InDet::SiSpacePointsSeedMaker_ATLxk::dumpEvent(EventData& data, MsgStream& out) const @@ -752,7 +845,7 @@ MsgStream& InDet::SiSpacePointsSeedMaker_ATLxk::dumpEvent(EventData& data, MsgSt } /////////////////////////////////////////////////////////////////// -// Find next set space points +/// Find next set space points /////////////////////////////////////////////////////////////////// void InDet::SiSpacePointsSeedMaker_ATLxk::findNext(EventData& data) const @@ -770,7 +863,7 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::findNext(EventData& data) const } /////////////////////////////////////////////////////////////////// -// New and old list vertices comparison +/// New and old list vertices comparison /////////////////////////////////////////////////////////////////// bool InDet::SiSpacePointsSeedMaker_ATLxk::newVertices(EventData& data, const std::list<Trk::Vertex>& lV) const @@ -778,22 +871,32 @@ bool InDet::SiSpacePointsSeedMaker_ATLxk::newVertices(EventData& data, const std unsigned int s1 = data.l_vertex.size(); unsigned int s2 = lV.size(); + /// reset the isvertex flag data.isvertex = false; + /// if we had no vertices before and have none now, + /// we can exit right away if (s1==0 && s2==0) return false; + /// clean up the vertex list data.l_vertex.clear(); + /// if we have no vertices now, we can exit if (s2 == 0) return false; + /// otherwise, update the data with the new vertices data.isvertex = true; for (const Trk::Vertex& v: lV) { data.l_vertex.insert(static_cast<float>(v.position().z())); } + /// and also update the z interval, adding 20mm before/after the first/last vertex in z + /// make sure not to extend the interval beyond the user-configured z interval. data.zminU = (*data.l_vertex. begin())-20.; if (data.zminU < m_zmin) data.zminU = m_zmin; data.zmaxU = (*data.l_vertex.rbegin())+20.; if (data.zmaxU > m_zmax) data.zmaxU = m_zmax; + /// Ich bin der Geist, der stets verneint! + /// are we sure this is not a bug? return false; } @@ -803,209 +906,280 @@ bool InDet::SiSpacePointsSeedMaker_ATLxk::newVertices(EventData& data, const std void InDet::SiSpacePointsSeedMaker_ATLxk::buildFrameWork() { - m_ptmin = fabs(m_ptmin); + m_ptmin = std::abs(m_ptmin); - // For DBM reconstruction we use new parameters - // + /// For DBM reconstruction we use new parameters if (m_dbm) { m_r_rmax = 150.; - m_r_rstep = .5; + m_binSizeR = .5; m_drmin = 2.; m_ptmin = 10.; - m_diver = 150.; + m_maxdImpact = 150.; } else if (m_ptmin < 100.) { m_ptmin = 100.; } - if (m_diversss < m_diver ) m_diversss = m_diver; - if (m_divermax < m_diversss) m_divermax = m_diversss; - - if (fabs(m_etamin) < .1) m_etamin = -m_etamax; - m_dzdrmax0 = 1./tan(2.*atan(exp(-m_etamax))); - m_dzdrmin0 = 1./tan(2.*atan(exp(-m_etamin))); + /// ensure consistency in the transverse IP cuts + if (m_maxdImpactSSS < m_maxdImpact ) m_maxdImpactSSS = m_maxdImpact; + if (m_maxdImpactDecays < m_maxdImpactSSS) m_maxdImpactDecays = m_maxdImpactSSS; + + /// symmetrise eta cut if eta min not explicitly set + if (std::abs(m_etamin) < .1) m_etamin = -m_etamax; + /// set dz/dr cut values based on eta cuts + m_dzdrmax0 = 1./std::tan(2.*std::atan(std::exp(-m_etamax))); + m_dzdrmin0 = 1./std::tan(2.*std::atan(std::exp(-m_etamin))); m_r3max = m_r_rmax; - m_COF = 134*.05*9.; - m_ipt = 1./fabs(.9*m_ptmin); + /// cache inverse pt cuts + m_ipt = 1./std::abs(.9*m_ptmin); m_ipt2 = m_ipt*m_ipt; - // Build radius sorted containers - // - m_r_size = static_cast<int>((m_r_rmax+.1)/m_r_rstep); + /// Build radius sorted containers + m_nBinsR = static_cast<int>((m_r_rmax+.1)/m_binSizeR); - // Build radius-azimuthal sorted containers - // - constexpr float pi2 = 2.*M_PI; - const int NFmax = SizeRF; - const float sFmax = static_cast<float>(NFmax)/pi2; - const float sFmin = 100./60.; + /** + * Now we construct the radius-azimuthal sorted containers. + * Binning is determined semi-dynamically based on the tool config + **/ + + /// determine the phi binning + constexpr float twoPi = 2.*M_PI; + /// The max Nb. of bins possible is given by the binning enum + const int nPhiBinsMax = arraySizePhi; + const float inverseSizePhiMax = static_cast<float>(nPhiBinsMax)/twoPi; ///< for run-3: 53 : 6.28 ~ 8.43, bin size 0.118 + + /// the minumum allowed granularity is given by a magic number. + /// best guess: 100 MeV min track pt? + const float inverseSizePhiMin = 100./60.; ///< 1.67, bin size 0.6 + + /// minimum expected pt. float ptm = 400.; + /// if we cut below 400 MeV, adapt the ptm if (!m_dbm && m_ptmin < ptm) ptm = m_ptmin; - m_sF = ptm /60.; - if (m_sF > sFmax) m_sF = sFmax; - else if (m_sF < sFmin) m_sF = sFmin; - m_fNmax = static_cast<int>(pi2*m_sF); - if (m_fNmax >=NFmax) m_fNmax = NFmax-1; + /// binning driven by the min pt we expect + /// likely driven by the phi rotation we expect between 2 SP at miminum pt (max curvature) + m_inverseBinSizePhi = ptm /60.; + /// for example 400. / 60 = 6.67, bin size 0.15 - // Build radius-azimuthal-Z sorted containers for Z-vertices - // - const int NFtmax = SizeRFV; - const float sFvmax = static_cast<float>(NFtmax)/pi2; - m_sFv = m_ptmin/120.; - if (m_sFv > sFvmax) m_sFv = sFvmax; - m_fvNmax = static_cast<int>(pi2*m_sFv); - if (m_fvNmax>=NFtmax) m_fvNmax = NFtmax-1; - - // Build maps for radius-azimuthal-Z sorted collections - // - for (int f=0; f<=m_fNmax; ++f) { + /// truncate the bin size to fall within our thresholds + if (m_inverseBinSizePhi > inverseSizePhiMax) m_inverseBinSizePhi = inverseSizePhiMax; + else if (m_inverseBinSizePhi < inverseSizePhiMin) m_inverseBinSizePhi = inverseSizePhiMin; + + /// now we can determine the number of bins by dividing the interval by the bin size + m_maxPhiBin = static_cast<int>(twoPi*m_inverseBinSizePhi); + /// additional protection against too many bins. Should not happen given constraints above + if (m_maxPhiBin >=nPhiBinsMax) m_maxPhiBin = nPhiBinsMax-1; + + /// Build radius-azimuthal-Z sorted containers for Z-vertices + /// same logic as for the space points above + const int nPhiBinsVertexMax = arraySizePhiV; + const float inverseBinSizePhiVertexMax = static_cast<float>(nPhiBinsVertexMax)/twoPi; + m_inverseBinSizePhiVertex = m_ptmin/120.; + if (m_inverseBinSizePhiVertex > inverseBinSizePhiVertexMax) m_inverseBinSizePhiVertex = inverseBinSizePhiVertexMax; + m_maxBinPhiVertex = static_cast<int>(twoPi*m_inverseBinSizePhiVertex); + if (m_maxBinPhiVertex>=nPhiBinsVertexMax) m_maxBinPhiVertex = nPhiBinsVertexMax-1; + + + /// Build maps for radius-azimuthal-Z sorted collections. + /// Here, we associate which bins are 'connected' to a given phi-Z bin + /// for the seeding + + for (int phiBin=0; phiBin<=m_maxPhiBin; ++phiBin) { - int fb = f-1; - if (fb<0) fb=m_fNmax; - int ft = f+1; - if (ft>m_fNmax) ft=0; + int phiBelow = phiBin-1; + if (phiBelow<0) phiBelow=m_maxPhiBin; ///< loop around at edges of range + + int phiAbove = phiBin+1; + if (phiAbove>m_maxPhiBin) phiAbove=0; ///< loop around at edges of range - // For each azimuthal region loop through all Z regions - // - for (int z=0; z<SizeZ; ++z) { + /// For each azimuthal region loop through all Z regions + for (int z=0; z<arraySizeZ; ++z) { + + /// we always include the two neighbouring phi bins for the top / bottom + /// space point search - int a = f *SizeZ+z; - int b = fb*SizeZ+z; - int c = ft*SizeZ+z; - m_rfz_b [a] = 3; m_rfz_t [a] = 3; - m_rfz_ib[a][0] = a; m_rfz_it[a][0] = a; - m_rfz_ib[a][1] = b; m_rfz_it[a][1] = b; - m_rfz_ib[a][2] = c; m_rfz_it[a][2] = c; + int twoDbinSamePhi = phiBin * arraySizeZ+z; + int twoDbinLowerPhi = phiBelow*arraySizeZ+z; + int twoDbinHigherPhi = phiAbove* arraySizeZ+z; + + m_nNeighbourCellsBottom [twoDbinSamePhi] = 3; + m_nNeighbourCellsTop [twoDbinSamePhi] = 3; + + m_neighbourCellsBottom[twoDbinSamePhi][0] = twoDbinSamePhi; + m_neighbourCellsTop[twoDbinSamePhi][0] = twoDbinSamePhi; + + m_neighbourCellsBottom[twoDbinSamePhi][1] = twoDbinLowerPhi; + m_neighbourCellsTop[twoDbinSamePhi][1] = twoDbinLowerPhi; + + m_neighbourCellsBottom[twoDbinSamePhi][2] = twoDbinHigherPhi; + m_neighbourCellsTop[twoDbinSamePhi][2] = twoDbinHigherPhi; + + /** in addition, we usually add at least one neighbouring slice + * in Z. This depends on where we are in the detector. + * Guide for the following: + * z == 5: central z region, |z|<250mm + * 0 1 2 3 4 5 6 7 8 9 10 z bin index + * --------------------------------------> Z[mm] + * Z=-2500 IP,Z=0 Z=+2500 + **/ if (z==5) { - - m_rfz_t [a] = 9; - m_rfz_it[a][3] = a+1; - m_rfz_it[a][4] = b+1; - m_rfz_it[a][5] = c+1; - m_rfz_it[a][6] = a-1; - m_rfz_it[a][7] = b-1; - m_rfz_it[a][8] = c-1; - } else if (z> 5) { - - m_rfz_b [a] = 6; - m_rfz_ib[a][3] = a-1; - m_rfz_ib[a][4] = b-1; - m_rfz_ib[a][5] = c-1; + m_nNeighbourCellsTop [twoDbinSamePhi] = 9; + // in the central z region, we include the two neighbouring + // z slices for the top neighbour search + + m_neighbourCellsTop[twoDbinSamePhi][3] = twoDbinSamePhi+1; + m_neighbourCellsTop[twoDbinSamePhi][4] = twoDbinLowerPhi+1; + m_neighbourCellsTop[twoDbinSamePhi][5] = twoDbinHigherPhi+1; + m_neighbourCellsTop[twoDbinSamePhi][6] = twoDbinSamePhi-1; + m_neighbourCellsTop[twoDbinSamePhi][7] = twoDbinLowerPhi-1; + m_neighbourCellsTop[twoDbinSamePhi][8] = twoDbinHigherPhi-1; + } + // z > 5: positive z values, |z| > 250mm + else if (z> 5) { + // for the bottom SP search in positive non-central z, we include the + // neighbouring Z region on the left (towards the IP) in the bottom + // neighbour search + m_nNeighbourCellsBottom [twoDbinSamePhi] = 6; + m_neighbourCellsBottom[twoDbinSamePhi][3] = twoDbinSamePhi-1; + m_neighbourCellsBottom[twoDbinSamePhi][4] = twoDbinLowerPhi-1; + m_neighbourCellsBottom[twoDbinSamePhi][5] = twoDbinHigherPhi-1; if (z<10) { - - m_rfz_t [a] = 6; - m_rfz_it[a][3] = a+1; - m_rfz_it[a][4] = b+1; - m_rfz_it[a][5] = c+1; + /** for the top SP search in positive z, + * if we are not in the outermost z region, + * we include the neighbouring Z region on the right (away from the IP). + * In z = 10, the most forward, we do not have such a 'right side' neighbour we can add + **/ + m_nNeighbourCellsTop [twoDbinSamePhi] = 6; + m_neighbourCellsTop[twoDbinSamePhi][3] = twoDbinSamePhi+1; + m_neighbourCellsTop[twoDbinSamePhi][4] = twoDbinLowerPhi+1; + m_neighbourCellsTop[twoDbinSamePhi][5] = twoDbinHigherPhi+1; } - } else { - - m_rfz_b [a] = 6; - m_rfz_ib[a][3] = a+1; - m_rfz_ib[a][4] = b+1; - m_rfz_ib[a][5] = c+1; + } + // z < 5: negative z values, |z| > 250mm + else { + /** for the bottom SP in negative non-central z, we include + * the neighbouring z region on the right (towards the IP) in the + * bottom neighbour search + **/ + m_nNeighbourCellsBottom [twoDbinSamePhi] = 6; + m_neighbourCellsBottom[twoDbinSamePhi][3] = twoDbinSamePhi+1; + m_neighbourCellsBottom[twoDbinSamePhi][4] = twoDbinLowerPhi+1; + m_neighbourCellsBottom[twoDbinSamePhi][5] = twoDbinHigherPhi+1; if (z>0) { - - m_rfz_t [a] = 6; - m_rfz_it[a][3] = a-1; - m_rfz_it[a][4] = b-1; - m_rfz_it[a][5] = c-1; + // if there is a z region on the left (away from the IP), we include it in the top + // neighbour search + m_nNeighbourCellsTop [twoDbinSamePhi] = 6; + m_neighbourCellsTop[twoDbinSamePhi][3] = twoDbinSamePhi-1; + m_neighbourCellsTop[twoDbinSamePhi][4] = twoDbinLowerPhi-1; + m_neighbourCellsTop[twoDbinSamePhi][5] = twoDbinHigherPhi-1; } } + /** + * z bins 3 / 7: 450mm < |z| < 925mm.: + * also include the central z region in the bottom SP search. + * likely for PPP seeds with hits in pixel barrel + endcaps + **/ if (z==3) { - m_rfz_b[a] = 9; - m_rfz_ib[a][6] = a+2; - m_rfz_ib[a][7] = b+2; - m_rfz_ib[a][8] = c+2; + m_nNeighbourCellsBottom[twoDbinSamePhi] = 9; + m_neighbourCellsBottom[twoDbinSamePhi][6] = twoDbinSamePhi+2; + m_neighbourCellsBottom[twoDbinSamePhi][7] = twoDbinLowerPhi+2; + m_neighbourCellsBottom[twoDbinSamePhi][8] = twoDbinHigherPhi+2; } else if (z==7) { - m_rfz_b[a] = 9; - m_rfz_ib[a][6] = a-2; - m_rfz_ib[a][7] = b-2; - m_rfz_ib[a][8] = c-2; + m_nNeighbourCellsBottom[twoDbinSamePhi] = 9; + m_neighbourCellsBottom[twoDbinSamePhi][6] = twoDbinSamePhi-2; + m_neighbourCellsBottom[twoDbinSamePhi][7] = twoDbinLowerPhi-2; + m_neighbourCellsBottom[twoDbinSamePhi][8] = twoDbinHigherPhi-2; } } } - // Build maps for radius-azimuthal-Z sorted collections for Z - // - for (int f=0; f<=m_fvNmax; ++f) { + /// Build maps for radius-azimuthal-Z sorted collections for Z + /// Similar logic to the above, just simplified as only 3 + /// regions in z exist! + for (int phiBin=0; phiBin<=m_maxBinPhiVertex; ++phiBin) { + + int phiBinBelow = phiBin-1; + if (phiBinBelow<0) phiBinBelow=m_maxBinPhiVertex; - int fb = f-1; - if (fb<0) fb=m_fvNmax; - int ft = f+1; - if (ft>m_fvNmax) ft=0; + int phiBinTop = phiBin+1; + if (phiBinTop>m_maxBinPhiVertex) phiBinTop=0; - // For each azimuthal region loop through central Z regions - // - for (int z=0; z<SizeZV; ++z) { + /// For each azimuthal region loop through central Z regions + for (int zbin=0; zbin<arraySizeZV; ++zbin) { - int a = f *SizeZV+z; - int b = fb*SizeZV+z; - int c = ft*SizeZV+z; - m_rfzv_n[a] = 3; - m_rfzv_i[a][0] = a; - m_rfzv_i[a][1] = b; - m_rfzv_i[a][2] = c; - if (z>1) { - m_rfzv_n[a] = 6; - m_rfzv_i[a][3] = a-1; - m_rfzv_i[a][4] = b-1; - m_rfzv_i[a][5] = c-1; - } else if (z<1) { - m_rfzv_n[a] = 6; - m_rfzv_i[a][3] = a+1; - m_rfzv_i[a][4] = b+1; - m_rfzv_i[a][5] = c+1; + int twoDbinSamePhi = phiBin *arraySizeZV+zbin; + int twoDbinLowePhi = phiBinBelow*arraySizeZV+zbin; + int twoDbinHigherPhi = phiBinTop*arraySizeZV+zbin; + + /// always include the two neighbour bins in phi + m_nNeighboursVertexPhiZ[twoDbinSamePhi] = 3; + m_neighboursVertexPhiZ[twoDbinSamePhi][0] = twoDbinSamePhi; + m_neighboursVertexPhiZ[twoDbinSamePhi][1] = twoDbinLowePhi; + m_neighboursVertexPhiZ[twoDbinSamePhi][2] = twoDbinHigherPhi; + + /// for the positive z bin, include the central z slice as well + if (zbin>1) { + m_nNeighboursVertexPhiZ[twoDbinSamePhi] = 6; + m_neighboursVertexPhiZ[twoDbinSamePhi][3] = twoDbinSamePhi-1; + m_neighboursVertexPhiZ[twoDbinSamePhi][4] = twoDbinLowePhi-1; + m_neighboursVertexPhiZ[twoDbinSamePhi][5] = twoDbinHigherPhi-1; + } + /// for the negative z bin, include the central z slice as well + else if (zbin<1) { + m_nNeighboursVertexPhiZ[twoDbinSamePhi] = 6; + m_neighboursVertexPhiZ[twoDbinSamePhi][3] = twoDbinSamePhi+1; + m_neighboursVertexPhiZ[twoDbinSamePhi][4] = twoDbinLowePhi+1; + m_neighboursVertexPhiZ[twoDbinSamePhi][5] = twoDbinHigherPhi+1; } } } } /////////////////////////////////////////////////////////////////// -// Initiate beam frame work for seed generator +/// Initiate beam frame work for seed generator /////////////////////////////////////////////////////////////////// void InDet::SiSpacePointsSeedMaker_ATLxk::buildBeamFrameWork(EventData& data) const { SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle { m_beamSpotKey }; - const Amg::Vector3D &cb = beamSpotHandle->beamPos(); - double tx = tan(beamSpotHandle->beamTilt(0)); - double ty = tan(beamSpotHandle->beamTilt(1)); + const Amg::Vector3D &bsCentre = beamSpotHandle->beamPos(); + double tx = std::tan(beamSpotHandle->beamTilt(0)); + double ty = std::tan(beamSpotHandle->beamTilt(1)); - double ph = atan2(ty,tx); - double th = acos(1./sqrt(1.+tx*tx+ty*ty)); - double sint = sin(th); - double cost = cos(th); - double sinp = sin(ph); - double cosp = cos(ph); + double phi = std::atan2(ty,tx); + double theta = std::acos(1./std::sqrt(1.+tx*tx+ty*ty)); + double sinTheta = std::sin(theta); + double cosTheta = std::cos(theta); + double sinPhi = std::sin(phi); + double cosPhi = std::cos(phi); - data.xbeam[0] = static_cast<float>(cb.x()); - data.xbeam[1] = static_cast<float>(cost*cosp*cosp+sinp*sinp); - data.xbeam[2] = static_cast<float>(cost*sinp*cosp-sinp*cosp); - data.xbeam[3] =-static_cast<float>(sint*cosp ); - - data.ybeam[0] = static_cast<float>(cb.y()); - data.ybeam[1] = static_cast<float>(cost*cosp*sinp-sinp*cosp); - data.ybeam[2] = static_cast<float>(cost*sinp*sinp+cosp*cosp); - data.ybeam[3] =-static_cast<float>(sint*sinp ); + data.xbeam[0] = static_cast<float>(bsCentre.x()); + data.xbeam[1] = static_cast<float>(cosTheta*cosPhi*cosPhi+sinPhi*sinPhi); + data.xbeam[2] = static_cast<float>(cosTheta*sinPhi*cosPhi-sinPhi*cosPhi); + data.xbeam[3] =-static_cast<float>(sinTheta*cosPhi ); + + data.ybeam[0] = static_cast<float>(bsCentre.y()); + data.ybeam[1] = static_cast<float>(cosTheta*cosPhi*sinPhi-sinPhi*cosPhi); + data.ybeam[2] = static_cast<float>(cosTheta*sinPhi*sinPhi+cosPhi*cosPhi); + data.ybeam[3] =-static_cast<float>(sinTheta*sinPhi ); - data.zbeam[0] = static_cast<float>(cb.z()); - data.zbeam[1] = static_cast<float>(sint*cosp); - data.zbeam[2] = static_cast<float>(sint*sinp); - data.zbeam[3] = static_cast<float>(cost); + data.zbeam[0] = static_cast<float>(bsCentre.z()); + data.zbeam[1] = static_cast<float>(sinTheta*cosPhi); + data.zbeam[2] = static_cast<float>(sinTheta*sinPhi); + data.zbeam[3] = static_cast<float>(cosTheta); } /////////////////////////////////////////////////////////////////// -// Initiate beam frame work for seed generator +/// Initiate beam frame work for seed generator /////////////////////////////////////////////////////////////////// void InDet::SiSpacePointsSeedMaker_ATLxk::convertToBeamFrameWork -(EventData& data, const Trk::SpacePoint*const& sp, float* r) const +(EventData& data, const Trk::SpacePoint*const& sp, std::array<float,3> & r) const { r[0] = static_cast<float>(sp->globalPosition().x())-data.xbeam[0]; r[1] = static_cast<float>(sp->globalPosition().y())-data.ybeam[0]; @@ -1013,67 +1187,123 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::convertToBeamFrameWork } /////////////////////////////////////////////////////////////////// -// Initiate space points seed maker +/// Initiate space points seed maker /////////////////////////////////////////////////////////////////// void InDet::SiSpacePointsSeedMaker_ATLxk::fillLists(EventData& data) const { - constexpr float pi2 = 2.*M_PI; - std::vector<InDet::SiSpacePointForSeed*>::iterator r, re; + constexpr float twoPi = 2.*M_PI; - int ir0 = 0; + int firstRadialBin = 0; bool ibl = false; + + /** + * The following is done separately for each iteration. + * We sort the hits in our radially sorted lists into the + * z-phi binning, keeping only those we want to consider to reduce + * combinatorics + * + * Note that the use of r_first to start the loop is what ensures that + * the first iteration is a pure SSS pass. + * In newEvent, r_first is set to the bin after the last + * radial bin containing Pixel space points. + * For the second iteration, we reset it to zero and thus start in the pixels. + **/ - for (int i=data.r_first; i<m_r_size; ++i) { + for (int radialBin=data.r_first; radialBin<m_nBinsR; ++radialBin) { - if (!data.r_map[i]) continue; - r = data.r_Sorted[i].begin(); - re = data.r_Sorted[i].end(); - - if (!ir0) ir0 = i; + /// skip empty radial bins + if (!data.r_map[radialBin]) continue; + /// remember the first non-empty bin we encounter + if (firstRadialBin == 0) firstRadialBin = radialBin; + /// if we are in the second iteration (PPP pass), we have some special exit conditions. if (data.iteration) { - if (!(*r)->spacepoint->clusterList().second) { - if (i < 20) ibl = true; - } else if (ibl) { + /** + * if we are dealing with a pixel hit + * and the radial bin index is below 20, we are in the IBL. + * this seems to be based on the default radial step of 2mm / bin, + * where this is equivalent to 40mm. + **/ + if (!data.r_Sorted[radialBin].front()->spacepoint->clusterList().second) { + if (radialBin < 20) ibl = true; + } + + /// if we reach a *strip* hit in the PPP pass, we have two conditions for bailing out: + + /// a) if we saw IBL hits in the past, we stop as soon as we see the first strip hit - pure PPP + else if (ibl) { break; - } else if (i > 175) { + } + /** b) in case we did not see any IBL hits, we stop after bin index 175. + * using the default r bin size of 2mm, this is equivalent to 350mm. + * So the idea seems to be to include the first strip layer at 299mm before we stop. + * This implies that for the non-IBL running, we include PPS seeds in this pass. + **/ + else if (radialBin > 175) { break; } } - - for (; r!=re; ++r) { + // loop over the space points in the r-bin and sort them into the 2d phi-z binning + for (InDet::SiSpacePointForSeed* SP : data.r_Sorted[radialBin]) { - // Azimuthal angle sort - // - float F = (*r)->phi(); - if (F<0.) F+=pi2; - - int f = static_cast<int>(F*m_sF); - if (f < 0) { - f = m_fNmax; - } else if (f > m_fNmax) { - f = 0; + /// Azimuthal angle sort + /// find the bin by dividing phi in 0...2pi by the bin size + float Phi = SP->phi(); + if (Phi<0.) Phi+=twoPi; // phi is defined in [0..2pi] for the binning + int phiBin = static_cast<int>(Phi*m_inverseBinSizePhi); + /// handle overflows + if (phiBin < 0) { + phiBin = m_maxPhiBin; + } else if (phiBin > m_maxPhiBin) { + phiBin = 0; } - float Z = (*r)->z(); - int z; - // Azimuthal angle and Z-coordinate sort - // - if (Z>0.) { - Z< 250.?z=5:Z< 450.?z=6:Z< 925.?z=7:Z< 1400.?z=8:Z< 2500.?z=9:z=10; - } else { - Z>-250.?z=5:Z>-450.?z=4:Z>-925.?z=3:Z>-1400.?z=2:Z>-2500.?z=1:z= 0; + float Z = SP->z(); + /** z-coordinate sort. + * Here, we have a variable bin size. + * Use a map to replace 5 levels of nested ternaries + * for a somewhat more readable notation while retaining + * a logN lookup speed + **/ + int zBin{0}; + const std::map<float, int> ztoBin{ + {-2500. ,0}, + {-1400. ,1}, + {-925. ,2}, + {-450. ,3}, + {-250 ,4}, + { 250 ,5}, + { 450 ,6}, + { 925 ,7}, + { 1400 ,8}, + { 2500 ,9}, + { 100000 ,10}, ///< if we encounter Si hits at z > +100m, we are probably not in ATLAS anymore... + }; + auto bound = ztoBin.lower_bound(Z); + /// some protection in case things go REALLY wrong + if (bound == ztoBin.end()){ + --bound; ///< z beyond the max: return last bin } + zBin=bound->second; - int n = f*SizeZ+z; + /// 2D bin index - computed from the 1D using standard 2D array bin arithmetics + int twoDbin = phiBin*arraySizeZ+zBin; + /// increment total counter of space points. + /// This is not reset between iterations. ++data.nsaz; - data.rfz_Sorted[n].push_back(*r); - if (!data.rfz_map[n]++) data.rfz_index[data.nrfz++] = n; + // push our space point into the 2D binned array + data.rfz_Sorted[twoDbin].push_back(SP); + /// the conditional seems to always be true. The rfz_index vector stores + /// the 2D bin for each SP in the radius-sorted map. This way, + /// we obtain effectively a *3D binning* in r(via the r-sorted vector), phi and z (via the 2D index) + if (!data.rfz_map[twoDbin]++) data.rfz_index[data.nrfz++] = twoDbin; } } - if (!m_sct && ir0 && static_cast<float>(ir0)*m_r_rstep < 43.) { - data.umax = -200.; + /// if we do not use the SCT, and did see some hits somewhere below 43mm (meaning we have the IBL installed), + /// apply stricter requirements on the seed score later on + if (!m_sct && firstRadialBin && static_cast<float>(firstRadialBin)*m_binSizeR < 43.) { + data.maxScore = -200.; } data.state = 0; @@ -1122,15 +1352,15 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::production2Sp(EventData& data) const // Loop thorugh all azimuthal regions // - for (int f=data.fvNmin; f<=m_fvNmax; ++f) { + for (int f=data.fvNmin; f<=m_maxBinPhiVertex; ++f) { // For each azimuthal region loop through Z regions // int z = 0; if (!data.endlist) z = data.zMin; - for (; z<SizeZV; ++z) { + for (; z<arraySizeZV; ++z) { - int a = f*SizeZV+z; + int a = f*arraySizeZV+z; if (!data.rfzv_map[a]) continue; r0 = data.rfzv_Sorted[a].begin(); r0e = data.rfzv_Sorted[a].end (); @@ -1155,10 +1385,10 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::production2Sp(EventData& data) const // Bottom links production // - int NB = m_rfzv_n[a]; - for (int i=0; i<NB; ++i) { + int numberBottomCells = m_nNeighboursVertexPhiZ[a]; + for (int i=0; i<numberBottomCells; ++i) { - int an = m_rfzv_i[a][i]; + int an = m_neighboursVertexPhiZ[a][i]; if (!data.rfzv_map[an]) continue; r = data.rfzv_Sorted[an].begin(); @@ -1196,7 +1426,7 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::production2Sp(EventData& data) const if (UR == 0.) continue; float A = Vt*R/UR; float B = Vt-A*Ut; - if (fabs(B*data.K) > m_ipt*sqrt(1.+A*A)) continue; + if (std::abs(B*data.K) > m_ipt*std::sqrt(1.+A*A)) continue; ++nseed; newSeed(data, (*r), (*r0), Zo); } @@ -1219,246 +1449,425 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::production2Sp(EventData& data) const void InDet::SiSpacePointsSeedMaker_ATLxk::production3Sp(EventData& data) const { + + /// we need at least 3 SP in our phi-z binning, otherwise can't build 3-SP seeds if (data.nsaz<3) return; - const int ZI[SizeZ]= {5,6,7,8,9,10,4,3,2,1,0}; - std::vector<InDet::SiSpacePointForSeed*>::iterator rt[9],rte[9],rb[9],rbe[9]; + /** + * This method will run a separate seed formation round + * for each phi-Z region, taking the central SP from there + * and allowing the top/bottom SP to come from either the same + * or certain neighbouring bins. + * + * The search in each region is performed in the overload of this + * method with the extended signature below. + * Here, we implement the loop over the 2D regions + **/ + + + /** + * Order how we walk across z. + * 0-4 are negative z, 5 is central z, 6-10 are positive z. + * 0 1 2 3 4 5 6 7 8 9 10 z bin index + * --------------------------------------> Z[mm] + * Z=-2500 IP,Z=0 Z=+2500 + * So we first go from the IP to the right, then from the IP to the left, + * each time working our way outward + **/ + const std::array<int,arraySizeZ> zBinIndex {5,6,7,8,9,10,4,3,2,1,0}; + + /// prepare arrays to store the iterators over the SP containers for all + /// neighbouring cells we wish to consider in the seed formation + std::array<std::vector<InDet::SiSpacePointForSeed*>::iterator,arraySizeNeighbourBins> iter_topCands; + std::array<std::vector<InDet::SiSpacePointForSeed*>::iterator,arraySizeNeighbourBins> iter_endTopCands; + std::array<std::vector<InDet::SiSpacePointForSeed*>::iterator,arraySizeNeighbourBins> iter_bottomCands; + std::array<std::vector<InDet::SiSpacePointForSeed*>::iterator,arraySizeNeighbourBins> iter_endBottomCands; + + /// counter for the found int nseed = 0; + /// prevent another pass from being run when we run out of Seeds data.endlist = true; - // Loop thorugh all azimuthal regions - // - for (int f=data.fNmin; f<=m_fNmax; ++f) { + /// Loop thorugh all azimuthal regions + for (int phiBin=data.fNmin; phiBin<=m_maxPhiBin; ++phiBin) { - // For each azimuthal region loop through all Z regions - // + /// For each azimuthal region loop through all Z regions int z = 0; + /// If we had to abort a previous run, continue where we left off if (!data.endlist) z = data.zMin; - for (; z<SizeZ; ++z) { + /// note that this loop follows the order within 'zBinIndex', + /// not the ascending order of z regions. We start in the centre, + /// not at -2500 mm, and then move outward. + for (; z<arraySizeZ; ++z) { + + int phiZbin = phiBin *arraySizeZ+zBinIndex[z]; + + /// can skip the rest if this particular 2D bin is empty + if (!data.rfz_map[phiZbin]) continue; - int a = f *SizeZ+ZI[z]; - if (!data.rfz_map[a]) continue; - int NB = 0, NT = 0; - for (int i=0; i<m_rfz_b[a]; ++i) { + /// count how many non-emtpy cells should be searched for the + /// top and bottom neighbour + int numberBottomCells = 0; + int numberTopCells = 0; + + /// walk through the cells in phi-z we wish to consider for the bottom SP search. + /// Typically, this will be 3 adjacent phi bins (including the one of the central SP) + /// and possibly neighbours in z on side towards the IP or on both sides, + /// depdending on the z region we are in + for (int neighbourCellNumber=0; neighbourCellNumber<m_nNeighbourCellsBottom[phiZbin]; ++neighbourCellNumber) { - int an = m_rfz_ib[a][i]; - if (!data.rfz_map[an]) continue; - rb [NB] = data.rfz_Sorted[an].begin(); - rbe[NB++] = data.rfz_Sorted[an].end(); + int theNeighbourCell = m_neighbourCellsBottom[phiZbin][neighbourCellNumber]; + /// only do something if this cell is populated + if (!data.rfz_map[theNeighbourCell]) continue; + /// plug the begin and end iterators to the SP in the cell into our array + iter_bottomCands [numberBottomCells] = data.rfz_Sorted[theNeighbourCell].begin(); + iter_endBottomCands[numberBottomCells++] = data.rfz_Sorted[theNeighbourCell].end(); } - for (int i=0; i<m_rfz_t[a]; ++i) { - - int an = m_rfz_it[a][i]; - if (!data.rfz_map[an]) continue; - rt [NT] = data.rfz_Sorted[an].begin(); - rte[NT++] = data.rfz_Sorted[an].end(); + + /// walk through the cells in phi-z we wish to consider for the top SP search. + /// Typically, this will be 3 adjacent phi bins (including the one of the central SP) + /// and possibly neighbours in z on the side opposed to the IP or on both sides, + /// depdending on the z region we are in + for (int neighbourCellNumber=0; neighbourCellNumber<m_nNeighbourCellsTop[phiZbin]; ++neighbourCellNumber) { + + int theNeighbourCell = m_neighbourCellsTop[phiZbin][neighbourCellNumber]; + /// only do something if this cell is populated + if (!data.rfz_map[theNeighbourCell]) continue; + /// plug the begin and end iterators to the SP in the cell into our array + iter_topCands [numberTopCells] = data.rfz_Sorted[theNeighbourCell].begin(); + iter_endTopCands[numberTopCells++] = data.rfz_Sorted[theNeighbourCell].end(); } - if (!data.trigger) production3Sp (data, rb, rbe, rt, rte, NB, NT, nseed); - else production3SpTrigger(data, rb, rbe, rt, rte, NB, NT, nseed); + + /// now run the seed search for the current phi-z bin. + if (!data.trigger) production3Sp (data, iter_bottomCands, iter_endBottomCands, iter_topCands, iter_endTopCands, numberBottomCells, numberTopCells, nseed); + else production3SpTrigger(data, iter_bottomCands, iter_endBottomCands, iter_topCands, iter_endTopCands, numberBottomCells, numberTopCells, nseed); } + + /** If we exceed the seed capacity, we stop here. + * Save where we were in z and phi, and set endlist to false. + * This will trigger another run of production3Sp when + * The client calls next() after processing all vertices seen + * so far (freeing up capacity). + **/ if (nseed>=m_maxsize) { data.endlist=false; - data.fNmin = f+1; + data.fNmin = phiBin+1; return; } } + /// Processed all seeds there are without aborting - no re-run needed! data.endlist = true; } /////////////////////////////////////////////////////////////////// -// Production 3 space points seeds for full scan +/// Production 3 space points seeds for full scan /////////////////////////////////////////////////////////////////// void InDet::SiSpacePointsSeedMaker_ATLxk::production3Sp (EventData& data, - std::vector<InDet::SiSpacePointForSeed*>::iterator* rb , - std::vector<InDet::SiSpacePointForSeed*>::iterator* rbe, - std::vector<InDet::SiSpacePointForSeed*>::iterator* rt , - std::vector<InDet::SiSpacePointForSeed*>::iterator* rte, - const int NB, const int NT, int& nseed) const + std::array <std::vector<InDet::SiSpacePointForSeed*>::iterator, arraySizeNeighbourBins> & iter_bottomCands , + std::array <std::vector<InDet::SiSpacePointForSeed*>::iterator, arraySizeNeighbourBins> & iter_endBottomCands, + std::array <std::vector<InDet::SiSpacePointForSeed*>::iterator, arraySizeNeighbourBins> & iter_topCands , + std::array <std::vector<InDet::SiSpacePointForSeed*>::iterator, arraySizeNeighbourBins> & iter_endTopCands, + const int numberBottomCells, const int numberTopCells, int& nseed) const { - std::vector<InDet::SiSpacePointForSeed*>::iterator r0=rb[0],r; - + /** + * This methid implements the seed search for a single phi-Z region of the detector. + * The central SP is taken from the region, while the top and bottom SP are allowed + * to come from either the same or a range of neighbouring cells. + **/ + + /// iterator across the candidates for the central space point. + std::vector<InDet::SiSpacePointForSeed*>::iterator iter_centralSP=iter_bottomCands[0]; + std::vector<InDet::SiSpacePointForSeed*>::iterator iter_otherSP; ///< will be used for iterating over top/bottom SP + + /// radial interval for the central SP. + /// For the PPP (PPS) pass, take Pixel layers 1,2,3 float rmin = 40.; float rmax = 140.; - if((*r0)->spacepoint->clusterList().second) { + /// for strip seed formation, allow most of the strip volume + if((*iter_centralSP)->spacepoint->clusterList().second) { rmin = 280.; rmax = 540.; } - for(; r0!=rbe[0]; ++r0) {if((*r0)->radius() > rmin) break;} - rt[0] = r0; ++rt[0]; + /// find the first central SP candidate above the minimum radius. + for(; iter_centralSP!=iter_endBottomCands[0]; ++iter_centralSP) { + if((*iter_centralSP)->radius() > rmin) break; + } + + /// for the top candidates in the central phi-Z bin, we do not need to start at a smaller + /// radius than the lowest-r valid central SP candidate + iter_topCands[0] = iter_centralSP; + ++iter_topCands[0]; + /// prepare cut values const float& ipt2K = data.ipt2K; const float& ipt2C = data.ipt2C; const float& COFK = data.COFK; - const float& imaxp = m_diver; - const float& imaxs = m_divermax; + const float& maxd0cut = m_maxdImpact; + const float& maxd0cutstrips = m_maxdImpactDecays; const float& zmin = data.zminU; const float& zmax = data.zmaxU; const float& dzdrmax = data.dzdrmax; const float& dzdrmin = data.dzdrmin; data.CmSp.clear(); - // Loop through all trigger space points - // - for (; r0!=rbe[0]; ++r0) { + /// Loop through all central space point candidates + for (; iter_centralSP!=iter_endBottomCands[0]; ++iter_centralSP) { - const float& R = (*r0)->radius(); - if(R > rmax) break; + const float& R = (*iter_centralSP)->radius(); + if(R > rmax) break; ///< stop if we have moved outside our radial region of interest. - const float& X = (*r0)->x(); - const float& Y = (*r0)->y(); - const float& Z = (*r0)->z(); - int Nb = 0; + /// global coordinates of the central SP + const float& X = (*iter_centralSP)->x(); + const float& Y = (*iter_centralSP)->y(); + const float& Z = (*iter_centralSP)->z(); - // Bottom links production - // - for (int i=0; i<NB; ++i) { + /// initialise a counter for found bottom links + /// This also serves as an index in the data.SP vector + int Nb = 0; - for (r=rb[i]; r!=rbe[i]; ++r) { - - const float& Rb =(*r)->radius(); + /// Bottom links production + /// Loop over all the cells where we expect to find such SP + bool abortBottomLoop=false; + for (int cell=0; !abortBottomLoop && cell<numberBottomCells; ++cell) { + /// in each cell, loop over the space points + for (iter_otherSP=iter_bottomCands[cell]; iter_otherSP!=iter_endBottomCands[cell]; ++iter_otherSP) { + + /// evaluate the radial distance between the central and bottom SP + const float& Rb =(*iter_otherSP)->radius(); float dR = R-Rb; + /// if the bottom SP is too far, remember this for future iterations and + /// don't bother starting from the beginning again if (dR > m_drmax) { - rb[i]=r; + iter_bottomCands[cell]=iter_otherSP; continue; } - - if (dR < m_drmin || (data.iteration && (*r)->spacepoint->clusterList().second)) break; - - const float Tz = (Z-(*r)->z())/dR; - const float aTz = std::abs(Tz); - if (aTz < dzdrmin or aTz > dzdrmax) continue; + /// if the points are too close in r, abort (future ones will be even closer). + /// If we are in the second pass (PPP) and starting to reach strip spacepoints, also time to stop! + if (dR < m_drmin || (data.iteration && (*iter_otherSP)->spacepoint->clusterList().second)) break; + + /// dZ/dR + const float dZdR = (Z-(*iter_otherSP)->z())/dR; + /// and abs value + const float absdZdR = std::abs(dZdR); + if (absdZdR < dzdrmin or absdZdR > dzdrmax) continue; - // Comparison with vertices Z coordinates - // - const float Zo = Z-R*Tz; - if(Zo > zmax || Zo < zmin) continue; - //if (!isZCompatible(data, Zo, Rb, Tz)) continue; - data.SP[Nb] = (*r); - if (++Nb==m_maxsizeSP) goto breakb; - } - } - breakb: + /// Comparison with vertices Z coordinates + /// straight line extrapolation to r=0 + const float z0 = Z-R*dZdR; + if(z0 > zmax || z0 < zmin) continue; + /// found a bottom SP candidate, write it into the data object + data.SP[Nb] = (*iter_otherSP); + /// abort if we exceed the capacity for saving space points + if (++Nb==m_maxsizeSP) abortBottomLoop=true; + } ///< end of loop over SP in bottom candidate cell + } ///< end of loop over bottom candidate cells + + /// if we did not find ANY bottom SP, or if we exceed the storage capacity, we abort this seed candidate. if (!Nb || Nb==m_maxsizeSP) continue; + + /// now continue with the top SP search. + /// Make the counter start at Nb, as this serves as a running + /// index in the SP list for this seed. int Nt = Nb; - // Top links production - // - for (int i=0; i<NT; ++i) { - - for (r=rt[i]; r!=rte[i]; ++r) { + /// Top links production + bool abortTopLoop=false; + + /// again, loop over cells of interest, this time for the top SP candidate + for (int cell=0; !abortTopLoop && cell<numberTopCells; ++cell) { + /// loop over each SP in each cell + for (iter_otherSP=iter_topCands[cell]; iter_otherSP!=iter_endTopCands[cell]; ++iter_otherSP) { - float Rt =(*r)->radius(); + /// evaluate the radial distance, + float Rt =(*iter_otherSP)->radius(); float dR = Rt-R; - + + /// and continue if we are too close if (dR<m_drmin) { - rt[i]=r; + iter_topCands[cell]=iter_otherSP; continue; } + /// if we are to far, the next ones will be even farther, so abort if (dR>m_drmax) break; - - float Tz = ((*r)->z()-Z)/dR; - float aTz = std::abs(Tz); - if (aTz < dzdrmin or aTz > dzdrmax) continue; - - // Comparison with vertices Z coordinates - // - float Zo = Z-R*Tz; - if(Zo > zmax || Zo < zmin) continue; - //if (!isZCompatible(data, Zo, R, Tz)) continue; - data.SP[Nt] = (*r); - if (++Nt==m_maxsizeSP) goto breakt; - } - } + /// evaluate (and cut on) dZ/dR + float dZdR = ((*iter_otherSP)->z()-Z)/dR; + float absdZdR = std::abs(dZdR); + if (absdZdR < dzdrmin or absdZdR > dzdrmax) continue; + + /// Comparison with vertices Z coordinates + /// via straight line extrapolation to r=0 + float z0 = Z-R*dZdR; + if(z0 > zmax || z0 < zmin) continue; + /// add SP to the list + data.SP[Nt] = (*iter_otherSP); + /// check capacity exceeding abort condition + if (++Nt==m_maxsizeSP) abortTopLoop=true; + } ///< end of loop over SP within top candidate cell + } ///< end of loop over top candidate cells - breakt: + /// if we found no top candidates (remember, Nt starts counting at Nb), abort if (!(Nt-Nb)) continue; - float covr0 = (*r0)->covr (); - float covz0 = (*r0)->covz (); + + /// get covariance on r and z for the central SP + float covr0 = (*iter_centralSP)->covr (); + float covz0 = (*iter_centralSP)->covz (); + + /// build a unit direction vector pointing from the IP to the central SP float ax = X/R; float ay = Y/R; + /// check all SP candidates we found during our loop and + /// compute geometrical variables w.r.t the central point. for (int i=0; i<Nt; ++i) { InDet::SiSpacePointForSeed* sp = data.SP[i]; + /// transform the space point coordinates into a frame centered around the middle SP, + /// where the x axis points away from the detector frame origin float dx = sp->x()-X; float dy = sp->y()-Y; float dz = sp->z()-Z; float x = dx*ax+dy*ay; float y = dy*ax-dx*ay; + + /// inverse square distance of the candidate space point to the central point float r2 = 1./(x*x+y*y); + /// inverse distance of the candidate space point to the central point float dr = sqrt(r2); + /// estimate slope in z - distance traveled in transverse plane vs z direction. + /// rough estimate of 1/sin theta from 2 points float tz = dz*dr; + + /// if we are looking at a bottom SP candidate, flip the sign to account for + /// different direction of flight (from bottom to central) if (i < Nb) tz = -tz; - data.Tz[i] = tz; - data.Zo[i] = Z-R*tz; - data.R [i] = dr; - data.U [i] = x*r2; - data.V [i] = y*r2; - data.Er[i] = ((covz0+sp->covz())+(tz*tz)*(covr0+sp->covr()))*r2; + /// save this into our data object + data.Tz[i] = tz; ///< 1/ sin theta + data.Zo[i] = Z-R*tz; ///< z0 estimate. + data.R [i] = dr; ///< inverse distance to central SP + data.U [i] = x*r2; ///< transformed U coordinate + data.V [i] = y*r2; ///< transformed V coordinate + data.Er[i] = ((covz0+sp->covz())+(tz*tz)*(covr0+sp->covr()))*r2; ///< 1/r² (cov(z)) + 1/r²sin²theta cov(r) } + + /// tweak covariance matrix elements covr0 *= .5; covz0 *= 2.; data.nOneSeeds = 0; data.mapOneSeeds_Pro.clear(); - // Three space points comparison - // + /// Three space points comparison + /// first, loop over the bottom point candidates for (int b=0; b<Nb; ++b) { - - float Zob = data.Zo[b]; - float Tzb = data.Tz[b]; - float Rb2r = data.R [b]*covr0; - float Rb2z = data.R [b]*covz0; - float Erb = data.Er[b]; - float Vb = data.V [b]; - float Ub = data.U [b]; - float Tzb2 = (1.+Tzb*Tzb); - float sTzb2 = sqrt(Tzb2); - float CSA = Tzb2*COFK; - float ICSA = Tzb2*ipt2C; - float imax = imaxp; - if (data.SP[b]->spacepoint->clusterList().second) imax = imaxs; - + + /// retrieve the geometrical paranmeters w.r.t the central SP for this candidate + float Zob = data.Zo[b]; ///< z0 estimate from central+bottom SP + float Tzb = data.Tz[b]; ///< 1/sintheta estimate from central+bottom SP + float Rb2r = data.R [b]*covr0; ///< inverse distance times covariance on r coordinate + float Rb2z = data.R [b]*covz0; ///< inverse distance times covariance on z coordinate + float Erb = data.Er[b]; ///< 1/r² (cov(z)) + 1/r²sin²theta cov(r) + float Vb = data.V [b]; ///< v-coordinate of bottom SP + float Ub = data.U [b]; ///< u-coordinate of bottom SP + float Tzb2 = (1.+Tzb*Tzb); ///< 1+1/sin²theta + float sTzb2 = sqrt(Tzb2); ///< sqrt (1+1/sin²theta) + float CSA = Tzb2*COFK; ///< magic number x (1+1+sin²theta) + float ICSA = Tzb2*ipt2C; ///< magic number x inverse of 90% of the pt cut, squared x (1+1+sin²theta) + /// max IP + float d0max = maxd0cut; + /// for strips, apply the strip version of the IP cut + if (data.SP[b]->spacepoint->clusterList().second) d0max = maxd0cutstrips; + + /// inner loop over the top point candidates for (int t=Nb; t<Nt; ++t) { - - float dT = ((Tzb-data.Tz[t])*(Tzb-data.Tz[t])-data.R[t]*Rb2z-(Erb+data.Er[t]))-(data.R[t]*Rb2r)*((Tzb+data.Tz[t])*(Tzb+data.Tz[t])); - if (dT > ICSA) continue; - - float dU = data.U[t]-Ub; - if (dU == 0.) continue; - float A = (data.V[t]-Vb)/dU; - float S2 = 1.+A*A; - float B = Vb-A*Ub; - float B2 = B*B; - if (B2 > ipt2K*S2 || dT*S2 > B2*CSA) continue; - - float Im = fabs((A-B*R)*R); - if (Im <= imax) { + /// this appears to be an eta-compatibility cut between the two segments + float dT = ((Tzb-data.Tz[t])*(Tzb-data.Tz[t])-data.R[t]*Rb2z-(Erb+data.Er[t])) + -(data.R[t]*Rb2r)*((Tzb+data.Tz[t])*(Tzb+data.Tz[t])); + if (dT > ICSA) continue; + + /** + * The following exploits the transformation u:=x/(x²+y²); v:=y/(x²+y²); + * This is applied on the x,y coordinates in the frame described above, where the + * origin is put in the central SP and the x axis defined to point directly away from the IP. + * + * In this transformed u,v frame, what would be our circle in x-y space takes the form of + * a linear function V = (-x0/y0) x U + 1/(2y0) =: A x U + B. + * Here, x0 and y0 describe the center point of the circle in the x-y frame. + * As the origin of the x-y frame (the middle space point of our seed) is on the circle, + * we have x0²+y0²=R² with circle radius R. + * + * For our seed, we can experimentally obtain A as the slope of the linear function, + * delta V / delta U, + * estimated using the delta U and delta V between the top and bottom space point. + * + * B is then obtained by inserting the obtained A into the + * linear equation for the bottom SP, A x U + B = V --> B = V - A x U + * + * With x0²+y0²=R², and x0=-A/2B and y0=1/2B, the radius of the circle is + * then obtained as (2R)²=(1+A²)/B². + **/ + float deltaU = data.U[t]-Ub; + if (deltaU == 0.) continue; ///< delta U = 0 blocks the evaluation of A. + float A = (data.V[t]-Vb)/deltaU; ///< A parameter, slope of the seed point distribution in the U,V plane + float B = Vb-A*Ub; ///< B parameter, V axis intercept of the seed point distribution in the U,V plane + float onePlusAsquare = 1.+A*A; + float BSquare = B*B; + /** With this radius (and pT) estimate, we can apply our pt cut. + * Reminder, ipt2K is 1 / (K x 0.9 x pt-cut)², where K translates pt into 2R. + * So here we can apply the pt cut directly on the (2R)² estimate without + * the extra overhead of conversion / division + **/ + if (BSquare > ipt2K*onePlusAsquare || dT*onePlusAsquare > BSquare*CSA) continue; + + /** This is an estimate of the transverse impact parameter. + * The reasoning is that, in the x-y frame with the central SP as origin and + * the x axis pointing away from the IP, we have for the distance between + * the IP and the middle of the circle: + * (x0 - r_central)²+y0² = (R + d0)², + * with R being the circle radius and r_central + * the radial location of the central SP, placing the IP at IP at (-r_central, 0). + * + * First simplify using R² =x0²+y0², then apply the approximation d0²/R² ~ 0. + * + * Finally, consider that locally close to the central SP, the circle is parallel to the x axis, + * so A = 0 --> expand (2R)²=(1+A²)/B² around this point to obtain + * d0 = r_central x (r_central x B - A). + * Note that below, the variable R is the radial coordinate fo the central SP, + * corresponding to r_central in the notation above. + **/ + float d0 = std::abs((A-B*R)*R); + + /// apply d0 cut to seed + if (d0 <= d0max) { + /// evaluate distance the two closest-by SP in this seed candidate float dr = data.R[b]; if (data.R[t] < data.R[b]) dr = data.R[t]; - Im+=fabs((Tzb-data.Tz[t])/(dr*sTzb2)); - data.CmSp.emplace_back(std::make_pair(B/sqrt(S2), data.SP[t])); - data.SP[t]->setParam(Im); + /// update the d0 estimate + d0+=std::abs((Tzb-data.Tz[t])/(dr*sTzb2)); + /// record one possible seed candidate, sort by the curvature + data.CmSp.emplace_back(std::make_pair(B/std::sqrt(onePlusAsquare), data.SP[t])); + /// store the transverse IP, will later be used as a quality estimator + data.SP[t]->setParam(d0); } - } + } ///< end loop over top space point candidates + /// now apply further cleaning on the seed candidates for this central+bottom pair. if (!data.CmSp.empty()) { - newOneSeedWithCurvaturesComparison(data, data.SP[b], (*r0), Zob); + newOneSeedWithCurvaturesComparison(data, data.SP[b], (*iter_centralSP), Zob); } - } + } ///< end loop over bottom space points + ///record seeds found in this run fillSeeds(data); nseed += data.fillOneSeeds; - } + } ///< end loop over central SP } /////////////////////////////////////////////////////////////////// @@ -1467,13 +1876,13 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::production3Sp void InDet::SiSpacePointsSeedMaker_ATLxk::production3SpTrigger (EventData& data, - std::vector<InDet::SiSpacePointForSeed*>::iterator* rb , - std::vector<InDet::SiSpacePointForSeed*>::iterator* rbe, - std::vector<InDet::SiSpacePointForSeed*>::iterator* rt , - std::vector<InDet::SiSpacePointForSeed*>::iterator* rte, - const int NB, const int NT, int& nseed) const + std::array<std::vector<InDet::SiSpacePointForSeed*>::iterator, arraySizeNeighbourBins> & rb , + std::array<std::vector<InDet::SiSpacePointForSeed*>::iterator, arraySizeNeighbourBins> & rbe, + std::array<std::vector<InDet::SiSpacePointForSeed*>::iterator, arraySizeNeighbourBins> & rt , + std::array<std::vector<InDet::SiSpacePointForSeed*>::iterator, arraySizeNeighbourBins> & rte, + const int numberBottomCells, const int numberTopCells, int& nseed) const { - constexpr float pi2 = 2.*M_PI; + constexpr float twoPi = 2.*M_PI; std::vector<InDet::SiSpacePointForSeed*>::iterator r0=rb[0],r; @@ -1490,8 +1899,8 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::production3SpTrigger float ipt2K = data.ipt2K; float ipt2C = data.ipt2C; float COFK = data.COFK; - float imaxp = m_diver; - float imaxs = m_diversss; + float maxd0cut = m_maxdImpact; + float maxd0cutstrips = m_maxdImpactSSS; data.CmSp.clear(); @@ -1513,7 +1922,7 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::production3SpTrigger // Bottom links production // - for (int i=0; i<NB; ++i) { + for (int i=0; i<numberBottomCells; ++i) { for (r=rb[i]; r!=rbe[i]; ++r) { @@ -1545,7 +1954,7 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::production3SpTrigger // Top links production // - for (int i=0; i<NT; ++i) { + for (int i=0; i<numberTopCells; ++i) { for (r=rt[i]; r!=rte[i]; ++r) { @@ -1617,33 +2026,33 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::production3SpTrigger float Tzb2 = (1.+Tzb*Tzb); float CSA = Tzb2*COFK; float ICSA = Tzb2*ipt2C; - float imax = imaxp; - if (data.SP[b]->spacepoint->clusterList().second) imax = imaxs; + float d0max = maxd0cut; + if (data.SP[b]->spacepoint->clusterList().second) d0max = maxd0cutstrips; for (int t=Nb; t<Nt; ++t) { float dT = ((Tzb-data.Tz[t])*(Tzb-data.Tz[t])-data.R[t]*Rb2z-(Erb+data.Er[t]))-(data.R[t]*Rb2r)*((Tzb+data.Tz[t])*(Tzb+data.Tz[t])); if ( dT > ICSA) continue; - float dU = data.U[t]-Ub; - if (dU == 0.) continue; - float A = (data.V[t]-Vb)/dU; - float S2 = 1.+A*A; + float deltaU = data.U[t]-Ub; + if (deltaU == 0.) continue; + float A = (data.V[t]-Vb)/deltaU; + float onePlusAsquare = 1.+A*A; float B = Vb-A*Ub; - float B2 = B*B; - if (B2 > ipt2K*S2 || dT*S2 > B2*CSA) continue; + float BSquare = B*B; + if (BSquare > ipt2K*onePlusAsquare || dT*onePlusAsquare > BSquare*CSA) continue; - float Im = fabs((A-B*R)*R); - if (Im > imax) continue; + float Im = std::abs((A-B*R)*R); + if (Im > d0max) continue; // Azimuthal angle test // float y = 1.; float x = 2.*B*R-A; - float df = fabs(atan2(ay*y-ax*x,ax*y+ay*x)-data.ftrig); - if (df > M_PI) df = pi2-df; + float df = std::abs(std::atan2(ay*y-ax*x,ax*y+ay*x)-data.ftrig); + if (df > M_PI) df = twoPi-df; if (df > data.ftrigW) continue; - data.CmSp.emplace_back(std::make_pair(B/sqrt(S2), data.SP[t])); + data.CmSp.emplace_back(std::make_pair(B/std::sqrt(onePlusAsquare), data.SP[t])); data.SP[t]->setParam(Im); } if (!data.CmSp.empty()) { @@ -1664,23 +2073,31 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::newOneSeed InDet::SiSpacePointForSeed*& p1, InDet::SiSpacePointForSeed*& p2, InDet::SiSpacePointForSeed*& p3, float z, float q) const { + /// If we have not yet reached the maximum number of allowed seeds per central SP, + /// add this one to the list if (data.nOneSeeds < m_maxOneSize) { data.OneSeeds_Pro[data.nOneSeeds].set(p1,p2,p3,z); data.mapOneSeeds_Pro.insert(std::make_pair(q, &data.OneSeeds_Pro[data.nOneSeeds])); ++data.nOneSeeds; - } else { + } + /// otherwise, we check if there is a poorer-quality seed that we can kick out + else { + /// get the worst seed so far std::multimap<float,InDet::SiSpacePointsProSeed*>::reverse_iterator l = data.mapOneSeeds_Pro.rbegin(); - + /// if the worst so far is better than what we have on hand, our new candidate + /// is unlucky and gets skipped if ((*l).first <= q) return; + /// otherwise, we overwrite the worst seed so far with our new friend InDet::SiSpacePointsProSeed* s = (*l).second; s->set(p1,p2,p3,z); + /// re-insert it with its proper quality to make sure it ends up in the right place std::multimap<float,InDet::SiSpacePointsProSeed*>::iterator i = data.mapOneSeeds_Pro.insert(std::make_pair(q,s)); - + /// and remove the entry with the old quality, which has been kicked out. for (++i; i!=data.mapOneSeeds_Pro.end(); ++i) { if ((*i).second==s) { data.mapOneSeeds_Pro.erase(i); @@ -1697,108 +2114,162 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::newOneSeed void InDet::SiSpacePointsSeedMaker_ATLxk::newOneSeedWithCurvaturesComparison (EventData& data, SiSpacePointForSeed*& SPb, SiSpacePointForSeed*& SP0, float Zob) const { - static const float dC = .00003; + static const float curvatureInterval = .00003; - bool pixb = !SPb->spacepoint->clusterList().second; - float ub = SPb->quality(); - float u0 = SP0->quality(); + bool bottomSPisPixel = !SPb->spacepoint->clusterList().second; + float bottomSPQuality = SPb->quality(); + float centralSPQuality = SP0->quality(); + /// sort common SP by curvature if(data.CmSp.size() > 2) std::sort(data.CmSp.begin(), data.CmSp.end(), comCurvature()); - std::vector<std::pair<float,InDet::SiSpacePointForSeed*>>::iterator j,jn,i = data.CmSp.begin(), ie = data.CmSp.end(); - jn=i; + std::vector<std::pair<float,InDet::SiSpacePointForSeed*>>::iterator it_otherSP; + std::vector<std::pair<float,InDet::SiSpacePointForSeed*>>::iterator it_commonTopSP = data.CmSp.begin(), ie = data.CmSp.end(); + std::vector<std::pair<float,InDet::SiSpacePointForSeed*>>::iterator it_startInnerLoop=it_commonTopSP; - for (; i!=ie; ++i) { + /// check all possible common top SP + for (; it_commonTopSP!=ie; ++it_commonTopSP) { - float u = (*i).second->param(); - float Im = (*i).second->param(); + /// the seed quality is set to d0 initially + float seedQuality = (*it_commonTopSP).second->param(); + float originalSeedQuality = (*it_commonTopSP).second->param(); - bool pixt = !(*i).second->spacepoint->clusterList().second; + bool topSPisPixel = !(*it_commonTopSP).second->spacepoint->clusterList().second; - const Trk::Surface* Sui = (*i).second->sur (); - float Ri = (*i).second->radius(); - float Ci1 =(*i).first-dC; - float Ci2 =(*i).first+dC; + /// check the surface the hit is on + const Trk::Surface* surfaceTopSP = (*it_commonTopSP).second->sur (); + float radiusTopSP = (*it_commonTopSP).second->radius(); + /// form a curvature interval cut + float minCurvature =(*it_commonTopSP).first-curvatureInterval; + float maxCurvature =(*it_commonTopSP).first+curvatureInterval; - if (!pixb) u-=400.; - else if ( pixt) u-=200.; - - for (j=jn; j!=ie; ++j) { - - if ( j == i ) continue; - if ( (*j).first < Ci1 ) {jn=j; ++jn; continue;} - if ( (*j).first > Ci2 ) break; - if ( (*j).second->sur()==Sui) continue; - - float Rj = (*j).second->radius(); - if (fabs(Rj-Ri) < m_drmin) continue; - u -= 200.; + /** Note: The score modifiers used here have the purpose of separating the candidates into + * classes / groups disjoint from each other. + * So the score increment (200 by default) should exceed the maximum + * |d0| (base score) we expect to encounter to avoid overlap. + * For LRT, we may want to tune this! + **/ + + /// if we have a SSS seed, boost the quality score by 400 + if (!bottomSPisPixel) seedQuality-=400.; + /// if we have a PPP, boost the quality by 200 + else if ( topSPisPixel) seedQuality-=200.; + + + /** + * Now we look at the other SP candidates and try to find a confirmation seed, + * including the same centre/lower SP and giving a compatible curvature, + * but with the top SP in a different layer + **/ + + for (it_otherSP=it_startInnerLoop; it_otherSP!=ie; ++it_otherSP) { + /// if we are looking at the same SP, skip it + if ( it_otherSP == it_commonTopSP ) continue; + /// if we have a lower curvature than the minimum, skip - and remember to + /// not bother with this candidate again later, as the vectors are curvature-sorted + if ( (*it_otherSP).first < minCurvature ) { + it_startInnerLoop=it_otherSP; + ++it_startInnerLoop; + continue; + } + /// abort once the the curvature gets too large + if ( (*it_otherSP).first > maxCurvature ) break; + /// if both SP are on the surface, skip it + if ( (*it_otherSP).second->sur()==surfaceTopSP) continue; + /// if the other SP is too close to the current top one, skip + float radiusOtherSP = (*it_otherSP).second->radius(); + if (std::abs(radiusOtherSP-radiusTopSP) < m_drmin) continue; + /// if we have a confirmation seed, we improve the score of the seed. + seedQuality -= 200.; + /// only look for one confirmation seed! break; } - - if (u > data.umax) continue; + /// kick this seed candidate if the score is too high (lower values = better) + if (seedQuality > data.maxScore) continue; - if (pixb!=pixt) { - if (u > 0. || (u > ub && u > u0 && u > (*i).second->quality()) ) continue; + /// if we have PPS seeds and no confirmation SP exists (which would give the -200 bonus) + /// or the seed quality is worse than the quality of the individual SP, skip this seed + if (bottomSPisPixel!=topSPisPixel) { + if (seedQuality > 0. || + (seedQuality > bottomSPQuality && seedQuality > centralSPQuality && seedQuality > (*it_commonTopSP).second->quality()) + ) continue; } - if (!pixb && Im > m_diversss && u > Im-500.) continue; - - newOneSeed(data, SPb, SP0, (*i).second, Zob, u); - } + /// if we have a SSS seed, apply the d0 cut. + /// Exception: If the SSS seed has a confirmation seed (-400 from SSS and -200 from confirmation), + /// then we skip the d0 cut + if (!bottomSPisPixel && originalSeedQuality > m_maxdImpactSSS && seedQuality > originalSeedQuality-500.) continue; + /// this is a good seed, save it (unless we have too many seeds per SP) + newOneSeed(data, SPb, SP0, (*it_commonTopSP).second, Zob, seedQuality); + } ///< end of loop over top SP candidates data.CmSp.clear(); } /////////////////////////////////////////////////////////////////// -// Fill seeds +/// Fill seeds /////////////////////////////////////////////////////////////////// void InDet::SiSpacePointsSeedMaker_ATLxk::fillSeeds(EventData& data) const { data.fillOneSeeds = 0; - std::multimap<float,InDet::SiSpacePointsProSeed*>::iterator - lf = data.mapOneSeeds_Pro.begin(), - l = data.mapOneSeeds_Pro.begin(), - le = data.mapOneSeeds_Pro.end(); + std::multimap<float,InDet::SiSpacePointsProSeed*>::iterator it_firstSeedCandidate = data.mapOneSeeds_Pro.begin(); + std::multimap<float,InDet::SiSpacePointsProSeed*>::iterator it_seedCandidate = data.mapOneSeeds_Pro.begin(); + std::multimap<float,InDet::SiSpacePointsProSeed*>::iterator it_endSeedCandidates = data.mapOneSeeds_Pro.end(); - if (l==le) return; - - SiSpacePointsProSeed* s; + /// no seeds - nothing to do. + if (it_seedCandidate==it_endSeedCandidates) return; - for (; l!=le; ++l) { + SiSpacePointsProSeed* theSeed{nullptr}; - float w = (*l).first; + /// loop over the seed candidates we have stored in the event data + for (; it_seedCandidate!=it_endSeedCandidates; ++it_seedCandidate) { - s = (*l).second; - if (l!=lf && s->spacepoint0()->radius() < 43. && w > -200.) continue; - if (!s->setQuality(w)) continue; + /// quality score of the seed, lower = better, list is sorted by quality + float quality = (*it_seedCandidate).first; + theSeed = (*it_seedCandidate).second; + /// if this is not the highest-quality seed in the list and we have the first hit in the IBL, require a confirmation seed (score is then boosted by -200 for PPP + -200 for confirmation --> below -200) + if (it_seedCandidate!=it_firstSeedCandidate && theSeed->spacepoint0()->radius() < 43. && quality > -200.) continue; + /// this will return false for strip seeds if the quality of the seed is worse than the one of all of the space points on the seed. + if (!theSeed->setQuality(quality)) continue; + /// if we have space, write the seed directly into an existing slot if (data.i_seede_Pro!=data.l_seeds_Pro.end()) { - s = &(*data.i_seede_Pro++); - *s = *(*l).second; + theSeed = &(*data.i_seede_Pro++); + *theSeed = *(*it_seedCandidate).second; } else { - data.l_seeds_Pro.emplace_back(SiSpacePointsProSeed(*(*l).second)); - s = &(data.l_seeds_Pro.back()); + /// otherwise, extend the seed list and update the iterators + data.l_seeds_Pro.emplace_back(SiSpacePointsProSeed(*(*it_seedCandidate).second)); + theSeed = &(data.l_seeds_Pro.back()); data.i_seede_Pro = data.l_seeds_Pro.end(); } ++data.fillOneSeeds; - } + } ///< end loop over seed candidates } const InDet::SiSpacePointsSeed* InDet::SiSpacePointsSeedMaker_ATLxk::next(const EventContext&, EventData& data) const { + /// This only holds if we call next() without manually calling newEvent/find3Sp if (not data.initialized) initializeEventData(data); - + if (data.nspoint==3) { do { + /// If we are out of seeds, call findNext to see if we can find more. if (data.i_seed_Pro==data.i_seede_Pro) { + /// findNext will call production3Sp again IF data.endlist is false, + /// which is only the case if the last run of production3Sp did not run to the end + /// or if we did not run seed finding before + /// For run-3 offline, this will not do anything. findNext(data); + /// if no new seeds were found, exit if (data.i_seed_Pro==data.i_seede_Pro) return nullptr; } + /// iterate until we find a valid seed satisfying certain quality cuts in set3 } while (!(*data.i_seed_Pro++).set3(data.seedOutput)); + /// then return this next seed candidate return &data.seedOutput; } else { + /// same as above for 2SP if (data.i_seed_Pro==data.i_seede_Pro) { findNext(data); if (data.i_seed_Pro==data.i_seede_Pro) return nullptr; @@ -1818,7 +2289,7 @@ bool InDet::SiSpacePointsSeedMaker_ATLxk::isZCompatible float dZmin = std::numeric_limits<float>::max(); for (const float& v: data.l_vertex) { - float dZ = fabs(v-Zv); + float dZ = std::abs(v-Zv); if (dZ >= dZmin) break; dZmin = dZ; } @@ -1829,7 +2300,7 @@ bool InDet::SiSpacePointsSeedMaker_ATLxk::isZCompatible } /////////////////////////////////////////////////////////////////// -// New space point for seeds +/// New space point for seeds /////////////////////////////////////////////////////////////////// InDet::SiSpacePointForSeed* InDet::SiSpacePointsSeedMaker_ATLxk::newSpacePoint @@ -1837,22 +2308,33 @@ InDet::SiSpacePointForSeed* InDet::SiSpacePointsSeedMaker_ATLxk::newSpacePoint { InDet::SiSpacePointForSeed* sps = nullptr; - float r[3]; + /// r will store the coordinates of the space point relative + /// to the beam spot + std::array<float,3> r{0,0,0}; convertToBeamFrameWork(data, sp, r); + /// if needed, apply eta criterion if (data.checketa) { - float z = (fabs(r[2])+m_zmax); + float z = (std::abs(r[2])+m_zmax); float x = r[0]*data.dzdrmin; float y = r[1]*data.dzdrmin; if ((z*z )<(x*x+y*y)) return sps; } - + /// If we have previously populated the list and just reset + /// the iterator when re-initialising the data object, + /// then we re-use existing entries if (data.i_spforseed!=data.l_spforseed.end()) { + /// re-use existing entry at the current location sps = &(*data.i_spforseed++); - sps->set(sp,r); + /// and then update the existing entry with the new SP and location. + /// Unfortunately, set still relies on C-arrays... + sps->set(sp,&(r[0])); } else { - data.l_spforseed.emplace_back(InDet::SiSpacePointForSeed(sp, r)); + /// otherwise, the list needs to grow + data.l_spforseed.emplace_back(InDet::SiSpacePointForSeed(sp, &(r[0]))); + /// set our return pointer sps = &(data.l_spforseed.back()); + /// and make sure to update the iterator data.i_spforseed = data.l_spforseed.end(); } @@ -1881,10 +2363,10 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::initializeEventData(EventData& data) c data.initialize(EventData::ATLxk, m_maxsizeSP, m_maxOneSize, - 0, // maxsize not used - m_r_size, - 0, // sizeRF not used - SizeRFZ, - SizeRFZV, + 0, /// maxsize not used + m_nBinsR, + 0, /// sizeRF not used + arraySizePhiZ, + arraySizePhiZV, m_checketa); } diff --git a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/BaseTRTPIDCalculator.cxx b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/BaseTRTPIDCalculator.cxx index 83852efd06bacb738a0766dd407674f48f2a2dc5..702cdd22e20e9f5d20b196502d70920fc74228cf 100644 --- a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/BaseTRTPIDCalculator.cxx +++ b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/BaseTRTPIDCalculator.cxx @@ -46,7 +46,7 @@ float InDet::BaseTRTPIDCalculator::Limit(float prob){ if( prob > UpperLimit ){ return UpperLimit; } - else if( prob < LowerLimit ){ + if( prob < LowerLimit ){ return LowerLimit; } diff --git a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ElectronPidToolRun2.cxx b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ElectronPidToolRun2.cxx index 8cb8f9dfe5f585532d7a4e7fbafe7756cfbf6e07..b58f5b522ea189b878066300a1ce0ef049f35702 100644 --- a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ElectronPidToolRun2.cxx +++ b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ElectronPidToolRun2.cxx @@ -75,7 +75,7 @@ InDet::TRT_ElectronPidToolRun2::TRT_ElectronPidToolRun2(const std::string& t, co \*****************************************************************************/ InDet::TRT_ElectronPidToolRun2::~TRT_ElectronPidToolRun2() -{} += default; /*****************************************************************************\ |*%%% Initialisation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*| @@ -229,7 +229,7 @@ InDet::TRT_ElectronPidToolRun2::electronProbability(const Trk::Track& track) con if (!driftcircle) continue; // From now (May 2015) onwards, we ONLY USE MIDDLE HT BIT: - bool isHTMB = ((driftcircle->prepRawData()->getWord() & 0x00020000) > 0) ? true : false; + bool isHTMB = (driftcircle->prepRawData()->getWord() & 0x00020000) > 0; nTRThits++; if (isHTMB) nTRThitsHTMB++; diff --git a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_LocalOccupancy.cxx b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_LocalOccupancy.cxx index 75127e2916325b903cdfb1a8a645b6b6ae532fdf..97dd2ccb9eee29c96d28613ebabc905dc70010a1 100644 --- a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_LocalOccupancy.cxx +++ b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_LocalOccupancy.cxx @@ -60,8 +60,7 @@ TRT_LocalOccupancy::TRT_LocalOccupancy(const std::string& t, // ======================================================================= TRT_LocalOccupancy::~TRT_LocalOccupancy() -{ -} += default; // ======================================================================= StatusCode TRT_LocalOccupancy::initialize() @@ -118,7 +117,12 @@ std::vector<float> TRT_LocalOccupancy::GlobalOccupancy( ) const { output.push_back( data->m_occ_total[5]*1.e-2 ) ; // EndcapA A output.push_back( data->m_occ_total[6]*1.e-2 ) ; // EndcapB A - ATH_MSG_DEBUG("Compute Global Occupancy: whole TRT: " << output.at(0) << "\t Barrel C: " << output.at(1) << "\t EndcapA C: " << output.at(2) << "\t EndcapB C: " << output.at(3) << "\t Barrel A: " << output.at(4) << "\t EndcapA A: " << output.at(5) << "\t EndcapB A: " << output.at(6)); + ATH_MSG_DEBUG("Compute Global Occupancy: whole TRT: " + << output.at(0) << "\t Barrel C: " << output.at(1) + << "\t EndcapA C: " << output.at(2) << "\t EndcapB C: " + << output.at(3) << "\t Barrel A: " << output.at(4) + << "\t EndcapA A: " << output.at(5) + << "\t EndcapB A: " << output.at(6)); return output; } @@ -132,10 +136,22 @@ float TRT_LocalOccupancy::LocalOccupancy(const Trk::Track& track ) const { DataVector<const Trk::TrackStateOnSurface>::const_iterator tsos =trackStates->begin(); DataVector<const Trk::TrackStateOnSurface>::const_iterator tsosEnd =trackStates->end(); for (;tsos!=tsosEnd;++tsos) { - const Trk::MeasurementBase* mesb=(*tsos)->measurementOnTrack(); - if (!mesb) continue; - const InDet::TRT_DriftCircleOnTrack *driftcircle = dynamic_cast<const InDet::TRT_DriftCircleOnTrack*>(mesb); - if(!driftcircle) continue; + const Trk::MeasurementBase* mesb = (*tsos)->measurementOnTrack(); + if (!mesb) { + continue; + } + const InDet::TRT_DriftCircleOnTrack* driftcircle = nullptr; + if (mesb->type(Trk::MeasurementBaseType::RIO_OnTrack)) { + const Trk::RIO_OnTrack* tmpRio = static_cast<const Trk::RIO_OnTrack*>(mesb); + if (tmpRio->rioType(Trk::RIO_OnTrackType::TRT_DriftCircle)) { + driftcircle = static_cast<const InDet::TRT_DriftCircleOnTrack*>(tmpRio); + } + } + + if(!driftcircle) { + continue; + } + Identifier id=driftcircle->identify(); int det = m_TRTHelper->barrel_ec( id) ; int lay = m_TRTHelper->layer_or_wheel( id) ; @@ -202,7 +218,7 @@ std::map<int, double> TRT_LocalOccupancy::getDetectorOccupancy( const TRT_RDO_C for ( ; RDO_collection_iter!= RDO_collection_end; ++RDO_collection_iter) { const InDetRawDataCollection<TRT_RDORawData>* RDO_Collection(*RDO_collection_iter); if (!RDO_Collection) continue; - if (RDO_Collection->size() != 0){ + if (!RDO_Collection->empty()){ DataVector<TRT_RDORawData>::const_iterator r,rb=RDO_Collection->begin(),re=RDO_Collection->end(); for(r=rb; r!=re; ++r) { @@ -229,7 +245,7 @@ std::map<int, double> TRT_LocalOccupancy::getDetectorOccupancy( const TRT_RDO_C for(tdcvalue=0;tdcvalue<24;++tdcvalue) { if ( (word & mask) && SawZero) break; - else if ( !(word & mask) ) SawZero = true; + if ( !(word & mask) ) SawZero = true; mask>>=1; if(tdcvalue==7 || tdcvalue==15) mask>>=1; } @@ -285,7 +301,7 @@ TRT_LocalOccupancy::countHitsNearTrack (OccupancyData& data, for ( ; RDO_collection_iter!= RDO_collection_end; ++RDO_collection_iter) { const InDetRawDataCollection<TRT_RDORawData>* RDO_Collection(*RDO_collection_iter); if (!RDO_Collection) return; - if (RDO_Collection->size() != 0){ + if (!RDO_Collection->empty()){ DataVector<TRT_RDORawData>::const_iterator r,rb=RDO_Collection->begin(),re=RDO_Collection->end(); for(r=rb; r!=re; ++r) { @@ -313,7 +329,7 @@ TRT_LocalOccupancy::countHitsNearTrack (OccupancyData& data, int tdcvalue; for(tdcvalue=0;tdcvalue<24;++tdcvalue) { if ( (word & mask) && SawZero) break; - else if ( !(word & mask) ) SawZero = true; + if ( !(word & mask) ) SawZero = true; mask>>=1; if(tdcvalue==7 || tdcvalue==15) mask>>=1; } @@ -361,8 +377,7 @@ TRT_LocalOccupancy::countHitsNearTrack (OccupancyData& data, } } - return; -} + } float TRT_LocalOccupancy::LocalOccupancy(const double t_eta, const double t_phi) const { // take eta, phi of track, RoI, ... what have you diff --git a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ToT_dEdx.cxx b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ToT_dEdx.cxx index 069992600700a62173992128fb00f0f182fca67b..a002bcfba4ca2a0df5e440a0337d538eac57261d 100644 --- a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ToT_dEdx.cxx +++ b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ToT_dEdx.cxx @@ -51,8 +51,8 @@ TRT_ToT_dEdx::TRT_ToT_dEdx(const std::string& t, const std::string& n, const IIn SetDefaultConfiguration(); - m_timingProfile = 0; - m_trtId = 0; + m_timingProfile = nullptr; + m_trtId = nullptr; } @@ -98,7 +98,7 @@ void TRT_ToT_dEdx::ShowDEDXSetup() const // destructor -TRT_ToT_dEdx::~TRT_ToT_dEdx() {} +TRT_ToT_dEdx::~TRT_ToT_dEdx() = default; @@ -116,9 +116,9 @@ StatusCode TRT_ToT_dEdx::initialize() return StatusCode::FAILURE; } - m_timingProfile=0; + m_timingProfile=nullptr; sc = service("ChronoStatSvc", m_timingProfile); - if ( sc.isFailure() || 0 == m_timingProfile) { + if ( sc.isFailure() || nullptr == m_timingProfile) { ATH_MSG_DEBUG ("Can not find ChronoStatSvc name="<<m_timingProfile ); } @@ -136,10 +136,10 @@ StatusCode TRT_ToT_dEdx::initialize() ATH_MSG_ERROR ("Failed to retrieve StrawStatus Summary " << m_TRTStrawSummaryTool); ATH_MSG_ERROR ("configure as 'None' to avoid its loading."); return sc; - } else { + } if ( !m_TRTStrawSummaryTool.empty() ) ATH_MSG_INFO ( "Retrieved tool " << m_TRTStrawSummaryTool ); - } + if (m_useTrackPartWithGasType > EGasType::kUnset || m_useTrackPartWithGasType < EGasType::kXenon) { @@ -243,7 +243,7 @@ bool TRT_ToT_dEdx::isGood_Hit(const Trk::TrackStateOnSurface *itr, bool divideBy } const Trk::TrackParameters* trkP = itr->trackParameters(); - if(trkP==0)return false; + if(trkP==nullptr)return false; SG::ReadCondHandle<InDetDD::TRT_DetElementContainer> trtDetEleHandle(m_trtDetEleContKey); const InDetDD::TRT_DetElementCollection* elements(trtDetEleHandle->getElements()); @@ -388,7 +388,7 @@ double TRT_ToT_dEdx::dEdx(const Trk::Track* track, bool divideByL, bool useHThit return ToTsum/nhits; } - else + if(m_toolScenario==kAlgReweight || m_toolScenario==kAlgReweightTrunkOne) { std::vector<double> vecToT_Xe; @@ -535,7 +535,7 @@ double TRT_ToT_dEdx::usedHits(const Trk::Track* track, bool divideByL, bool useH return nhits; } - else + if(m_toolScenario==kAlgReweight || m_toolScenario==kAlgReweightTrunkOne) { int nhits = 0; @@ -666,7 +666,7 @@ double TRT_ToT_dEdx::getTest(const double dEdx_obs, const double pTrk, Trk::Part if( (Pone+Ptwo) != 0){ ATH_MSG_DEBUG("getTest():: return "<<Pone/(Pone+Ptwo)<<""); return Pone/(Pone+Ptwo); - }else + } return 0.5; } @@ -718,12 +718,12 @@ double TRT_ToT_dEdx::predictdEdx(EGasType gasType, const double pTrk, Trk::Parti return dEdxCorrection->paraDivideByLengthDedxP1[gasType]/std::pow( sqrt( (betaGamma*betaGamma)/(1.+(betaGamma*betaGamma)) ), dEdxCorrection->paraDivideByLengthDedxP4[gasType]) * (dEdxCorrection->paraDivideByLengthDedxP2[gasType] - std::pow( sqrt( (betaGamma*betaGamma)/(1.+(betaGamma*betaGamma)) ), dEdxCorrection->paraDivideByLengthDedxP4[gasType] ) - log(dEdxCorrection->paraDivideByLengthDedxP3[gasType]+1./( std::pow( betaGamma, dEdxCorrection->paraDivideByLengthDedxP5[gasType]) ) ) ); - }else { + } if(dEdxCorrection->paraDedxP3[gasType]+1./( std::pow( betaGamma, dEdxCorrection->paraDedxP5[gasType]) )<=0)return 0; return dEdxCorrection->paraDedxP1[gasType]/std::pow( sqrt( (betaGamma*betaGamma)/(1.+(betaGamma*betaGamma)) ), dEdxCorrection->paraDedxP4[gasType]) * (dEdxCorrection->paraDedxP2[gasType] - std::pow( sqrt( (betaGamma*betaGamma)/(1.+(betaGamma*betaGamma)) ), dEdxCorrection->paraDedxP4[gasType] ) - log(dEdxCorrection->paraDedxP3[gasType]+1./( std::pow( betaGamma, dEdxCorrection->paraDedxP5[gasType]) ) ) ); - } + //return 0; } @@ -830,14 +830,17 @@ ITRT_ToT_dEdx::EGasType TRT_ToT_dEdx::gasTypeInStraw(const InDet::TRT_DriftCircl double TRT_ToT_dEdx::getToT(unsigned int BitPattern) const { - if(m_whichToTEstimatorAlgo==kToTLargerIsland) + if (m_whichToTEstimatorAlgo == kToTLargerIsland) { return getToTlargerIsland(BitPattern); - else - if(m_whichToTEstimatorAlgo==kToTHighOccupancy) - return getToTHighOccupancy(BitPattern); - else - if(m_whichToTEstimatorAlgo==kToTHighOccupancySmart) - return getToTHighOccupancySmart(BitPattern); + } + + if (m_whichToTEstimatorAlgo == kToTHighOccupancy) { + return getToTHighOccupancy(BitPattern); + } + + if (m_whichToTEstimatorAlgo == kToTHighOccupancySmart) { + return getToTHighOccupancySmart(BitPattern); + } ATH_MSG_FATAL("getToT():: No ToT estimator case for m_whichToTEstimatorAlgo"<<m_whichToTEstimatorAlgo<<""); throw std::exception(); @@ -908,7 +911,7 @@ TRT_ToT_dEdx::correctToT_corrRZ(const Trk::TrackStateOnSurface* itr, if (!driftcircle) { return 0; } - if (driftcircle->prepRawData()==0) { + if (driftcircle->prepRawData()==nullptr) { return 0; } @@ -929,7 +932,7 @@ TRT_ToT_dEdx::correctToT_corrRZ(const Trk::TrackStateOnSurface* itr, return 0; } - if(m_applyMimicToXeCorrection==true || m_toolScenario==kAlgScalingToXe) + if(m_applyMimicToXeCorrection || m_toolScenario==kAlgScalingToXe) { if(gasType!=kXenon) // mimic to Xenon ToT, so we skip Xenon hits { @@ -1005,9 +1008,9 @@ double TRT_ToT_dEdx::correctToT_corrRZL(const Trk::TrackParameters* trkP,const I } - if(trkP==0)return false; + if(trkP==nullptr)return false; if (!driftcircle) return false; - if (driftcircle->prepRawData()==0) return 0; + if (driftcircle->prepRawData()==nullptr) return 0; double HitRtrack = fabs(trkP->parameters()[Trk::locR]); double Trt_RHit = fabs(driftcircle->localParameters()[Trk::driftRadius]); if ( m_useZeroRHitCut && Trt_RHit==0) return false; // tube hit @@ -1028,7 +1031,7 @@ double TRT_ToT_dEdx::correctToT_corrRZL(const Trk::TrackParameters* trkP,const I double ToT = getToT(BitPattern); if(ToT==0) return false; // If ToT for this hit equal 0, skip it. - if(m_applyMimicToXeCorrection==true || m_toolScenario==kAlgScalingToXe) + if(m_applyMimicToXeCorrection || m_toolScenario==kAlgScalingToXe) { if(gasType!=kXenon) // mimic to Xenon ToT, so we skip Xenon hits { @@ -1081,9 +1084,9 @@ double TRT_ToT_dEdx::correctToT_corrRZ(const Trk::TrackParameters* trkP,const In << " but data type is " << m_isData << ". Ignoring!"); } - if(trkP==0)return false; + if(trkP==nullptr)return false; if (!driftcircle) return false; - if (driftcircle->prepRawData()==0) return 0; + if (driftcircle->prepRawData()==nullptr) return 0; double HitRtrack = fabs(trkP->parameters()[Trk::locR]); double Trt_RHit = fabs(driftcircle->localParameters()[Trk::driftRadius]); if ( m_useZeroRHitCut && Trt_RHit==0) return false; // tube hit @@ -1104,7 +1107,7 @@ double TRT_ToT_dEdx::correctToT_corrRZ(const Trk::TrackParameters* trkP,const In double ToT = getToT(BitPattern); if(ToT==0) return false; // If ToT for this hit equal 0, skip it. - if(m_applyMimicToXeCorrection==true || m_toolScenario==kAlgScalingToXe) + if(m_applyMimicToXeCorrection || m_toolScenario==kAlgScalingToXe) { if(gasType!=kXenon) // mimic to Xenon ToT, so we skip Xenon hits { @@ -1142,11 +1145,10 @@ double TRT_ToT_dEdx::correctToT_corrRZ(const Trk::TrackParameters* trkP,const In double TRT_ToT_dEdx::fitFuncBarrel_corrRZ(EGasType gasType, double driftRadius,double zPosition, int Layer, int StrawLayer) const { - if(Layer==0 && StrawLayer<9) - return fitFuncBarrelShort_corrRZ(gasType, driftRadius,zPosition, StrawLayer); - else - return fitFuncBarrelLong_corrRZ(gasType, driftRadius,zPosition,Layer, StrawLayer); - //return 0; + if (Layer == 0 && StrawLayer < 9) { + return fitFuncBarrelShort_corrRZ(gasType, driftRadius, zPosition, StrawLayer); + } + return fitFuncBarrelLong_corrRZ(gasType, driftRadius, zPosition, Layer, StrawLayer); } @@ -1505,7 +1507,7 @@ int TRT_ToT_dEdx::DriftTimeBin_v2(unsigned int BitPattern) const for(i=1;i<18;++i) { if ( (word_LE & mask) && SawZero) break; - else if ( !(word_LE & mask) ) SawZero = true; + if ( !(word_LE & mask) ) SawZero = true; mask>>=1; if(i==7 || i==15) mask>>=1; } @@ -1527,7 +1529,7 @@ int TRT_ToT_dEdx::TrailingEdge_v2(unsigned int BitPattern) const { if ( (word_TE & mask) && SawZero ) break; - else if ( !(word_TE & mask) ) + if ( !(word_TE & mask) ) SawZero = true; mask <<= 1; @@ -1587,9 +1589,9 @@ int TRT_ToT_dEdx::TrailingEdge_v3(unsigned int BitPattern) const } } - if(SawZero2 == false) return 19; + if(!SawZero2) return 19; - if(SawZero2 == true){ + if(SawZero2){ for (k = j+1; k < 11; ++k) { mask_last_bit=mask_last_bit<<1; @@ -1604,7 +1606,7 @@ int TRT_ToT_dEdx::TrailingEdge_v3(unsigned int BitPattern) const } } - if(SawUnit1 == false && SawZero2 == true) return 19; + if(!SawUnit1 && SawZero2) return 19; } @@ -1621,7 +1623,7 @@ int TRT_ToT_dEdx::TrailingEdge_v3(unsigned int BitPattern) const { if ( (word_TE & mask) && SawZero ) break; - else if ( !(word_TE & mask) ) + if ( !(word_TE & mask) ) SawZero = true; } mask <<= 1; @@ -1766,9 +1768,23 @@ double TRT_ToT_dEdx::hitOccupancyCorrection(const Trk::TrackStateOnSurface *itr) int nHTConfigurations = 2; //this subarray exists for shared/non-shared hits, so 12 parameters int nSharedConfigurations = 2; - int num=layer*nParametersPerLayer+isHT*((abs(HitPart)-1)*(nEndcapLayers-nBarrelLayers)*nParametersPerLayer+nBarrelLayers*nParametersPerLayer)+isShared*((abs(HitPart)-1)*(nEndcapLayers-nBarrelLayers)*nParametersPerLayer*nHTConfigurations+nBarrelLayers*nParametersPerLayer*nHTConfigurations)+(abs(HitPart)-1)*nParametersPerLayer*nBarrelLayers*nHTConfigurations*nSharedConfigurations; + int num = + layer * nParametersPerLayer + + isHT * ((abs(HitPart) - 1) * (nEndcapLayers - nBarrelLayers) * + nParametersPerLayer + + nBarrelLayers * nParametersPerLayer) + + isShared * ((abs(HitPart) - 1) * (nEndcapLayers - nBarrelLayers) * + nParametersPerLayer * nHTConfigurations + + nBarrelLayers * nParametersPerLayer * nHTConfigurations) + + (abs(HitPart) - 1) * nParametersPerLayer * nBarrelLayers * + nHTConfigurations * nSharedConfigurations; //number for that given hit for non-shared conditions - int num_flat=layer*3+isHT*((abs(HitPart)-1)*(nEndcapLayers-nBarrelLayers)*nParametersPerLayer+nBarrelLayers*nParametersPerLayer)+(abs(HitPart)-1)*nParametersPerLayer*nBarrelLayers*nHTConfigurations*nSharedConfigurations; + int num_flat = layer * 3 + + isHT * ((abs(HitPart) - 1) * (nEndcapLayers - nBarrelLayers) * + nParametersPerLayer + + nBarrelLayers * nParametersPerLayer) + + (abs(HitPart) - 1) * nParametersPerLayer * nBarrelLayers * + nHTConfigurations * nSharedConfigurations; p0 = dEdxCorrection->hitOccPar[num]; p1 = dEdxCorrection->hitOccPar[num+1]; diff --git a/InnerDetector/InDetSimUtils/TRT_PAI_Process/CMakeLists.txt b/InnerDetector/InDetSimUtils/TRT_PAI_Process/CMakeLists.txt index 556c78713915b79249d11fef1a4e1635cd244583..c2654c23c6f3cf2854e2d94c1c2006659fadaf87 100644 --- a/InnerDetector/InDetSimUtils/TRT_PAI_Process/CMakeLists.txt +++ b/InnerDetector/InDetSimUtils/TRT_PAI_Process/CMakeLists.txt @@ -18,13 +18,18 @@ atlas_depends_on_subdirs( PUBLIC # External dependencies: find_package( CLHEP ) +atlas_add_library( TRT_PAI_ProcessLib + TRT_PAI_Process/*.h + INTERFACE + PUBLIC_HEADERS TRT_PAI_Process + LINK_LIBRARIES GaudiKernel ) + # Component(s) in the package: atlas_add_component( TRT_PAI_Process src/*.cxx src/components/*.cxx INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel GaudiKernel StoreGateLib SGtests InDetReadoutGeometry TRT_ReadoutGeometry ) + LINK_LIBRARIES ${CLHEP_LIBRARIES} TRT_PAI_ProcessLib AthenaBaseComps AthenaKernel StoreGateLib SGtests InDetReadoutGeometry TRT_ReadoutGeometry ) # Install files from the package: -atlas_install_headers( TRT_PAI_Process ) atlas_install_python_modules( python/*.py ) diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/python/InDetPhysValMonitoringTool.py b/InnerDetector/InDetValidation/InDetPhysValMonitoring/python/InDetPhysValMonitoringTool.py index e337d1a2b23ea6a262be441380c052e4b160e1e9..d118812ac402994bfec581b8a6c4ec40f9bd8b60 100644 --- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/python/InDetPhysValMonitoringTool.py +++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/python/InDetPhysValMonitoringTool.py @@ -1,14 +1,14 @@ # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from __future__ import print_function -from ConfigUtils import serviceFactory,toolFactory +from InDetPhysValMonitoring.ConfigUtils import serviceFactory,toolFactory from InDetRecExample.TrackingCommon import setDefaults import InDetPhysValMonitoring.InDetPhysValMonitoringConf def removePhysValExample() : print ('DEBUG no AntiKt4EMTopoJets in input file.') - from InDetPhysValDecoration import findMonMan + from InDetPhysValMonitoring.InDetPhysValDecoration import findMonMan mon_index = findMonMan() if mon_index is not None : import re diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/DummyTrackSlimmingTool.cxx b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/DummyTrackSlimmingTool.cxx index 002c3d8a98afc988ff7c4b750e13255b08652409..7b925ee01d549aec0021df431824def3b9dad6ce 100644 --- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/DummyTrackSlimmingTool.cxx +++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/DummyTrackSlimmingTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "DummyTrackSlimmingTool.h" @@ -26,4 +26,10 @@ DummyTrackSlimmingTool::slimCopy(const Trk::Track& track) const{ return std::make_unique<Trk::Track>(track); } +void +DummyTrackSlimmingTool::slimTrack(Trk::Track&) const{ +} + + + diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/DummyTrackSlimmingTool.h b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/DummyTrackSlimmingTool.h index d750ab9f90d713b9156b18f4e566a699675d61ae..de43273aec9d94b2face80c093098a58e3bcfb2f 100644 --- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/DummyTrackSlimmingTool.h +++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/DummyTrackSlimmingTool.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /* Dear emacs, this is -*-c++-*- */ @@ -37,6 +37,7 @@ public: */ virtual Trk::Track* slim(const Trk::Track& track) const override; virtual std::unique_ptr<Trk::Track> slimCopy(const Trk::Track& track) const override; + virtual void slimTrack(Trk::Track&) const override; private: }; diff --git a/LArCalorimeter/LArCafJobs/CMakeLists.txt b/LArCalorimeter/LArCafJobs/CMakeLists.txt index dc9e4624743c4850e043c3f0d07aa719e70d5562..48c593bbfa42b13097ebd275a34650fcc80f22b7 100644 --- a/LArCalorimeter/LArCafJobs/CMakeLists.txt +++ b/LArCalorimeter/LArCafJobs/CMakeLists.txt @@ -69,6 +69,7 @@ atlas_add_library( LArCafJobsLib src/SimpleShape.cxx src/LArNoiseBursts.cxx src/LArHECNoise.cxx + src/LArReadCells.cxx PUBLIC_HEADERS LArCafJobs PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} LINK_LIBRARIES CaloIdentifier AthenaBaseComps AthenaKernel GaudiKernel LArIdentifier LArRawConditions LArRawEvent egammaEvent TrigSteeringEvent McParticleEvent StoreGateLib SGtests LArToolsLib TrigDecisionToolLib CaloDetDescrLib diff --git a/LArCalorimeter/LArCafJobs/LArCafJobs/LArReadCells.h b/LArCalorimeter/LArCafJobs/LArCafJobs/LArReadCells.h new file mode 100644 index 0000000000000000000000000000000000000000..f1dfb7ee16e208e44d3678215a4b962fab0d832f --- /dev/null +++ b/LArCalorimeter/LArCafJobs/LArCafJobs/LArReadCells.h @@ -0,0 +1,63 @@ +/* + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +*/ + + +#ifndef LARCAFJOBS_LArReadCells_H +#define LARCAFJOBS_LArReadCells_H 1 + +#include "AthenaBaseComps/AthAlgorithm.h" + +#include "CaloIdentifier/CaloIdManager.h" +#include "LArCabling/LArOnOffIdMapping.h" +#include "LArIdentifier/LArOnlineID.h" +#include "LArElecCalib/ILArPedestal.h" +#include "TTree.h" + +class CaloCell_ID; + + +class LArReadCells: public ::AthAlgorithm { + public: + LArReadCells( const std::string& name, ISvcLocator* pSvcLocator ); + virtual ~LArReadCells(); + + virtual StatusCode initialize(); + virtual StatusCode execute(); + virtual StatusCode finalize(); + + private: + + Gaudi::Property<double> m_etcut{this,"etCut",1000.,"Et cut to dump cells"}; + + const DataHandle<CaloIdManager> m_caloIdMgr; + const CaloCell_ID* m_calo_id; + + + TTree* m_tree; + int m_runNumber; + int m_lbNumber; + int m_eventNumber; + int m_bcid; + int m_error; + int m_ncells; + float m_ECell[250000]; + float m_TCell[250000]; + float m_EtaCell[250000]; + float m_PhiCell[250000]; + int m_LayerCell[250000]; + int m_ProvCell[250000]; + int m_QuaCell[250000]; + int m_GainCell[250000]; + int m_HwidCell[250000]; + int m_ADC[250000][32]; + + SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"}; + SG::ReadCondHandleKey<ILArPedestal> m_pedestalKey{this,"PedestalKey","LArPedestal","SG Key of Pedestal conditions object"}; + const LArOnlineID* m_lar_online_id; + + +}; + +#endif //> !MYSPLASHANALYSIS_LArReadCells_H + diff --git a/LArCalorimeter/LArCafJobs/share/LArReadCells_overlay.py b/LArCalorimeter/LArCafJobs/share/LArReadCells_overlay.py new file mode 100644 index 0000000000000000000000000000000000000000..6c7cd5f4ac65294dbb14938531d71de40170d884 --- /dev/null +++ b/LArCalorimeter/LArCafJobs/share/LArReadCells_overlay.py @@ -0,0 +1,110 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + +############################################################### +# +# Job options file to read data overlay pool file with LArRawChannel and run LArReadCells +# +#============================================================== +from AthenaCommon.DetFlags import DetFlags +DetFlags.detdescr.all_setOn() +DetFlags.Muon_setOff() +DetFlags.Forward_setOff() + + +from AthenaCommon.GlobalFlags import globalflags +globalflags.DetGeo = 'atlas' +globalflags.DataSource = 'data' +globalflags.InputFormat = 'pool' + +from RecExConfig.RecFlags import rec +rec.readESD.set_Value_and_Lock(False) +rec.readRDO.set_Value_and_Lock(True) + +from AthenaCommon.BeamFlags import jobproperties +jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(20.0) +jobproperties.Beam.bunchSpacing.set_Value_and_Lock(25) + +from LArROD.LArRODFlags import larRODFlags +larRODFlags.readDigits.set_Value_and_Lock(False) + +from LArConditionsCommon.LArCondFlags import larCondFlags +larCondFlags.LoadElecCalib.set_Value_and_Lock(True) + +from CaloRec.CaloCellFlags import jobproperties +jobproperties.CaloCellFlags.doLArDeadOTXCorr=False +jobproperties.CaloCellFlags.doLArThinnedDigits=False +jobproperties.CaloCellFlags.doPileupOffsetBCIDCorr=False + +include( "AthenaPoolCnvSvc/ReadAthenaPool_jobOptions.py" ) +include( "PartPropSvc/PartPropSvc.py" ) +# +# Pool Converters +# +include( "EventAthenaPool/EventAthenaPool_joboptions.py" ) +include( "GeneratorObjectsAthenaPool/GeneratorObjectsAthenaPool_joboptions.py" ) +include( "LArAthenaPool/LArAthenaPool_joboptions.py" ) +include( "G4SimAthenaPOOL/G4SimAthenaPOOL_joboptions.py" ) + +# Get a handle to the ServiceManager +from AthenaCommon.AppMgr import ServiceMgr as svcMgr +# Get a handle to the ApplicationManager +from AthenaCommon.AppMgr import theApp + +# +# Pool input +# +PoolRDOInput = [ +"test1/dataOverlayRDO.pool.root" +] + +svcMgr.EventSelector.InputCollections = PoolRDOInput +from AthenaCommon.AthenaCommonFlags import athenaCommonFlags +athenaCommonFlags.FilesInput = PoolRDOInput + +# the Tile, LAr and Calo detector description package +from AthenaCommon.GlobalFlags import jobproperties +jobproperties.Global.DetDescrVersion='ATLAS-R2-2015-03-01-00' + +from AtlasGeoModel import SetGeometryVersion +from AtlasGeoModel import GeoModelInit + +from IOVDbSvc.CondDB import conddb +conddb.blockFolder("/LAR/LArCellPositionShift") +conddb.addFolderWithTag("LAR_OFL","/LAR/LArCellPositionShift","LArCellPositionShift-ideal",force=True,forceMC=True) + +include( "CaloDetMgrDetDescrCnv/CaloDetMgrDetDescrCnv_joboptions.py" ) +include( "LArDetDescr/LArDetDescr_joboptions.py" ) +include( "LArConditionsCommon/LArConditionsCommon_comm_jobOptions.py") +include("TileConditions/TileConditions_jobOptions.py" ) +include( "TileConditions/TileConditions_jobOptions.py" ) + +from RecExConfig.ObjKeyStore import objKeyStore +objKeyStore.readInputFile('RecExPers/OKS_streamRDO.py') + +from AthenaCommon.AlgSequence import AlgSequence +topSequence = AlgSequence() + +from CaloRec.CaloCellGetter import CaloCellGetter +CaloCellGetter() + +topSequence += CfgMgr.LArReadCells() +topSequence.LArReadCells.etCut = -1e6 + +#-------------------------------------------------------------- +# Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL ) +#------------------------------------------------------------- +svcMgr.MessageSvc.OutputLevel = INFO + +if not hasattr(ServiceMgr, 'THistSvc'): + from GaudiSvc.GaudiSvcConf import THistSvc + ServiceMgr += THistSvc() + +ServiceMgr.THistSvc.Output = ["SPLASH DATAFILE='ntuple1.root' OPT='RECREATE'"] + +#-------------------------------------------------------------- +# Event related parameters +#-------------------------------------------------------------- +# Number of events to be processed (default is 10) +theApp.EvtMax = 1000000 +theApp.EvtSel = "EventSelector" + diff --git a/LArCalorimeter/LArCafJobs/src/LArReadCells.cxx b/LArCalorimeter/LArCafJobs/src/LArReadCells.cxx new file mode 100644 index 0000000000000000000000000000000000000000..2a3f4f35c7eff7a7c696467794dd0f45980fa7a4 --- /dev/null +++ b/LArCalorimeter/LArCafJobs/src/LArReadCells.cxx @@ -0,0 +1,184 @@ +/* + Copyright (C) 2002-2028 CERN for the benefit of the ATLAS collaboration +*/ + +#include "LArCafJobs/LArReadCells.h" + +#include "xAODEventInfo/EventInfo.h" + +#include "Identifier/Identifier.h" +#include "Identifier/HWIdentifier.h" + +#include "CaloIdentifier/CaloCell_ID.h" +#include "CaloGeoHelpers/CaloSampling.h" +#include "CaloEvent/CaloCell.h" +#include "CaloEvent/CaloCellContainer.h" + +#include "LArRawEvent/LArDigit.h" +#include "LArRawEvent/LArDigitContainer.h" + +#include "GaudiKernel/ITHistSvc.h" +#include "GaudiKernel/ServiceHandle.h" + +#include "LArElecCalib/ILArPedestal.h" + + + +LArReadCells::LArReadCells( const std::string& name, ISvcLocator* pSvcLocator ) : AthAlgorithm( name, pSvcLocator ){ +} + + +LArReadCells::~LArReadCells() {} + + +StatusCode LArReadCells::initialize() { + ATH_MSG_INFO ("Initializing " << name() << "..."); + + ServiceHandle<ITHistSvc> histSvc("THistSvc",name()); + CHECK( histSvc.retrieve() ); + m_tree = new TTree("myTree","myTree"); + CHECK( histSvc->regTree("/SPLASH/myTree",m_tree) ); + m_tree->Branch("RunNumber",&m_runNumber,"RunNumber/I"); + m_tree->Branch("LBNumber",&m_lbNumber,"LBNumber/I"); + m_tree->Branch("EventNumber",&m_eventNumber,"EventNumber/I"); + m_tree->Branch("BCID",&m_bcid,"BCID/I"); + m_tree->Branch("LArError",&m_error,"LArError/I"); + m_tree->Branch("ncells",&m_ncells,"ncells/I"); + m_tree->Branch("ECell",m_ECell,"eCell[ncells]/F"); + m_tree->Branch("TCell",m_TCell,"tCell[ncells]/F"); + m_tree->Branch("EtaCell",m_EtaCell,"etaCell[ncells]/F"); + m_tree->Branch("PhiCell",m_PhiCell,"phiCell[ncells]/F"); + m_tree->Branch("LayerCell",m_LayerCell,"layerCell[ncells]/I"); + m_tree->Branch("ProvCell", m_ProvCell,"provCell[ncells]/I"); + m_tree->Branch("QuaCell", m_QuaCell,"quaCell[ncells]/I"); + m_tree->Branch("GainCell", m_GainCell,"gainCell[ncells]/I"); + m_tree->Branch("HwidCell", m_HwidCell,"hwidCell[ncells]/I"); + m_tree->Branch("ADC",m_ADC,"ADC[ncells][32]/I"); + + ATH_CHECK(detStore()->retrieve(m_caloIdMgr)); + m_calo_id = m_caloIdMgr->getCaloCell_ID(); + ATH_CHECK( detStore()->retrieve(m_lar_online_id, "LArOnlineID") ); + + ATH_CHECK( m_cablingKey.initialize() ); + ATH_CHECK(m_pedestalKey.initialize()); + + ATH_MSG_INFO("Energy cut for time and quality computation: " << m_etcut); + + return StatusCode::SUCCESS; +} + +StatusCode LArReadCells::finalize() { + ATH_MSG_INFO ("Finalizing " << name() << "..."); + + return StatusCode::SUCCESS; +} + +StatusCode LArReadCells::execute() { + ATH_MSG_DEBUG ("Executing " << name() << "..."); + + SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{m_cablingKey}; + const LArOnOffIdMapping* cabling=*cablingHdl; + if(!cabling) { + ATH_MSG_ERROR( "Do not have cabling object LArOnOffIdMapping" ); + return StatusCode::FAILURE; + } + + //Get Conditions input + SG::ReadCondHandle<ILArPedestal> pedHdl{m_pedestalKey}; + const ILArPedestal* larPedestal=*pedHdl; + + + const xAOD::EventInfo* eventInfo = 0; + ATH_CHECK( evtStore()->retrieve( eventInfo) ); + ATH_MSG_INFO( " run number " << eventInfo->runNumber() ); + + m_runNumber = eventInfo->runNumber(); + m_eventNumber = eventInfo->eventNumber(); + m_lbNumber = eventInfo->lumiBlock(); + m_bcid = eventInfo->bcid(); + m_error = 0; + if (eventInfo->errorState(xAOD::EventInfo::LAr)==xAOD::EventInfo::Error) m_error=1; + + std::vector<const LArDigit*> IndexDigit; + int nCell = m_calo_id->calo_cell_hash_max(); + IndexDigit.resize(nCell,NULL); + + const LArDigitContainer* digit_container; + if (evtStore()->contains<LArDigitContainer>("FREE")) { + CHECK(evtStore()->retrieve(digit_container,"FREE")); + LArDigitContainer::const_iterator first_digit = digit_container->begin(); + LArDigitContainer::const_iterator end_digit = digit_container->end(); + for (; first_digit != end_digit; ++first_digit) + { + HWIdentifier hwid = (*first_digit)->hardwareID(); + Identifier id = cabling->cnvToIdentifier(hwid); + int index = (int) (m_calo_id->calo_cell_hash(id)); + if (index>=0 && index<nCell) IndexDigit[index]=(*first_digit); + } + } + + + const CaloCellContainer* cell_container; + CHECK( evtStore()->retrieve(cell_container,"AllCalo")); + + CaloCellContainer::const_iterator first_cell = cell_container->begin(); + CaloCellContainer::const_iterator end_cell = cell_container->end(); + m_ncells=0; + for (; first_cell != end_cell; ++first_cell) + { + Identifier cellID = (*first_cell)->ID(); + double et = (*first_cell)->et(); + + if (et > m_etcut && !(m_calo_id->is_tile(cellID)) ){ + + m_ECell[m_ncells]= (*first_cell)->energy(); + m_TCell[m_ncells]= (*first_cell)->time(); + m_EtaCell[m_ncells]= (*first_cell)->eta(); + m_PhiCell[m_ncells]= (*first_cell)->phi(); + m_LayerCell[m_ncells]= m_calo_id->calo_sample(cellID); + m_ProvCell[m_ncells]=(*first_cell)->provenance(); + m_QuaCell[m_ncells]=(*first_cell)->quality(); + m_GainCell[m_ncells]=(*first_cell)->gain(); + + HWIdentifier hwid = cabling->createSignalChannelID(cellID); + int barrel_ec = m_lar_online_id->barrel_ec(hwid); + int pos_neg = m_lar_online_id->pos_neg(hwid); + int FT = m_lar_online_id->feedthrough(hwid); + int slot = m_lar_online_id->slot(hwid); + int channel = m_lar_online_id->channel(hwid); + int myid=0; + if (barrel_ec<2 && pos_neg<2 && FT<32 && slot<16 && channel<128) + myid = (channel) | (slot << 7) | (FT<<11) | (pos_neg << 16) | (barrel_ec << 17); + + float pedestal=0.; + if (larPedestal) { + pedestal = larPedestal->pedestal(hwid,(*first_cell)->gain()); + } + + m_HwidCell[m_ncells]=myid; + + int index = (int) (m_calo_id->calo_cell_hash(cellID)); + if (IndexDigit[index]) { + const std::vector<short>& vSamples=(IndexDigit[index])->samples(); + int nsamples = vSamples.size(); + for (int i=0;i<std::min(32,nsamples);i++) { + m_ADC[m_ncells][i]=vSamples[i]-pedestal; + } + } + m_ncells++; + + } + + if (m_ncells>=250000) { + ATH_MSG_WARNING(" --- too many cells "); + break; + } + } + + ATH_MSG_INFO("Number of cells read " << m_ncells ); + + m_tree->Fill(); + + return StatusCode::SUCCESS; +} + diff --git a/LArCalorimeter/LArCafJobs/src/components/LArCafJobs_entries.cxx b/LArCalorimeter/LArCafJobs/src/components/LArCafJobs_entries.cxx index d9e1c86bff7ecdf01a9a82245f712d839336ebba..0e933f4a6b74c78e169cab6397b0e7d0ac26f673 100644 --- a/LArCalorimeter/LArCafJobs/src/components/LArCafJobs_entries.cxx +++ b/LArCalorimeter/LArCafJobs/src/components/LArCafJobs_entries.cxx @@ -3,10 +3,12 @@ #include "LArCafJobs/LArSimpleShapeDumper.h" #include "LArCafJobs/LArNoiseBursts.h" #include "LArCafJobs/LArHECNoise.h" +#include "LArCafJobs/LArReadCells.h" DECLARE_COMPONENT( LArShapeDumper ) DECLARE_COMPONENT( LArSimpleShapeDumper ) DECLARE_COMPONENT( LArNoiseBursts ) DECLARE_COMPONENT( LArHECNoise ) DECLARE_COMPONENT( LArShapeDumperTool ) +DECLARE_COMPONENT( LArReadCells ) diff --git a/LArCalorimeter/LArClusterRec/python/LArClusterSwGetters.py b/LArCalorimeter/LArClusterRec/python/LArClusterSwGetters.py index 9ce7073d87fedace5c084d68c0f27917da35099f..8280881a25a321e5b5e5ece52eaab53ab1a5a427 100755 --- a/LArCalorimeter/LArClusterRec/python/LArClusterSwGetters.py +++ b/LArCalorimeter/LArClusterRec/python/LArClusterSwGetters.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # # $Id: LArClusterSwGetters.py,v 1.4 2008/04/14 16:24:22 laplace Exp $ @@ -12,6 +12,11 @@ from CaloRec.CaloClusterSwGetterBase import make_CaloClusterSwGetter # Helper so that we don't need to type the name twice. def _make_getter (*args, **kw): + if 'corrversion' not in kw: + # Temporary until metatool / ToolWithConstant issues are worked out. + kw = kw.copy() + from egammaRec.egammaRecFlags import jobproperties + kw['corrversion'] = jobproperties.egammaRecFlags.clusterCorrectionVersion() g = make_CaloClusterSwGetter (*args, **kw) globals()[g.__name__] = g return g diff --git a/LArCalorimeter/LArG4/LArG4ShowerLibSvc/LArG4ShowerLibSvc/ILArG4ShowerLibSvc.h b/LArCalorimeter/LArG4/LArG4ShowerLibSvc/LArG4ShowerLibSvc/ILArG4ShowerLibSvc.h index 1197d2241d85422b7217e8dd4761c8455a3fcefe..0825f3f250c4807d4f9ba2b42223917e5778e158 100755 --- a/LArCalorimeter/LArG4/LArG4ShowerLibSvc/LArG4ShowerLibSvc/ILArG4ShowerLibSvc.h +++ b/LArCalorimeter/LArG4/LArG4ShowerLibSvc/LArG4ShowerLibSvc/ILArG4ShowerLibSvc.h @@ -5,6 +5,8 @@ #ifndef LARG4SHOWERLIBSVC_ILIBLARSHOWERLIBSVC_H #define LARG4SHOWERLIBSVC_ILIBLARSHOWERLIBSVC_H +// #define DEBUG_FrozenShowers + // Include Files #include "GaudiKernel/IInterface.h" @@ -23,8 +25,11 @@ public: virtual bool checkLibrary( G4int, int ) = 0; +#ifdef DEBUG_FrozenShowers virtual std::vector<EnergySpot> getShower(const G4FastTrack&, int ) = 0; - +#else + virtual std::vector<EnergySpot> getShower(const G4FastTrack&, int ) const = 0; +#endif virtual double getContainmentZ(const G4FastTrack&, int ) = 0; virtual double getContainmentR(const G4FastTrack&, int ) = 0; }; diff --git a/LArCalorimeter/LArG4/LArG4ShowerLibSvc/LArG4ShowerLibSvc/LArG4ShowerLibSvc.h b/LArCalorimeter/LArG4/LArG4ShowerLibSvc/LArG4ShowerLibSvc/LArG4ShowerLibSvc.h index 78fbc29110a4c7c2880a6381f8c574d02eaa3ac4..0dd6d65c88b9d9b191c3ecaebc6b23bd858cd3d4 100755 --- a/LArCalorimeter/LArG4/LArG4ShowerLibSvc/LArG4ShowerLibSvc/LArG4ShowerLibSvc.h +++ b/LArCalorimeter/LArG4/LArG4ShowerLibSvc/LArG4ShowerLibSvc/LArG4ShowerLibSvc.h @@ -23,11 +23,6 @@ namespace ShowerLib { class ShowerLibStatistics; } -class IAtRndmGenSvc; - -namespace CLHEP { - class HepRandomEngine; -} /** * @@ -57,15 +52,18 @@ public: virtual bool checkLibrary(G4int particleCode, int detectorTag); //! return list of energy depositions for given track (interface implementation) +#ifdef DEBUG_FrozenShowers virtual std::vector<EnergySpot> getShower(const G4FastTrack& track, int detectorTag); - +#else + virtual std::vector<EnergySpot> getShower(const G4FastTrack& track, int detectorTag) const; +#endif virtual double getContainmentZ(const G4FastTrack& track, int detectorTag); virtual double getContainmentR(const G4FastTrack& track, int detectorTag); private: //! get shower library from StoreGate by track (using current volume name) - const ShowerLib::IShowerLib* getShowerLib(G4int particleCode, int detectorTag); + const ShowerLib::IShowerLib* getShowerLib(G4int particleCode, int detectorTag) const; typedef std::map<int, const ShowerLib::IShowerLib*> libmap; libmap m_libraryMap; //!< mapping StoreGate key to handle in StoreGate @@ -75,10 +73,7 @@ private: std::map<std::string,int> m_detmap; StringArrayProperty m_fileNameList; //!< property, list of library files - StringProperty m_rndmEngineName; //!< property, name of athena RNG engine - ServiceHandle<IAtRndmGenSvc> m_rndmGenSvc; - CLHEP::HepRandomEngine *m_rndmEngine; }; #endif // G4SHOWERLIBSVC_G4SHOWERLIBSVC_H diff --git a/LArCalorimeter/LArG4/LArG4ShowerLibSvc/src/LArG4ShowerLibSvc.cxx b/LArCalorimeter/LArG4/LArG4ShowerLibSvc/src/LArG4ShowerLibSvc.cxx index 6095a7a24447ebbfe94d62eaa70ee92697caba3f..221999f6d4ed8e9a9c2122df83aa32c67919acd5 100755 --- a/LArCalorimeter/LArG4/LArG4ShowerLibSvc/src/LArG4ShowerLibSvc.cxx +++ b/LArCalorimeter/LArG4/LArG4ShowerLibSvc/src/LArG4ShowerLibSvc.cxx @@ -9,17 +9,12 @@ #include "PathResolver/PathResolver.h" -#include "AthenaKernel/IAtRndmGenSvc.h" #include "AthenaKernel/Units.h" -#include "CLHEP/Random/RandomEngine.h" -#include "CLHEP/Random/RandGauss.h" - - #include <sstream> #include "TFile.h" #include "TTree.h" - +#include "Randomize.hh" namespace Units = Athena::Units; @@ -27,14 +22,9 @@ namespace Units = Athena::Units; LArG4ShowerLibSvc::LArG4ShowerLibSvc(const std::string& name,ISvcLocator* svc) : base_class(name,svc) , m_fileNameList() - , m_rndmEngineName("FROZENSHOWERS") - , m_rndmGenSvc("AtDSFMTGenSvc", name) - , m_rndmEngine(nullptr) { declareProperty( "FileNameList", m_fileNameList, "List of filenames for direct reading" ); - declareProperty( "RndmEngineName", m_rndmEngineName, "Name of athena RNG engine" ); - declareProperty( "RndmGenSvc", m_rndmGenSvc, "Athena RNG service" ); - + /* BE SURE THIS ONE IS THE SAME AS IN LArG4FastSimSvc!!! */ enum DETECTOR {EMB=100000,EMEC=200000,FCAL1=300000,FCAL2=400000,FCAL3=500000,HECLOC=600000,HEC=700000}; @@ -115,22 +105,9 @@ StatusCode LArG4ShowerLibSvc::initialize() libmap::const_iterator it; for(it = m_libraryMap.begin();it != m_libraryMap.end(); it++) { ATH_MSG_INFO(" " << m_locations[(*it).first] << ": " << (*it).second->comment()); +#ifdef DEBUG_FrozenShowers m_statisticsMap[(*it).second] = (*it).second->createStatistics(); - } - // we have loaded some libs, so there is a point in RNG service - if (m_rndmEngineName.value().length() > 0) { - if (m_rndmGenSvc.retrieve().isSuccess()) { - m_rndmEngine = m_rndmGenSvc->GetEngine(m_rndmEngineName.value()); - if (m_rndmEngine) - ATH_MSG_INFO("Successfully retrieved random number stream " << m_rndmEngineName.value()); - else - ATH_MSG_WARNING("Couldn't retrieve random number stream " << m_rndmEngineName.value() << ". The simulation result may be biased."); - } - else { - ATH_MSG_WARNING("Couldn't retrieve random number service. The simulation result may be biased."); - } - } else { - ATH_MSG_WARNING("Empty name for random stream. No randomization will be applied."); +#endif } } @@ -164,7 +141,7 @@ StatusCode LArG4ShowerLibSvc::finalize() * Returns library from internal map based on the particle. Returns nullptr if there * is no library for needed particle/detector. */ -const ShowerLib::IShowerLib* LArG4ShowerLibSvc::getShowerLib(G4int particleCode, int detectorTag) +const ShowerLib::IShowerLib* LArG4ShowerLibSvc::getShowerLib(G4int particleCode, int detectorTag) const { int location; @@ -191,8 +168,14 @@ LArG4ShowerLibSvc::checkLibrary(G4int particleCode, int detectorTag) * Returns a shower based on the particle. Return empty shower if there is no * appropriate showers in the libraries. */ + +#ifdef DEBUG_FrozenShowers std::vector<EnergySpot> LArG4ShowerLibSvc::getShower(const G4FastTrack& track, int detectorTag) +#else +std::vector<EnergySpot> +LArG4ShowerLibSvc::getShower(const G4FastTrack& track, int detectorTag) const +#endif { // get shower lib from the map const ShowerLib::IShowerLib* library = getShowerLib(track.GetPrimaryTrack()->GetDefinition()->GetPDGEncoding(), detectorTag); @@ -208,10 +191,14 @@ LArG4ShowerLibSvc::getShower(const G4FastTrack& track, int detectorTag) // get a shower from the library int randomShift = 0; - if (m_rndmEngine) { - randomShift = (int)(CLHEP::RandGauss::shoot(m_rndmEngine, 0., 2.5)+0.5); - } + randomShift = (int)(CLHEP::RandGaussZiggurat::shoot(G4Random::getTheEngine(), 0., 2.5)+0.5); + +#ifdef DEBUG_FrozenShowers std::vector<EnergySpot>* shower = library->getShower(track.GetPrimaryTrack(), m_statisticsMap[library], randomShift); +#else + std::vector<EnergySpot>* shower = library->getShower(track.GetPrimaryTrack(), nullptr, randomShift); +#endif + if (shower == nullptr) { return std::vector<EnergySpot>(); diff --git a/LArCalorimeter/LArMonitoring/python/LArCoverageAlg.py b/LArCalorimeter/LArMonitoring/python/LArCoverageAlg.py index e5451342d76b36cc31115fcd8ea6512137c35126..74fbb3a77a185498b4ece6bf2e1e43fd312170ef 100644 --- a/LArCalorimeter/LArMonitoring/python/LArCoverageAlg.py +++ b/LArCalorimeter/LArMonitoring/python/LArCoverageAlg.py @@ -11,14 +11,8 @@ def LArCoverageConfigOld(inputFlags): from AthenaMonitoring import AthMonitorCfgHelperOld from LArMonitoring.LArMonitoringConf import LArCoverageAlg - from LArBadChannelTool.LArBadChannelToolConf import LArBadChannelMasker - theLArRCBMasker=LArBadChannelMasker("BadLArRawChannelMask") - theLArRCBMasker.DoMasking=True - theLArRCBMasker.ProblemsToMask=["deadReadout","deadPhys","highNoiseHG","highNoiseMG","highNoiseLG"] - helper = AthMonitorCfgHelperOld(inputFlags, 'LArCoverageAlgOldCfg') LArCoverageConfigCore(helper,LArCoverageAlg,inputFlags) - helper.monSeq.LArCoverageAlg.LArBadChannelMask=theLArRCBMasker return helper.result() @@ -33,14 +27,6 @@ def LArCoverageConfig(inputFlags): from AthenaConfiguration.ComponentFactory import CompFactory LArCoverageConfigCore(helper, CompFactory.LArCoverageAlg,inputFlags) - # adding BadChan masker private tool - from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator - cfg=ComponentAccumulator() - from LArBadChannelTool.LArBadChannelConfig import LArBadChannelMaskerCfg#,LArBadChannelCfg - acc= LArBadChannelMaskerCfg(inputFlags,problemsToMask=["highNoiseHG","highNoiseMG","highNoiseLG","deadReadout","deadPhys"],ToolName="BadLArRawChannelMask") - CompFactory.LArCoverageAlg.LArBadChannelMask=acc.popPrivateTools() - cfg.merge(acc) - cfg.merge(helper.result()) return cfg @@ -48,6 +34,21 @@ def LArCoverageConfigCore(helper, algoinstance,inputFlags): larCoverageAlg = helper.addAlgorithm(algoinstance,'LArCoverageAlg') + # adding BadChan masker private tool + from AthenaConfiguration.ComponentFactory import isRun3Cfg + if isRun3Cfg(): + from LArBadChannelTool.LArBadChannelConfig import LArBadChannelMaskerCfg#,LArBadChannelCfg + acc= LArBadChannelMaskerCfg(inputFlags,problemsToMask=["highNoiseHG","highNoiseMG","highNoiseLG","deadReadout","deadPhys"],ToolName="BadLArRawChannelMask") + larCoverageAlg.LArBadChannelMask=acc.popPrivateTools() + helper.resobj.merge(acc) + else: + from LArBadChannelTool.LArBadChannelToolConf import LArBadChannelMasker + theLArRCBMasker=LArBadChannelMasker("BadLArRawChannelMask") + theLArRCBMasker.DoMasking=True + theLArRCBMasker.ProblemsToMask=["deadReadout","deadPhys","highNoiseHG","highNoiseMG","highNoiseLG"] + larCoverageAlg.LArBadChannelMask=theLArRCBMasker + + from LArMonitoring.GlobalVariables import lArDQGlobals #define the group names here, as you'll use them multiple times diff --git a/LArCalorimeter/LArMonitoring/python/LArRODMonAlg.py b/LArCalorimeter/LArMonitoring/python/LArRODMonAlg.py index db9f96b31a37975617c92ebdc56c3c3024fdf978..7cafe8d3f5f45c3489497feb575cd0547f52c974 100644 --- a/LArCalorimeter/LArMonitoring/python/LArRODMonAlg.py +++ b/LArCalorimeter/LArMonitoring/python/LArRODMonAlg.py @@ -133,7 +133,7 @@ def LArRODMonConfigCore(helper, algoinstance,inputFlags, cellDebug=False, dspDeb #Infos histos (vs. LB) info_hist_path='Infos/' cut = "#delta ADC>"+str(larRODMonAlg.ADCthreshold)+" and |t_offline| < "+str(larRODMonAlg.peakTimeCut)+" ns" - Group.defineHistogram('LBN,partition:EErrorsPerLB', + Group.defineHistogram('LBN,partitionI;EErrorsPerLB', title='Nb of errors in E per LB - ' +cut+':Luminosity Block:Partition', type='TH2I', weight='numE', @@ -142,7 +142,7 @@ def LArRODMonConfigCore(helper, algoinstance,inputFlags, cellDebug=False, dspDeb ybins=lArDQGlobals.N_Partitions, ymin=-0.5, ymax=lArDQGlobals.N_Partitions-0.5, ylabels = lArDQGlobals.Partitions ) - Group.defineHistogram('LBN,partition:TErrorsPerLB', + Group.defineHistogram('LBN,partitionI;TErrorsPerLB', title='Nb of errors in T per LB - ' +cut+':Luminosity Block:Partition', type='TH2I', weight='numT', @@ -151,7 +151,7 @@ def LArRODMonConfigCore(helper, algoinstance,inputFlags, cellDebug=False, dspDeb ybins=lArDQGlobals.N_Partitions, ymin=-0.5, ymax=lArDQGlobals.N_Partitions-0.5, ylabels = lArDQGlobals.Partitions ) - Group.defineHistogram('LBN,partition:QErrorsPerLB', + Group.defineHistogram('LBN,partitionI;QErrorsPerLB', title='Nb of errors in Q per LB - ' +cut+':Luminosity Block:Partition', type='TH2I', weight='numQ', @@ -163,22 +163,21 @@ def LArRODMonConfigCore(helper, algoinstance,inputFlags, cellDebug=False, dspDeb #DQMD histos dqmd_hist_path='/LAr/DSPMonitoringNewAlg/DQMD/' - darray = helper.addArray([lArDQGlobals.Partitions+['all']],larRODMonAlg,"RODMon") + darray = helper.addArray([lArDQGlobals.Partitions],larRODMonAlg,"RODMon") darray.defineHistogram('Ediff,Erange;DE_ranges', title='EOnline - E_offline for all ranges : E_offline - E_online (MeV) : Energy range',#'E_online - E_offline for all ranges : E_offline - E_online (MeV) : Energy range', type='TH2F', path=dqmd_hist_path, xbins=lArDQGlobals.DSP1Energy_Bins, xmin=lArDQGlobals.DSP1Energy_Min, xmax=lArDQGlobals.DSP1Energy_Max, ybins=lArDQGlobals.DSPRanges_Bins, ymin=lArDQGlobals.DSPRanges_Min, ymax=lArDQGlobals.DSPRanges_Max, ylabels=lArDQGlobals.DSPRanges ) - dqmd_hist_path='/LAr/DSPMonitoringNewAlg/DQMD/' - darray = helper.addArray([lArDQGlobals.Partitions+['all']],larRODMonAlg,"RODMon") - darray.defineHistogram('Ediff,Erange;DE_ranges', title='E_online - E_offline for all ranges : E_offline - E_online (MeV) : Energy range', + Group.defineHistogram('Ediff,Erange;E_ranges_all', title='E_online - E_offline for all ranges : E_offline - E_online (MeV) : Energy range', type='TH2F', path=dqmd_hist_path, xbins=lArDQGlobals.DSP1Energy_Bins, xmin=lArDQGlobals.DSP1Energy_Min, xmax=lArDQGlobals.DSP1Energy_Max, ybins=lArDQGlobals.DSPRanges_Bins, ymin=lArDQGlobals.DSPRanges_Min, ymax=lArDQGlobals.DSPRanges_Max, ylabels=lArDQGlobals.DSPRanges ) + #per partition, currently in one dir only part_hist_path='/LAr/DSPMonitoringNewAlg/perPartition/' darray.defineHistogram('Ediff;DE', title='E_offline - E_online:E_offline - E_online', diff --git a/LArCalorimeter/LArMonitoring/src/LArRODMonAlg.cxx b/LArCalorimeter/LArMonitoring/src/LArRODMonAlg.cxx index 4eb8d69477fafbf1d90e47eadc95b5c38dd1d3a3..0d6634bb15ad700d3454e83f9fd0c408cda86d66 100755 --- a/LArCalorimeter/LArMonitoring/src/LArRODMonAlg.cxx +++ b/LArCalorimeter/LArMonitoring/src/LArRODMonAlg.cxx @@ -146,6 +146,7 @@ StatusCode LArRODMonAlg::fillHistograms(const EventContext& ctx) const { auto numT = Monitored::Scalar<int>("numT",1.); auto gain = Monitored::Scalar<int>("gain",-1); auto partition = Monitored::Scalar<int>("partition",-1); + auto partitionI = Monitored::Scalar<int>("partitionI",-1); auto lb = Monitored::Scalar<int>("LBN",0); auto sweetc = Monitored::Scalar<float>("Sweetc",1.); @@ -397,10 +398,10 @@ StatusCode LArRODMonAlg::fillHistograms(const EventContext& ctx) const { unsigned allErrsPartE=0; unsigned allErrsPartT=0; unsigned allErrsPartQ=0; + partition = p; for (unsigned g=0;g<3;++g) { gain = g; - partition = p; weight_e = (float)errcounters[p].errors_E[g]; weight_q = (float)errcounters[p].errors_Q[g]; weight_t = (float)errcounters[p].errors_T[g]; @@ -411,10 +412,11 @@ StatusCode LArRODMonAlg::fillHistograms(const EventContext& ctx) const { allErrsPartT+=errcounters[p].errors_T[g]; allErrsPartQ+=errcounters[p].errors_Q[g]; } + partitionI = p; numE = (float)allErrsPartE; numT = (float)allErrsPartT; numQ = (float)allErrsPartQ; - fill(m_MonGroupName, lb, partition, numE, numT, numQ); + fill(m_MonGroupName, lb, partitionI, numE, numT, numQ); } for(int str = 0; str < nStreams + 1; str++) { diff --git a/LArCalorimeter/LArROD/share/LArRawChannels.txt.ref b/LArCalorimeter/LArROD/share/LArRawChannels.txt.ref index 0b00016070ec1b48222dbb9746b217bbdacce1aa..ea23bc21d52755dd4c43f346b9538d3b805cd38f 100644 --- a/LArCalorimeter/LArROD/share/LArRawChannels.txt.ref +++ b/LArCalorimeter/LArROD/share/LArRawChannels.txt.ref @@ -4,7 +4,7 @@ Channel: BARREL/C-SIDE/FT-0/SLOT-5/CHAN-114 (is not EM) E= 151 t= 0 Q= 0 P=0xa5 Channel: BARREL/C-SIDE/FT-0/SLOT-5/CHAN-117 (is not EM) E= 93 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-0/SLOT-5/CHAN-118 (is not EM) E= 137 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-0/SLOT-9/CHAN-15 (is not EM) E= 103 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-0/SLOT-11/CHAN-24 (is not EM) E= 522 t= -17902 Q= 1321 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-0/SLOT-11/CHAN-24 (is not EM) E= 522 t= -17902 Q= 1321 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-0/SLOT-12/CHAN-59 (is not EM) E= 244 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-1/SLOT-2/CHAN-38 (is not EM) E= 99 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-1/SLOT-2/CHAN-39 (is not EM) E= 107 t= 0 Q= 0 P=0xa5 G=0 @@ -15,20 +15,20 @@ Channel: BARREL/C-SIDE/FT-1/SLOT-6/CHAN-99 (is not EM) E= 85 t= 0 Q= 0 P=0xa5 G= Channel: BARREL/C-SIDE/FT-1/SLOT-9/CHAN-79 (is not EM) E= 105 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-1/SLOT-10/CHAN-34 (is not EM) E= 228 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-1/SLOT-10/CHAN-35 (is not EM) E= 212 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-1/SLOT-11/CHAN-123 (is not EM) E= 364 t= 5366 Q= 24 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-1/SLOT-13/CHAN-10 (is not EM) E= 515 t= -31486 Q= 366 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-1/SLOT-13/CHAN-11 (is not EM) E= 1308 t= -22646 Q= 2409 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-1/SLOT-13/CHAN-15 (is not EM) E= 606 t= -21981 Q= 753 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-1/SLOT-13/CHAN-25 (is not EM) E= 430 t= -46259 Q= 1493 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-1/SLOT-11/CHAN-123 (is not EM) E= 364 t= 5366 Q= 24 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-1/SLOT-13/CHAN-10 (is not EM) E= 515 t= -31486 Q= 366 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-1/SLOT-13/CHAN-11 (is not EM) E= 1308 t= -22646 Q= 2409 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-1/SLOT-13/CHAN-15 (is not EM) E= 606 t= -21981 Q= 753 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-1/SLOT-13/CHAN-25 (is not EM) E= 430 t= -46259 Q= 1493 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-2/SLOT-3/CHAN-33 (is not EM) E= 163 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-2/SLOT-3/CHAN-36 (is not EM) E= 91 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-2/SLOT-9/CHAN-28 (is not EM) E= 139 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-2/SLOT-9/CHAN-75 (is not EM) E= 111 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-2/SLOT-11/CHAN-33 (is not EM) E= 259 t= -6477 Q= 41 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-3/SLOT-1/CHAN-5 (is not EM) E= 444 t= 5730 Q= 215 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-2/SLOT-11/CHAN-33 (is not EM) E= 259 t= -6477 Q= 41 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-3/SLOT-1/CHAN-5 (is not EM) E= 444 t= 5730 Q= 215 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-3/SLOT-9/CHAN-13 (is not EM) E= 89 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-3/SLOT-9/CHAN-71 (is not EM) E= 88 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-3/SLOT-11/CHAN-38 (is not EM) E= 296 t= -5728 Q= 64 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-3/SLOT-11/CHAN-38 (is not EM) E= 296 t= -5728 Q= 64 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-4/SLOT-2/CHAN-11 (is not EM) E= 99 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-4/SLOT-2/CHAN-72 (is not EM) E= 111 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-4/SLOT-3/CHAN-97 (is not EM) E= 91 t= 0 Q= 0 P=0xa5 G=0 @@ -37,22 +37,22 @@ Channel: BARREL/C-SIDE/FT-4/SLOT-4/CHAN-126 (is not EM) E= 88 t= 0 Q= 0 P=0xa5 G Channel: BARREL/C-SIDE/FT-4/SLOT-9/CHAN-72 (is not EM) E= -160 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-4/SLOT-9/CHAN-124 (is not EM) E= 139 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-4/SLOT-10/CHAN-4 (is not EM) E= -124 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-4/SLOT-11/CHAN-16 (is not EM) E= 265 t= -20026 Q= 1664 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-4/SLOT-12/CHAN-81 (is not EM) E= -307 t= 6297 Q= 118 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-4/SLOT-12/CHAN-105 (is not EM) E= 387 t= 20718 Q= 714 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-4/SLOT-14/CHAN-57 (is not EM) E= 418 t= 3908 Q= 12 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-4/SLOT-11/CHAN-16 (is not EM) E= 265 t= -20026 Q= 1664 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-4/SLOT-12/CHAN-81 (is not EM) E= -307 t= 6297 Q= 118 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-4/SLOT-12/CHAN-105 (is not EM) E= 387 t= 20718 Q= 714 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-4/SLOT-14/CHAN-57 (is not EM) E= 418 t= 3908 Q= 12 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-5/SLOT-3/CHAN-69 (is not EM) E= 107 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-5/SLOT-7/CHAN-45 (is not EM) E= 85 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-5/SLOT-8/CHAN-41 (is not EM) E= 84 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-5/SLOT-8/CHAN-63 (is not EM) E= -84 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-5/SLOT-10/CHAN-6 (is not EM) E= 116 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-5/SLOT-11/CHAN-12 (is not EM) E= 396 t= -11572 Q= 208 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-5/SLOT-11/CHAN-12 (is not EM) E= 396 t= -11572 Q= 208 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-5/SLOT-11/CHAN-38 (is not EM) E= 221 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-5/SLOT-11/CHAN-39 (is not EM) E= 249 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-5/SLOT-13/CHAN-11 (is not EM) E= 322 t= -14591 Q= 90 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-5/SLOT-13/CHAN-14 (is not EM) E= 421 t= -27997 Q= 211 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-5/SLOT-13/CHAN-15 (is not EM) E= 363 t= -18272 Q= 162 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-5/SLOT-14/CHAN-27 (is not EM) E= 332 t= 6853 Q= 36 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-5/SLOT-13/CHAN-11 (is not EM) E= 322 t= -14591 Q= 90 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-5/SLOT-13/CHAN-14 (is not EM) E= 421 t= -27997 Q= 211 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-5/SLOT-13/CHAN-15 (is not EM) E= 363 t= -18272 Q= 162 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-5/SLOT-14/CHAN-27 (is not EM) E= 332 t= 6853 Q= 36 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-6/SLOT-3/CHAN-107 (is not EM) E= 95 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-6/SLOT-3/CHAN-108 (is not EM) E= 116 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-6/SLOT-6/CHAN-51 (is not EM) E= 145 t= 0 Q= 0 P=0xa5 G=0 @@ -61,19 +61,19 @@ Channel: BARREL/C-SIDE/FT-6/SLOT-6/CHAN-88 (is not EM) E= 82 t= 0 Q= 0 P=0xa5 G= Channel: BARREL/C-SIDE/FT-7/SLOT-2/CHAN-70 (is not EM) E= 83 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-7/SLOT-4/CHAN-45 (is not EM) E= 140 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-7/SLOT-4/CHAN-63 (is not EM) E= 115 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-7/SLOT-5/CHAN-0 (is not EM) E= 390 t= -16580 Q= 15542 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-7/SLOT-5/CHAN-0 (is not EM) E= 390 t= -16580 Q= 15542 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-7/SLOT-6/CHAN-66 (is not EM) E= 76 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-7/SLOT-9/CHAN-4 (is not EM) E= -85 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-7/SLOT-9/CHAN-44 (is not EM) E= 112 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-7/SLOT-9/CHAN-45 (is not EM) E= 169 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-7/SLOT-9/CHAN-127 (is not EM) E= 198 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-7/SLOT-11/CHAN-123 (is not EM) E= 233 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-7/SLOT-12/CHAN-34 (is not EM) E= 329 t= -21170 Q= 603 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-8/SLOT-1/CHAN-21 (is not EM) E= 399 t= 1922 Q= 89 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-7/SLOT-12/CHAN-34 (is not EM) E= 329 t= -21170 Q= 603 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-8/SLOT-1/CHAN-21 (is not EM) E= 399 t= 1922 Q= 89 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-8/SLOT-3/CHAN-76 (is not EM) E= 174 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-8/SLOT-4/CHAN-83 (is not EM) E= -85 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-8/SLOT-14/CHAN-36 (is not EM) E= 504 t= -6294 Q= 9 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-9/SLOT-1/CHAN-35 (is not EM) E= 434 t= -7263 Q= 275 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-8/SLOT-14/CHAN-36 (is not EM) E= 504 t= -6294 Q= 9 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-9/SLOT-1/CHAN-35 (is not EM) E= 434 t= -7263 Q= 275 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-9/SLOT-2/CHAN-100 (is not EM) E= -121 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-9/SLOT-2/CHAN-114 (is not EM) E= 113 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-9/SLOT-6/CHAN-113 (is not EM) E= 97 t= 0 Q= 0 P=0xa5 G=0 @@ -81,16 +81,16 @@ Channel: BARREL/C-SIDE/FT-9/SLOT-6/CHAN-118 (is not EM) E= 80 t= 0 Q= 0 P=0xa5 G Channel: BARREL/C-SIDE/FT-9/SLOT-7/CHAN-15 (is not EM) E= 115 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-9/SLOT-8/CHAN-6 (is not EM) E= 80 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-9/SLOT-8/CHAN-66 (is not EM) E= -82 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-9/SLOT-10/CHAN-31 (is not EM) E= 275 t= 17972 Q= 116 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-9/SLOT-10/CHAN-31 (is not EM) E= 275 t= 17972 Q= 116 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-9/SLOT-10/CHAN-83 (is not EM) E= 155 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-10/SLOT-1/CHAN-84 (is not EM) E= 537 t= 509 Q= 64 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-10/SLOT-1/CHAN-93 (is not EM) E= 707 t= 3386 Q= 108 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-10/SLOT-1/CHAN-84 (is not EM) E= 537 t= 509 Q= 64 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-10/SLOT-1/CHAN-93 (is not EM) E= 707 t= 3386 Q= 108 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-10/SLOT-3/CHAN-50 (is not EM) E= -88 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-10/SLOT-6/CHAN-11 (is not EM) E= 69 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-10/SLOT-9/CHAN-64 (is not EM) E= 131 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-10/SLOT-9/CHAN-65 (is not EM) E= 124 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-10/SLOT-13/CHAN-26 (is not EM) E= 298 t= 47655 Q= 75 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-10/SLOT-13/CHAN-49 (is not EM) E= -288 t= -5880 Q= 61 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-10/SLOT-13/CHAN-26 (is not EM) E= 298 t= 47655 Q= 75 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-10/SLOT-13/CHAN-49 (is not EM) E= -288 t= -5880 Q= 61 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-11/SLOT-2/CHAN-13 (is not EM) E= 92 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-11/SLOT-2/CHAN-87 (is not EM) E= 218 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-11/SLOT-3/CHAN-108 (is not EM) E= 132 t= 0 Q= 0 P=0xa5 G=0 @@ -99,18 +99,18 @@ Channel: BARREL/C-SIDE/FT-11/SLOT-7/CHAN-110 (is not EM) E= 77 t= 0 Q= 0 P=0xa5 Channel: BARREL/C-SIDE/FT-11/SLOT-9/CHAN-118 (is not EM) E= 138 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-11/SLOT-10/CHAN-94 (is not EM) E= 243 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-11/SLOT-11/CHAN-78 (is not EM) E= 237 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-11/SLOT-14/CHAN-42 (is not EM) E= 520 t= 34192 Q= 304 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-11/SLOT-14/CHAN-42 (is not EM) E= 520 t= 34192 Q= 304 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-12/SLOT-5/CHAN-122 (is not EM) E= 140 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-12/SLOT-9/CHAN-102 (is not EM) E= -95 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-12/SLOT-10/CHAN-78 (is not EM) E= 125 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-12/SLOT-13/CHAN-66 (is not EM) E= -275 t= 5880 Q= 89 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-13/SLOT-1/CHAN-114 (is not EM) E= 1172 t= 4476 Q= 50 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-12/SLOT-13/CHAN-66 (is not EM) E= -275 t= 5880 Q= 89 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-13/SLOT-1/CHAN-114 (is not EM) E= 1172 t= 4476 Q= 50 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-13/SLOT-5/CHAN-1 (is not EM) E= 131 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-13/SLOT-9/CHAN-69 (is not EM) E= 81 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-13/SLOT-11/CHAN-4 (is not EM) E= -221 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-13/SLOT-12/CHAN-32 (is not EM) E= 303 t= 11505 Q= 70 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-13/SLOT-12/CHAN-112 (is not EM) E= -327 t= 996 Q= 705 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-14/SLOT-1/CHAN-53 (is not EM) E= 609 t= -21463 Q= 1245 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-13/SLOT-12/CHAN-32 (is not EM) E= 303 t= 11505 Q= 70 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-13/SLOT-12/CHAN-112 (is not EM) E= -327 t= 996 Q= 705 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-14/SLOT-1/CHAN-53 (is not EM) E= 609 t= -21463 Q= 1245 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-14/SLOT-2/CHAN-94 (is not EM) E= 100 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-14/SLOT-4/CHAN-82 (is not EM) E= 98 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-14/SLOT-5/CHAN-15 (is not EM) E= 116 t= 0 Q= 0 P=0xa5 G=0 @@ -125,9 +125,9 @@ Channel: BARREL/C-SIDE/FT-15/SLOT-10/CHAN-15 (is not EM) E= 124 t= 0 Q= 0 P=0xa5 Channel: BARREL/C-SIDE/FT-16/SLOT-4/CHAN-9 (is not EM) E= 91 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-16/SLOT-5/CHAN-114 (is not EM) E= -100 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-16/SLOT-6/CHAN-120 (is not EM) E= 71 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-16/SLOT-12/CHAN-5 (is not EM) E= 342 t= -2730 Q= 749 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-16/SLOT-12/CHAN-39 (is not EM) E= 315 t= -18556 Q= 547 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-16/SLOT-12/CHAN-91 (is not EM) E= 587 t= -18339 Q= 1808 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-16/SLOT-12/CHAN-5 (is not EM) E= 342 t= -2730 Q= 749 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-16/SLOT-12/CHAN-39 (is not EM) E= 315 t= -18556 Q= 547 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-16/SLOT-12/CHAN-91 (is not EM) E= 587 t= -18339 Q= 1808 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-17/SLOT-2/CHAN-47 (is not EM) E= 99 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-17/SLOT-3/CHAN-72 (is not EM) E= 160 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-17/SLOT-3/CHAN-73 (is not EM) E= 155 t= 0 Q= 0 P=0xa5 G=0 @@ -139,23 +139,23 @@ Channel: BARREL/C-SIDE/FT-17/SLOT-7/CHAN-82 (is not EM) E= 137 t= 0 Q= 0 P=0xa5 Channel: BARREL/C-SIDE/FT-17/SLOT-9/CHAN-42 (is not EM) E= -106 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-17/SLOT-9/CHAN-126 (is not EM) E= 159 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-17/SLOT-10/CHAN-72 (is not EM) E= 122 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-17/SLOT-11/CHAN-57 (is not EM) E= 263 t= 2260 Q= 49 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-17/SLOT-12/CHAN-7 (is not EM) E= -317 t= -15530 Q= 431 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-17/SLOT-12/CHAN-102 (is not EM) E= 403 t= -14581 Q= 442 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-18/SLOT-1/CHAN-84 (is not EM) E= 968 t= -324 Q= 274 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-18/SLOT-1/CHAN-85 (is not EM) E= 894 t= -2351 Q= 406 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-17/SLOT-11/CHAN-57 (is not EM) E= 263 t= 2260 Q= 49 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-17/SLOT-12/CHAN-7 (is not EM) E= -317 t= -15530 Q= 431 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-17/SLOT-12/CHAN-102 (is not EM) E= 403 t= -14581 Q= 442 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-18/SLOT-1/CHAN-84 (is not EM) E= 968 t= -324 Q= 274 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-18/SLOT-1/CHAN-85 (is not EM) E= 894 t= -2351 Q= 406 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-18/SLOT-2/CHAN-54 (is not EM) E= -88 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-18/SLOT-8/CHAN-94 (is not EM) E= 83 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-18/SLOT-10/CHAN-18 (is not EM) E= 410 t= 423 Q= 82 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-18/SLOT-10/CHAN-18 (is not EM) E= 410 t= 423 Q= 82 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-18/SLOT-10/CHAN-19 (is not EM) E= 135 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-18/SLOT-10/CHAN-32 (is not EM) E= 266 t= -23516 Q= 499 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-18/SLOT-10/CHAN-33 (is not EM) E= 284 t= -29505 Q= 85 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-18/SLOT-10/CHAN-32 (is not EM) E= 266 t= -23516 Q= 499 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-18/SLOT-10/CHAN-33 (is not EM) E= 284 t= -29505 Q= 85 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-18/SLOT-10/CHAN-106 (is not EM) E= 90 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-18/SLOT-11/CHAN-15 (is not EM) E= 216 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-18/SLOT-11/CHAN-54 (is not EM) E= 236 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-18/SLOT-11/CHAN-58 (is not EM) E= 315 t= 15445 Q= 159 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-19/SLOT-1/CHAN-67 (is not EM) E= 558 t= -673 Q= 258 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-19/SLOT-1/CHAN-94 (is not EM) E= 617 t= 1773 Q= 33 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-18/SLOT-11/CHAN-58 (is not EM) E= 315 t= 15445 Q= 159 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-19/SLOT-1/CHAN-67 (is not EM) E= 558 t= -673 Q= 258 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-19/SLOT-1/CHAN-94 (is not EM) E= 617 t= 1773 Q= 33 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-19/SLOT-2/CHAN-101 (is not EM) E= 110 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-19/SLOT-3/CHAN-0 (is not EM) E= 106 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-19/SLOT-4/CHAN-122 (is not EM) E= 87 t= 0 Q= 0 P=0xa5 G=0 @@ -167,29 +167,29 @@ Channel: BARREL/C-SIDE/FT-20/SLOT-4/CHAN-58 (is not EM) E= 203 t= 0 Q= 0 P=0xa5 Channel: BARREL/C-SIDE/FT-20/SLOT-6/CHAN-55 (is not EM) E= -81 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-20/SLOT-9/CHAN-124 (is not EM) E= 216 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-20/SLOT-9/CHAN-125 (is not EM) E= 172 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-20/SLOT-12/CHAN-126 (is not EM) E= 344 t= -9170 Q= 213 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-20/SLOT-13/CHAN-47 (is not EM) E= 408 t= 8198 Q= 3 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-20/SLOT-12/CHAN-126 (is not EM) E= 344 t= -9170 Q= 213 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-20/SLOT-13/CHAN-47 (is not EM) E= 408 t= 8198 Q= 3 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-21/SLOT-9/CHAN-33 (is not EM) E= 112 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-21/SLOT-9/CHAN-40 (is not EM) E= 115 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-21/SLOT-12/CHAN-10 (is not EM) E= 324 t= -20620 Q= 285 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-21/SLOT-13/CHAN-11 (is not EM) E= 495 t= -8728 Q= 26 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-21/SLOT-13/CHAN-72 (is not EM) E= 353 t= -20654 Q= 82 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-22/SLOT-1/CHAN-109 (is not EM) E= 738 t= 5437 Q= 177 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-21/SLOT-12/CHAN-10 (is not EM) E= 324 t= -20620 Q= 285 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-21/SLOT-13/CHAN-11 (is not EM) E= 495 t= -8728 Q= 26 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-21/SLOT-13/CHAN-72 (is not EM) E= 353 t= -20654 Q= 82 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-22/SLOT-1/CHAN-109 (is not EM) E= 738 t= 5437 Q= 177 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-22/SLOT-12/CHAN-108 (is not EM) E= 238 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-23/SLOT-3/CHAN-34 (is not EM) E= 106 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-23/SLOT-4/CHAN-112 (is not EM) E= 239 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-23/SLOT-4/CHAN-113 (is not EM) E= 174 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-23/SLOT-8/CHAN-30 (is not EM) E= 109 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-23/SLOT-9/CHAN-85 (is not EM) E= 149 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-23/SLOT-12/CHAN-86 (is not EM) E= 292 t= 11662 Q= 121 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-23/SLOT-12/CHAN-90 (is not EM) E= 361 t= 18191 Q= 62 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-23/SLOT-12/CHAN-91 (is not EM) E= 441 t= 2798 Q= 160 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-23/SLOT-13/CHAN-1 (is not EM) E= -316 t= 18430 Q= 134 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-23/SLOT-12/CHAN-86 (is not EM) E= 292 t= 11662 Q= 121 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-23/SLOT-12/CHAN-90 (is not EM) E= 361 t= 18191 Q= 62 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-23/SLOT-12/CHAN-91 (is not EM) E= 441 t= 2798 Q= 160 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-23/SLOT-13/CHAN-1 (is not EM) E= -316 t= 18430 Q= 134 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-24/SLOT-3/CHAN-72 (is not EM) E= 113 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-24/SLOT-3/CHAN-73 (is not EM) E= 174 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-24/SLOT-3/CHAN-74 (is not EM) E= 134 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-24/SLOT-9/CHAN-61 (is not EM) E= 140 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-24/SLOT-9/CHAN-124 (is not EM) E= 285 t= -4161 Q= 23 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-24/SLOT-9/CHAN-124 (is not EM) E= 285 t= -4161 Q= 23 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-24/SLOT-10/CHAN-13 (is not EM) E= 218 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-24/SLOT-10/CHAN-14 (is not EM) E= 244 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-24/SLOT-10/CHAN-49 (is not EM) E= 177 t= 0 Q= 0 P=0xa5 G=0 @@ -197,7 +197,7 @@ Channel: BARREL/C-SIDE/FT-24/SLOT-10/CHAN-50 (is not EM) E= 163 t= 0 Q= 0 P=0xa5 Channel: BARREL/C-SIDE/FT-24/SLOT-11/CHAN-101 (is not EM) E= 214 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-24/SLOT-11/CHAN-122 (is not EM) E= 248 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-24/SLOT-12/CHAN-20 (is not EM) E= 231 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-24/SLOT-12/CHAN-24 (is not EM) E= 707 t= 2948 Q= 108 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-24/SLOT-12/CHAN-24 (is not EM) E= 707 t= 2948 Q= 108 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-25/SLOT-2/CHAN-118 (is not EM) E= 115 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-25/SLOT-2/CHAN-119 (is not EM) E= 108 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-25/SLOT-4/CHAN-70 (is not EM) E= 161 t= 0 Q= 0 P=0xa5 G=0 @@ -205,19 +205,19 @@ Channel: BARREL/C-SIDE/FT-25/SLOT-5/CHAN-49 (is not EM) E= 111 t= 0 Q= 0 P=0xa5 Channel: BARREL/C-SIDE/FT-25/SLOT-6/CHAN-54 (is not EM) E= 80 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-25/SLOT-9/CHAN-51 (is not EM) E= 112 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-25/SLOT-9/CHAN-121 (is not EM) E= -148 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-25/SLOT-12/CHAN-57 (is not EM) E= 443 t= 17484 Q= 882 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-25/SLOT-13/CHAN-105 (is not EM) E= 347 t= 2597 Q= 12 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-25/SLOT-12/CHAN-57 (is not EM) E= 443 t= 17484 Q= 882 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-25/SLOT-13/CHAN-105 (is not EM) E= 347 t= 2597 Q= 12 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-26/SLOT-2/CHAN-14 (is not EM) E= 207 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-26/SLOT-3/CHAN-55 (is not EM) E= 92 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-26/SLOT-3/CHAN-76 (is not EM) E= 101 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-26/SLOT-3/CHAN-77 (is not EM) E= 132 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-26/SLOT-12/CHAN-32 (is not EM) E= 358 t= 2091 Q= 2 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-27/SLOT-1/CHAN-5 (is not EM) E= 359 t= 4985 Q= 4167 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-26/SLOT-12/CHAN-32 (is not EM) E= 358 t= 2091 Q= 2 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-27/SLOT-1/CHAN-5 (is not EM) E= 359 t= 4985 Q= 4167 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-27/SLOT-2/CHAN-56 (is not EM) E= 106 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-27/SLOT-2/CHAN-119 (is not EM) E= 103 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-27/SLOT-4/CHAN-60 (is not EM) E= 90 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-27/SLOT-6/CHAN-103 (is not EM) E= 107 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-27/SLOT-6/CHAN-104 (is not EM) E= 268 t= 3036 Q= 21 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-27/SLOT-6/CHAN-104 (is not EM) E= 268 t= 3036 Q= 21 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-27/SLOT-6/CHAN-105 (is not EM) E= 127 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-27/SLOT-6/CHAN-106 (is not EM) E= 121 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-27/SLOT-8/CHAN-123 (is not EM) E= 118 t= 0 Q= 0 P=0xa5 G=0 @@ -226,35 +226,35 @@ Channel: BARREL/C-SIDE/FT-27/SLOT-9/CHAN-24 (is not EM) E= -83 t= 0 Q= 0 P=0xa5 Channel: BARREL/C-SIDE/FT-27/SLOT-10/CHAN-6 (is not EM) E= -119 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-27/SLOT-10/CHAN-14 (is not EM) E= -111 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-27/SLOT-10/CHAN-25 (is not EM) E= 169 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-27/SLOT-11/CHAN-30 (is not EM) E= 329 t= -3360 Q= 78 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-27/SLOT-11/CHAN-31 (is not EM) E= 357 t= 2166 Q= 35 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-27/SLOT-11/CHAN-75 (is not EM) E= -294 t= 9977 Q= 1542 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-27/SLOT-12/CHAN-89 (is not EM) E= 374 t= 8433 Q= 35 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-27/SLOT-13/CHAN-82 (is not EM) E= 337 t= 443 Q= 2 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-27/SLOT-13/CHAN-86 (is not EM) E= 689 t= 5202 Q= 3 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-27/SLOT-13/CHAN-87 (is not EM) E= 310 t= 1665 Q= 42 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-27/SLOT-11/CHAN-30 (is not EM) E= 329 t= -3360 Q= 78 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-27/SLOT-11/CHAN-31 (is not EM) E= 357 t= 2166 Q= 35 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-27/SLOT-11/CHAN-75 (is not EM) E= -294 t= 9977 Q= 1542 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-27/SLOT-12/CHAN-89 (is not EM) E= 374 t= 8433 Q= 35 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-27/SLOT-13/CHAN-82 (is not EM) E= 337 t= 443 Q= 2 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-27/SLOT-13/CHAN-86 (is not EM) E= 689 t= 5202 Q= 3 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-27/SLOT-13/CHAN-87 (is not EM) E= 310 t= 1665 Q= 42 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-28/SLOT-4/CHAN-68 (is not EM) E= 97 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-28/SLOT-4/CHAN-69 (is not EM) E= 118 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-28/SLOT-5/CHAN-74 (is not EM) E= 264 t= 17110 Q= 7370 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-28/SLOT-5/CHAN-74 (is not EM) E= 264 t= 17110 Q= 7370 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-28/SLOT-5/CHAN-75 (is not EM) E= 235 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-28/SLOT-5/CHAN-76 (is not EM) E= 105 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-28/SLOT-7/CHAN-36 (is not EM) E= -77 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-28/SLOT-9/CHAN-62 (is not EM) E= -172 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-28/SLOT-12/CHAN-102 (is not EM) E= 295 t= 28216 Q= 623 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-28/SLOT-12/CHAN-102 (is not EM) E= 295 t= 28216 Q= 623 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-29/SLOT-8/CHAN-41 (is not EM) E= 85 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-29/SLOT-8/CHAN-45 (is not EM) E= 77 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-29/SLOT-8/CHAN-46 (is not EM) E= 104 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-29/SLOT-11/CHAN-99 (is not EM) E= 260 t= 3167 Q= 77 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-29/SLOT-11/CHAN-102 (is not EM) E= 267 t= 7742 Q= 69 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-29/SLOT-12/CHAN-25 (is not EM) E= 266 t= -13666 Q= 486 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-30/SLOT-1/CHAN-20 (is not EM) E= 336 t= -12526 Q= 108 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-29/SLOT-11/CHAN-99 (is not EM) E= 260 t= 3167 Q= 77 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-29/SLOT-11/CHAN-102 (is not EM) E= 267 t= 7742 Q= 69 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-29/SLOT-12/CHAN-25 (is not EM) E= 266 t= -13666 Q= 486 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-30/SLOT-1/CHAN-20 (is not EM) E= 336 t= -12526 Q= 108 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-30/SLOT-2/CHAN-113 (is not EM) E= 223 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-30/SLOT-4/CHAN-45 (is not EM) E= 104 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-30/SLOT-7/CHAN-25 (is not EM) E= 97 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-30/SLOT-7/CHAN-78 (is not EM) E= 78 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-30/SLOT-11/CHAN-66 (is not EM) E= 235 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-30/SLOT-13/CHAN-40 (is not EM) E= -287 t= -9316 Q= 275 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-30/SLOT-13/CHAN-46 (is not EM) E= 297 t= 10209 Q= 6 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-30/SLOT-13/CHAN-40 (is not EM) E= -287 t= -9316 Q= 275 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-30/SLOT-13/CHAN-46 (is not EM) E= 297 t= 10209 Q= 6 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-31/SLOT-2/CHAN-112 (is not EM) E= 87 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-31/SLOT-2/CHAN-124 (is not EM) E= 112 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-31/SLOT-3/CHAN-50 (is not EM) E= 124 t= 0 Q= 0 P=0xa5 G=0 @@ -264,10 +264,10 @@ Channel: BARREL/C-SIDE/FT-31/SLOT-6/CHAN-78 (is not EM) E= 70 t= 0 Q= 0 P=0xa5 G Channel: BARREL/C-SIDE/FT-31/SLOT-7/CHAN-49 (is not EM) E= 88 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-31/SLOT-9/CHAN-124 (is not EM) E= 174 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-31/SLOT-11/CHAN-57 (is not EM) E= 241 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-31/SLOT-12/CHAN-55 (is not EM) E= 368 t= 27584 Q= 674 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-31/SLOT-12/CHAN-55 (is not EM) E= 368 t= 27584 Q= 674 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-31/SLOT-12/CHAN-59 (is not EM) E= 252 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-31/SLOT-12/CHAN-116 (is not EM) E= 350 t= 26074 Q= 688 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-31/SLOT-13/CHAN-59 (is not EM) E= 397 t= -3896 Q= 76 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-31/SLOT-12/CHAN-116 (is not EM) E= 350 t= 26074 Q= 688 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-31/SLOT-13/CHAN-59 (is not EM) E= 397 t= -3896 Q= 76 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-0/SLOT-2/CHAN-21 (is not EM) E= 94 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-0/SLOT-2/CHAN-37 (is not EM) E= 81 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-0/SLOT-2/CHAN-89 (is not EM) E= 81 t= 0 Q= 0 P=0xa5 G=0 @@ -275,32 +275,32 @@ Channel: BARREL/A-SIDE/FT-0/SLOT-3/CHAN-68 (is not EM) E= 89 t= 0 Q= 0 P=0xa5 G= Channel: BARREL/A-SIDE/FT-0/SLOT-6/CHAN-55 (is not EM) E= 70 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-0/SLOT-6/CHAN-60 (is not EM) E= 127 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-0/SLOT-6/CHAN-61 (is not EM) E= 73 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-0/SLOT-12/CHAN-29 (is not EM) E= -366 t= -4078 Q= 1048 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-0/SLOT-12/CHAN-29 (is not EM) E= -366 t= -4078 Q= 1048 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-1/SLOT-3/CHAN-43 (is not EM) E= 86 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-1/SLOT-3/CHAN-64 (is not EM) E= 89 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-1/SLOT-5/CHAN-64 (is not EM) E= 109 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-1/SLOT-6/CHAN-3 (is not EM) E= 66 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-1/SLOT-8/CHAN-14 (is not EM) E= 111 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-1/SLOT-9/CHAN-47 (is not EM) E= 134 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-1/SLOT-11/CHAN-3 (is not EM) E= 288 t= -17964 Q= 418 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-1/SLOT-11/CHAN-5 (is not EM) E= 315 t= 15793 Q= 535 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-1/SLOT-11/CHAN-34 (is not EM) E= 279 t= 23510 Q= 229 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-1/SLOT-11/CHAN-36 (is not EM) E= 345 t= 25146 Q= 593 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-1/SLOT-11/CHAN-3 (is not EM) E= 288 t= -17964 Q= 418 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-1/SLOT-11/CHAN-5 (is not EM) E= 315 t= 15793 Q= 535 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-1/SLOT-11/CHAN-34 (is not EM) E= 279 t= 23510 Q= 229 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-1/SLOT-11/CHAN-36 (is not EM) E= 345 t= 25146 Q= 593 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-1/SLOT-11/CHAN-48 (is not EM) E= 242 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-1/SLOT-12/CHAN-65 (is not EM) E= 271 t= -20530 Q= 222 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-1/SLOT-14/CHAN-37 (is not EM) E= 570 t= -20481 Q= 119 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-1/SLOT-12/CHAN-65 (is not EM) E= 271 t= -20530 Q= 222 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-1/SLOT-14/CHAN-37 (is not EM) E= 570 t= -20481 Q= 119 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-2/SLOT-8/CHAN-110 (is not EM) E= 117 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-2/SLOT-8/CHAN-111 (is not EM) E= 139 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-2/SLOT-14/CHAN-53 (is not EM) E= 463 t= 5309 Q= 0 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-2/SLOT-14/CHAN-53 (is not EM) E= 463 t= 5309 Q= 0 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-3/SLOT-2/CHAN-21 (is not EM) E= 101 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-3/SLOT-3/CHAN-106 (is not EM) E= 97 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-3/SLOT-4/CHAN-48 (is not EM) E= 89 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-3/SLOT-4/CHAN-49 (is not EM) E= 129 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-3/SLOT-4/CHAN-70 (is not EM) E= 87 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-3/SLOT-6/CHAN-74 (is not EM) E= 80 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-3/SLOT-11/CHAN-84 (is not EM) E= 301 t= -16180 Q= 817 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-3/SLOT-12/CHAN-49 (is not EM) E= 353 t= 791 Q= 0 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-3/SLOT-13/CHAN-7 (is not EM) E= 322 t= 1814 Q= 69 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-3/SLOT-11/CHAN-84 (is not EM) E= 301 t= -16180 Q= 817 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-3/SLOT-12/CHAN-49 (is not EM) E= 353 t= 791 Q= 0 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-3/SLOT-13/CHAN-7 (is not EM) E= 322 t= 1814 Q= 69 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-4/SLOT-3/CHAN-55 (is not EM) E= 120 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-4/SLOT-3/CHAN-56 (is not EM) E= 157 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-4/SLOT-3/CHAN-65 (is not EM) E= 190 t= 0 Q= 0 P=0xa5 G=0 @@ -308,9 +308,9 @@ Channel: BARREL/A-SIDE/FT-4/SLOT-6/CHAN-1 (is not EM) E= 63 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-4/SLOT-7/CHAN-78 (is not EM) E= 113 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-4/SLOT-7/CHAN-79 (is not EM) E= 84 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-4/SLOT-8/CHAN-78 (is not EM) E= 85 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-4/SLOT-10/CHAN-35 (is not EM) E= 348 t= -21994 Q= 172 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-4/SLOT-10/CHAN-96 (is not EM) E= 307 t= -12852 Q= 585 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-5/SLOT-1/CHAN-51 (is not EM) E= 458 t= -6374 Q= 21 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-4/SLOT-10/CHAN-35 (is not EM) E= 348 t= -21994 Q= 172 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-4/SLOT-10/CHAN-96 (is not EM) E= 307 t= -12852 Q= 585 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-5/SLOT-1/CHAN-51 (is not EM) E= 458 t= -6374 Q= 21 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-5/SLOT-3/CHAN-125 (is not EM) E= 87 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-5/SLOT-3/CHAN-126 (is not EM) E= 218 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-5/SLOT-3/CHAN-127 (is not EM) E= 114 t= 0 Q= 0 P=0xa5 G=0 @@ -319,40 +319,40 @@ Channel: BARREL/A-SIDE/FT-5/SLOT-6/CHAN-33 (is not EM) E= 96 t= 0 Q= 0 P=0xa5 G= Channel: BARREL/A-SIDE/FT-5/SLOT-7/CHAN-51 (is not EM) E= 208 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-5/SLOT-7/CHAN-52 (is not EM) E= 154 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-5/SLOT-8/CHAN-90 (is not EM) E= 113 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-5/SLOT-11/CHAN-126 (is not EM) E= 337 t= 17882 Q= 130 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-5/SLOT-13/CHAN-17 (is not EM) E= 405 t= -567 Q= 20 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-5/SLOT-14/CHAN-58 (is not EM) E= 327 t= -23716 Q= 97 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-5/SLOT-14/CHAN-61 (is not EM) E= 352 t= -23186 Q= 415 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-6/SLOT-1/CHAN-115 (is not EM) E= 828 t= 4975 Q= 159 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-5/SLOT-11/CHAN-126 (is not EM) E= 337 t= 17882 Q= 130 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-5/SLOT-13/CHAN-17 (is not EM) E= 405 t= -567 Q= 20 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-5/SLOT-14/CHAN-58 (is not EM) E= 327 t= -23716 Q= 97 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-5/SLOT-14/CHAN-61 (is not EM) E= 352 t= -23186 Q= 415 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-6/SLOT-1/CHAN-115 (is not EM) E= 828 t= 4975 Q= 159 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-6/SLOT-2/CHAN-54 (is not EM) E= 170 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-6/SLOT-4/CHAN-88 (is not EM) E= 95 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-6/SLOT-4/CHAN-89 (is not EM) E= 124 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-6/SLOT-11/CHAN-96 (is not EM) E= 224 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-6/SLOT-13/CHAN-94 (is not EM) E= -281 t= -11923 Q= 269 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-6/SLOT-13/CHAN-94 (is not EM) E= -281 t= -11923 Q= 269 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-7/SLOT-2/CHAN-11 (is not EM) E= 184 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-7/SLOT-4/CHAN-113 (is not EM) E= 136 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-7/SLOT-4/CHAN-114 (is not EM) E= 109 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-7/SLOT-12/CHAN-58 (is not EM) E= 264 t= 4469 Q= 70 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-7/SLOT-14/CHAN-52 (is not EM) E= 330 t= 30070 Q= 8 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-8/SLOT-1/CHAN-44 (is not EM) E= 458 t= 8067 Q= 520 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-7/SLOT-12/CHAN-58 (is not EM) E= 264 t= 4469 Q= 70 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-7/SLOT-14/CHAN-52 (is not EM) E= 330 t= 30070 Q= 8 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-8/SLOT-1/CHAN-44 (is not EM) E= 458 t= 8067 Q= 520 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-8/SLOT-4/CHAN-94 (is not EM) E= 151 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-8/SLOT-4/CHAN-95 (is not EM) E= 237 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-8/SLOT-6/CHAN-27 (is not EM) E= 109 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-8/SLOT-6/CHAN-28 (is not EM) E= 152 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-8/SLOT-6/CHAN-29 (is not EM) E= 106 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-8/SLOT-8/CHAN-77 (is not EM) E= -83 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-8/SLOT-10/CHAN-52 (is not EM) E= 274 t= -3165 Q= 28 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-8/SLOT-10/CHAN-74 (is not EM) E= 387 t= -15234 Q= 1078 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-8/SLOT-10/CHAN-52 (is not EM) E= 274 t= -3165 Q= 28 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-8/SLOT-10/CHAN-74 (is not EM) E= 387 t= -15234 Q= 1078 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-8/SLOT-10/CHAN-75 (is not EM) E= 211 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-8/SLOT-10/CHAN-79 (is not EM) E= 302 t= -13858 Q= 515 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-8/SLOT-10/CHAN-79 (is not EM) E= 302 t= -13858 Q= 515 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-9/SLOT-5/CHAN-125 (is not EM) E= 125 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-9/SLOT-5/CHAN-126 (is not EM) E= 94 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-9/SLOT-7/CHAN-11 (is not EM) E= 92 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-9/SLOT-9/CHAN-115 (is not EM) E= 206 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-9/SLOT-12/CHAN-18 (is not EM) E= 540 t= 27080 Q= 757 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-9/SLOT-12/CHAN-23 (is not EM) E= 536 t= 16653 Q= 888 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-9/SLOT-12/CHAN-98 (is not EM) E= 755 t= 28094 Q= 2944 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-10/SLOT-1/CHAN-119 (is not EM) E= 1296 t= 439 Q= 116 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-9/SLOT-12/CHAN-18 (is not EM) E= 540 t= 27080 Q= 757 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-9/SLOT-12/CHAN-23 (is not EM) E= 536 t= 16653 Q= 888 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-9/SLOT-12/CHAN-98 (is not EM) E= 755 t= 28094 Q= 2944 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-10/SLOT-1/CHAN-119 (is not EM) E= 1296 t= 439 Q= 116 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-10/SLOT-2/CHAN-80 (is not EM) E= 126 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-10/SLOT-3/CHAN-73 (is not EM) E= 120 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-10/SLOT-4/CHAN-8 (is not EM) E= 98 t= 0 Q= 0 P=0xa5 G=0 @@ -367,8 +367,8 @@ Channel: BARREL/A-SIDE/FT-10/SLOT-7/CHAN-33 (is not EM) E= 93 t= 0 Q= 0 P=0xa5 G Channel: BARREL/A-SIDE/FT-10/SLOT-7/CHAN-38 (is not EM) E= 87 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-10/SLOT-7/CHAN-39 (is not EM) E= 141 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-10/SLOT-10/CHAN-121 (is not EM) E= 171 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-10/SLOT-11/CHAN-89 (is not EM) E= 412 t= -21995 Q= 651 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-11/SLOT-1/CHAN-120 (is not EM) E= 847 t= 4233 Q= 203 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-10/SLOT-11/CHAN-89 (is not EM) E= 412 t= -21995 Q= 651 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-11/SLOT-1/CHAN-120 (is not EM) E= 847 t= 4233 Q= 203 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-11/SLOT-2/CHAN-62 (is not EM) E= 151 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-11/SLOT-2/CHAN-82 (is not EM) E= 82 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-11/SLOT-2/CHAN-83 (is not EM) E= 115 t= 0 Q= 0 P=0xa5 G=0 @@ -376,39 +376,39 @@ Channel: BARREL/A-SIDE/FT-11/SLOT-2/CHAN-84 (is not EM) E= 211 t= 0 Q= 0 P=0xa5 Channel: BARREL/A-SIDE/FT-11/SLOT-3/CHAN-41 (is not EM) E= -99 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-11/SLOT-3/CHAN-49 (is not EM) E= 106 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-11/SLOT-3/CHAN-50 (is not EM) E= 236 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-11/SLOT-3/CHAN-51 (is not EM) E= 296 t= -19452 Q= 16241 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-11/SLOT-3/CHAN-51 (is not EM) E= 296 t= -19452 Q= 16241 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-11/SLOT-4/CHAN-97 (is not EM) E= 161 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-11/SLOT-4/CHAN-98 (is not EM) E= 129 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-11/SLOT-5/CHAN-119 (is not EM) E= 95 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-11/SLOT-6/CHAN-74 (is not EM) E= 149 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-11/SLOT-6/CHAN-75 (is not EM) E= 107 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-11/SLOT-11/CHAN-58 (is not EM) E= 363 t= -12812 Q= 489 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-11/SLOT-11/CHAN-58 (is not EM) E= 363 t= -12812 Q= 489 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-11/SLOT-11/CHAN-72 (is not EM) E= 235 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-11/SLOT-11/CHAN-73 (is not EM) E= 204 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-11/SLOT-11/CHAN-121 (is not EM) E= -237 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-12/SLOT-1/CHAN-3 (is not EM) E= 396 t= -2485 Q= 55 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-12/SLOT-1/CHAN-3 (is not EM) E= 396 t= -2485 Q= 55 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-12/SLOT-2/CHAN-28 (is not EM) E= 108 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-12/SLOT-2/CHAN-29 (is not EM) E= 95 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-12/SLOT-2/CHAN-30 (is not EM) E= 104 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-12/SLOT-4/CHAN-34 (is not EM) E= 88 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-12/SLOT-5/CHAN-18 (is not EM) E= -100 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-12/SLOT-5/CHAN-24 (is not EM) E= 301 t= -15805 Q= 8607 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-12/SLOT-5/CHAN-24 (is not EM) E= 301 t= -15805 Q= 8607 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-12/SLOT-6/CHAN-122 (is not EM) E= 92 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-12/SLOT-10/CHAN-70 (is not EM) E= -87 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-12/SLOT-11/CHAN-13 (is not EM) E= 205 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-12/SLOT-11/CHAN-42 (is not EM) E= 467 t= 1144 Q= 72 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-12/SLOT-11/CHAN-43 (is not EM) E= 286 t= 2000 Q= 62 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-12/SLOT-12/CHAN-46 (is not EM) E= 285 t= -30462 Q= 758 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-12/SLOT-12/CHAN-47 (is not EM) E= 260 t= -23886 Q= 677 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-13/SLOT-1/CHAN-10 (is not EM) E= 437 t= -295 Q= 173 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-13/SLOT-1/CHAN-40 (is not EM) E= 394 t= 42 Q= 162 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-13/SLOT-1/CHAN-85 (is not EM) E= 668 t= 699 Q= 253 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-12/SLOT-11/CHAN-42 (is not EM) E= 467 t= 1144 Q= 72 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-12/SLOT-11/CHAN-43 (is not EM) E= 286 t= 2000 Q= 62 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-12/SLOT-12/CHAN-46 (is not EM) E= 285 t= -30462 Q= 758 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-12/SLOT-12/CHAN-47 (is not EM) E= 260 t= -23886 Q= 677 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-13/SLOT-1/CHAN-10 (is not EM) E= 437 t= -295 Q= 173 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-13/SLOT-1/CHAN-40 (is not EM) E= 394 t= 42 Q= 162 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-13/SLOT-1/CHAN-85 (is not EM) E= 668 t= 699 Q= 253 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-13/SLOT-3/CHAN-78 (is not EM) E= -90 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-13/SLOT-4/CHAN-10 (is not EM) E= 99 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-13/SLOT-5/CHAN-94 (is not EM) E= 91 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-13/SLOT-9/CHAN-9 (is not EM) E= -96 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-13/SLOT-12/CHAN-65 (is not EM) E= 413 t= -11293 Q= 789 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-13/SLOT-13/CHAN-5 (is not EM) E= 294 t= 5574 Q= 21 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-13/SLOT-12/CHAN-65 (is not EM) E= 413 t= -11293 Q= 789 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-13/SLOT-13/CHAN-5 (is not EM) E= 294 t= 5574 Q= 21 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-14/SLOT-3/CHAN-120 (is not EM) E= 133 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-14/SLOT-3/CHAN-121 (is not EM) E= 130 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-14/SLOT-4/CHAN-61 (is not EM) E= 168 t= 0 Q= 0 P=0xa5 G=0 @@ -421,41 +421,41 @@ Channel: BARREL/A-SIDE/FT-14/SLOT-7/CHAN-2 (is not EM) E= 174 t= 0 Q= 0 P=0xa5 G Channel: BARREL/A-SIDE/FT-14/SLOT-7/CHAN-3 (is not EM) E= 136 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-14/SLOT-7/CHAN-36 (is not EM) E= 93 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-14/SLOT-7/CHAN-37 (is not EM) E= 136 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-14/SLOT-9/CHAN-53 (is not EM) E= 261 t= -10939 Q= 77 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-14/SLOT-9/CHAN-53 (is not EM) E= 261 t= -10939 Q= 77 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-14/SLOT-9/CHAN-71 (is not EM) E= -91 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-14/SLOT-10/CHAN-92 (is not EM) E= 206 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-14/SLOT-11/CHAN-43 (is not EM) E= 489 t= 7860 Q= 87 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-14/SLOT-11/CHAN-58 (is not EM) E= 329 t= -22597 Q= 153 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-14/SLOT-11/CHAN-43 (is not EM) E= 489 t= 7860 Q= 87 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-14/SLOT-11/CHAN-58 (is not EM) E= 329 t= -22597 Q= 153 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-14/SLOT-11/CHAN-104 (is not EM) E= 246 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-15/SLOT-1/CHAN-119 (is not EM) E= 1269 t= 9042 Q= 458 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-15/SLOT-1/CHAN-119 (is not EM) E= 1269 t= 9042 Q= 458 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-15/SLOT-2/CHAN-55 (is not EM) E= -94 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-15/SLOT-4/CHAN-16 (is not EM) E= 265 t= -16425 Q= 9560 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-15/SLOT-4/CHAN-16 (is not EM) E= 265 t= -16425 Q= 9560 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-15/SLOT-5/CHAN-21 (is not EM) E= 98 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-15/SLOT-13/CHAN-99 (is not EM) E= -444 t= -13006 Q= 748 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-15/SLOT-13/CHAN-103 (is not EM) E= -375 t= -13075 Q= 476 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-15/SLOT-14/CHAN-51 (is not EM) E= 409 t= 9157 Q= 33 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-15/SLOT-13/CHAN-99 (is not EM) E= -444 t= -13006 Q= 748 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-15/SLOT-13/CHAN-103 (is not EM) E= -375 t= -13075 Q= 476 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-15/SLOT-14/CHAN-51 (is not EM) E= 409 t= 9157 Q= 33 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-16/SLOT-4/CHAN-50 (is not EM) E= 177 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-16/SLOT-5/CHAN-108 (is not EM) E= 128 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-16/SLOT-5/CHAN-109 (is not EM) E= 94 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-16/SLOT-6/CHAN-21 (is not EM) E= 64 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-16/SLOT-10/CHAN-56 (is not EM) E= 328 t= 19318 Q= 268 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-16/SLOT-10/CHAN-56 (is not EM) E= 328 t= 19318 Q= 268 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-16/SLOT-12/CHAN-23 (is not EM) E= 232 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-16/SLOT-12/CHAN-26 (is not EM) E= 273 t= -20102 Q= 168 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-16/SLOT-12/CHAN-85 (is not EM) E= 264 t= 15311 Q= 7 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-16/SLOT-13/CHAN-93 (is not EM) E= 468 t= 7265 Q= 35 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-16/SLOT-13/CHAN-96 (is not EM) E= 350 t= 3284 Q= 113 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-16/SLOT-12/CHAN-26 (is not EM) E= 273 t= -20102 Q= 168 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-16/SLOT-12/CHAN-85 (is not EM) E= 264 t= 15311 Q= 7 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-16/SLOT-13/CHAN-93 (is not EM) E= 468 t= 7265 Q= 35 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-16/SLOT-13/CHAN-96 (is not EM) E= 350 t= 3284 Q= 113 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-17/SLOT-3/CHAN-41 (is not EM) E= 88 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-17/SLOT-4/CHAN-92 (is not EM) E= 102 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-17/SLOT-4/CHAN-93 (is not EM) E= 108 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-17/SLOT-6/CHAN-72 (is not EM) E= -67 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-17/SLOT-7/CHAN-85 (is not EM) E= 188 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-17/SLOT-8/CHAN-59 (is not EM) E= 132 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-17/SLOT-9/CHAN-127 (is not EM) E= 483 t= 1316 Q= 32 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-17/SLOT-9/CHAN-127 (is not EM) E= 483 t= 1316 Q= 32 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-17/SLOT-10/CHAN-90 (is not EM) E= -182 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-17/SLOT-12/CHAN-97 (is not EM) E= 328 t= -20377 Q= 499 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-17/SLOT-12/CHAN-97 (is not EM) E= 328 t= -20377 Q= 499 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-18/SLOT-3/CHAN-25 (is not EM) E= 86 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-18/SLOT-10/CHAN-34 (is not EM) E= 217 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-18/SLOT-14/CHAN-14 (is not EM) E= 436 t= -33783 Q= 1922 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-18/SLOT-14/CHAN-14 (is not EM) E= 436 t= -33783 Q= 1922 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-19/SLOT-4/CHAN-2 (is not EM) E= 91 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-19/SLOT-4/CHAN-3 (is not EM) E= 139 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-19/SLOT-4/CHAN-7 (is not EM) E= 242 t= 0 Q= 0 P=0xa5 G=0 @@ -465,29 +465,29 @@ Channel: BARREL/A-SIDE/FT-19/SLOT-4/CHAN-114 (is not EM) E= 97 t= 0 Q= 0 P=0xa5 Channel: BARREL/A-SIDE/FT-19/SLOT-4/CHAN-116 (is not EM) E= 113 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-19/SLOT-10/CHAN-13 (is not EM) E= 146 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-19/SLOT-10/CHAN-100 (is not EM) E= -184 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-19/SLOT-12/CHAN-65 (is not EM) E= 265 t= 23712 Q= 80 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-19/SLOT-13/CHAN-83 (is not EM) E= 641 t= 7529 Q= 15 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-19/SLOT-12/CHAN-65 (is not EM) E= 265 t= 23712 Q= 80 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-19/SLOT-13/CHAN-83 (is not EM) E= 641 t= 7529 Q= 15 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-20/SLOT-4/CHAN-110 (is not EM) E= 129 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-20/SLOT-6/CHAN-1 (is not EM) E= 84 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-20/SLOT-6/CHAN-2 (is not EM) E= 77 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-20/SLOT-10/CHAN-17 (is not EM) E= 160 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-20/SLOT-10/CHAN-23 (is not EM) E= 177 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-21/SLOT-1/CHAN-65 (is not EM) E= 571 t= -10640 Q= 674 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-21/SLOT-1/CHAN-65 (is not EM) E= 571 t= -10640 Q= 674 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-21/SLOT-3/CHAN-55 (is not EM) E= 105 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-21/SLOT-3/CHAN-56 (is not EM) E= 88 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-21/SLOT-5/CHAN-53 (is not EM) E= 91 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-21/SLOT-6/CHAN-10 (is not EM) E= 109 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-21/SLOT-8/CHAN-4 (is not EM) E= 162 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-21/SLOT-8/CHAN-73 (is not EM) E= 120 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-21/SLOT-9/CHAN-126 (is not EM) E= 341 t= 24660 Q= 229 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-21/SLOT-14/CHAN-7 (is not EM) E= 359 t= -31271 Q= 299 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-21/SLOT-14/CHAN-20 (is not EM) E= 478 t= -31881 Q= 87 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-21/SLOT-14/CHAN-62 (is not EM) E= 362 t= -26792 Q= 730 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-21/SLOT-9/CHAN-126 (is not EM) E= 341 t= 24660 Q= 229 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-21/SLOT-14/CHAN-7 (is not EM) E= 359 t= -31271 Q= 299 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-21/SLOT-14/CHAN-20 (is not EM) E= 478 t= -31881 Q= 87 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-21/SLOT-14/CHAN-62 (is not EM) E= 362 t= -26792 Q= 730 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-22/SLOT-4/CHAN-52 (is not EM) E= 166 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-22/SLOT-4/CHAN-114 (is not EM) E= 110 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-22/SLOT-10/CHAN-50 (is not EM) E= 312 t= 25373 Q= 22 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-22/SLOT-10/CHAN-62 (is not EM) E= 700 t= 12623 Q= 1961 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-22/SLOT-10/CHAN-63 (is not EM) E= 545 t= 6638 Q= 2973 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-22/SLOT-10/CHAN-50 (is not EM) E= 312 t= 25373 Q= 22 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-22/SLOT-10/CHAN-62 (is not EM) E= 700 t= 12623 Q= 1961 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-22/SLOT-10/CHAN-63 (is not EM) E= 545 t= 6638 Q= 2973 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-22/SLOT-11/CHAN-85 (is not EM) E= 228 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-23/SLOT-5/CHAN-61 (is not EM) E= 120 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-23/SLOT-5/CHAN-118 (is not EM) E= 137 t= 0 Q= 0 P=0xa5 G=0 @@ -504,9 +504,9 @@ Channel: BARREL/A-SIDE/FT-24/SLOT-8/CHAN-77 (is not EM) E= 95 t= 0 Q= 0 P=0xa5 G Channel: BARREL/A-SIDE/FT-24/SLOT-9/CHAN-61 (is not EM) E= 139 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-24/SLOT-9/CHAN-62 (is not EM) E= 167 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-24/SLOT-11/CHAN-34 (is not EM) E= 232 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-24/SLOT-11/CHAN-35 (is not EM) E= 266 t= 3530 Q= 129 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-24/SLOT-11/CHAN-113 (is not EM) E= 303 t= 11192 Q= 231 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-24/SLOT-13/CHAN-125 (is not EM) E= 295 t= -19667 Q= 29 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-24/SLOT-11/CHAN-35 (is not EM) E= 266 t= 3530 Q= 129 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-24/SLOT-11/CHAN-113 (is not EM) E= 303 t= 11192 Q= 231 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-24/SLOT-13/CHAN-125 (is not EM) E= 295 t= -19667 Q= 29 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-25/SLOT-3/CHAN-16 (is not EM) E= 91 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-25/SLOT-3/CHAN-17 (is not EM) E= 139 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-25/SLOT-3/CHAN-18 (is not EM) E= 109 t= 0 Q= 0 P=0xa5 G=0 @@ -519,9 +519,9 @@ Channel: BARREL/A-SIDE/FT-25/SLOT-6/CHAN-70 (is not EM) E= 62 t= 0 Q= 0 P=0xa5 G Channel: BARREL/A-SIDE/FT-25/SLOT-6/CHAN-88 (is not EM) E= -86 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-25/SLOT-9/CHAN-79 (is not EM) E= 93 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-25/SLOT-11/CHAN-98 (is not EM) E= 220 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-25/SLOT-11/CHAN-99 (is not EM) E= 311 t= 1767 Q= 57 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-25/SLOT-11/CHAN-99 (is not EM) E= 311 t= 1767 Q= 57 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-25/SLOT-11/CHAN-103 (is not EM) E= 210 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-25/SLOT-13/CHAN-66 (is not EM) E= 461 t= 46603 Q= 114 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-25/SLOT-13/CHAN-66 (is not EM) E= 461 t= 46603 Q= 114 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-26/SLOT-3/CHAN-41 (is not EM) E= 86 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-26/SLOT-3/CHAN-42 (is not EM) E= 131 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-26/SLOT-5/CHAN-79 (is not EM) E= 104 t= 0 Q= 0 P=0xa5 G=0 @@ -530,12 +530,12 @@ Channel: BARREL/A-SIDE/FT-26/SLOT-8/CHAN-112 (is not EM) E= 99 t= 0 Q= 0 P=0xa5 Channel: BARREL/A-SIDE/FT-26/SLOT-9/CHAN-84 (is not EM) E= -81 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-26/SLOT-10/CHAN-28 (is not EM) E= -223 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-26/SLOT-10/CHAN-75 (is not EM) E= 184 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-27/SLOT-1/CHAN-88 (is not EM) E= 801 t= 1217 Q= 2806 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-27/SLOT-1/CHAN-91 (is not EM) E= 646 t= 462 Q= 2525 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-27/SLOT-1/CHAN-88 (is not EM) E= 801 t= 1217 Q= 2806 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-27/SLOT-1/CHAN-91 (is not EM) E= 646 t= 462 Q= 2525 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-27/SLOT-5/CHAN-58 (is not EM) E= -114 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-27/SLOT-7/CHAN-102 (is not EM) E= 81 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-27/SLOT-10/CHAN-5 (is not EM) E= 105 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-27/SLOT-10/CHAN-89 (is not EM) E= 267 t= 23605 Q= 29 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-27/SLOT-10/CHAN-89 (is not EM) E= 267 t= 23605 Q= 29 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-27/SLOT-10/CHAN-100 (is not EM) E= 192 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-28/SLOT-3/CHAN-56 (is not EM) E= 88 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-28/SLOT-4/CHAN-63 (is not EM) E= -110 t= 0 Q= 0 P=0xa5 G=0 @@ -545,18 +545,18 @@ Channel: BARREL/A-SIDE/FT-28/SLOT-8/CHAN-6 (is not EM) E= 78 t= 0 Q= 0 P=0xa5 G= Channel: BARREL/A-SIDE/FT-28/SLOT-8/CHAN-17 (is not EM) E= 117 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-28/SLOT-8/CHAN-18 (is not EM) E= 120 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-28/SLOT-9/CHAN-107 (is not EM) E= 98 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-28/SLOT-10/CHAN-76 (is not EM) E= 272 t= 19487 Q= 586 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-28/SLOT-10/CHAN-76 (is not EM) E= 272 t= 19487 Q= 586 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-28/SLOT-11/CHAN-74 (is not EM) E= -235 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-28/SLOT-11/CHAN-87 (is not EM) E= 369 t= 2380 Q= 32 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-28/SLOT-11/CHAN-113 (is not EM) E= 345 t= 3173 Q= 23 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-28/SLOT-12/CHAN-31 (is not EM) E= -315 t= -2884 Q= 883 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-28/SLOT-12/CHAN-73 (is not EM) E= 461 t= -16976 Q= 1647 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-28/SLOT-13/CHAN-73 (is not EM) E= 417 t= -1772 Q= 22 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-28/SLOT-13/CHAN-75 (is not EM) E= 611 t= -23773 Q= 744 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-28/SLOT-13/CHAN-88 (is not EM) E= 726 t= 27741 Q= 398 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-28/SLOT-13/CHAN-89 (is not EM) E= 443 t= 23333 Q= 267 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-28/SLOT-13/CHAN-111 (is not EM) E= 621 t= 2600 Q= 63 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-28/SLOT-14/CHAN-51 (is not EM) E= 634 t= 38212 Q= 440 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-28/SLOT-11/CHAN-87 (is not EM) E= 369 t= 2380 Q= 32 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-28/SLOT-11/CHAN-113 (is not EM) E= 345 t= 3173 Q= 23 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-28/SLOT-12/CHAN-31 (is not EM) E= -315 t= -2884 Q= 883 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-28/SLOT-12/CHAN-73 (is not EM) E= 461 t= -16976 Q= 1647 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-28/SLOT-13/CHAN-73 (is not EM) E= 417 t= -1772 Q= 22 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-28/SLOT-13/CHAN-75 (is not EM) E= 611 t= -23773 Q= 744 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-28/SLOT-13/CHAN-88 (is not EM) E= 726 t= 27741 Q= 398 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-28/SLOT-13/CHAN-89 (is not EM) E= 443 t= 23333 Q= 267 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-28/SLOT-13/CHAN-111 (is not EM) E= 621 t= 2600 Q= 63 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-28/SLOT-14/CHAN-51 (is not EM) E= 634 t= 38212 Q= 440 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-29/SLOT-2/CHAN-62 (is not EM) E= -91 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-29/SLOT-2/CHAN-85 (is not EM) E= 91 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-29/SLOT-4/CHAN-57 (is not EM) E= 113 t= 0 Q= 0 P=0xa5 G=0 @@ -565,378 +565,378 @@ Channel: BARREL/A-SIDE/FT-29/SLOT-4/CHAN-59 (is not EM) E= 109 t= 0 Q= 0 P=0xa5 Channel: BARREL/A-SIDE/FT-29/SLOT-7/CHAN-27 (is not EM) E= 172 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-29/SLOT-9/CHAN-51 (is not EM) E= 193 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-29/SLOT-10/CHAN-56 (is not EM) E= 153 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-29/SLOT-11/CHAN-111 (is not EM) E= 355 t= -3118 Q= 52 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-29/SLOT-13/CHAN-44 (is not EM) E= 595 t= 4672 Q= 136 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-29/SLOT-13/CHAN-101 (is not EM) E= 311 t= -5776 Q= 3 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-29/SLOT-14/CHAN-32 (is not EM) E= 377 t= 23794 Q= 91 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-30/SLOT-1/CHAN-29 (is not EM) E= 349 t= 4460 Q= 76 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-30/SLOT-10/CHAN-20 (is not EM) E= 259 t= 11147 Q= 105 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-29/SLOT-11/CHAN-111 (is not EM) E= 355 t= -3118 Q= 52 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-29/SLOT-13/CHAN-44 (is not EM) E= 595 t= 4672 Q= 136 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-29/SLOT-13/CHAN-101 (is not EM) E= 311 t= -5776 Q= 3 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-29/SLOT-14/CHAN-32 (is not EM) E= 377 t= 23794 Q= 91 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-30/SLOT-1/CHAN-29 (is not EM) E= 349 t= 4460 Q= 76 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-30/SLOT-10/CHAN-20 (is not EM) E= 259 t= 11147 Q= 105 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-30/SLOT-10/CHAN-37 (is not EM) E= 198 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-30/SLOT-12/CHAN-95 (is not EM) E= -255 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-31/SLOT-4/CHAN-79 (is not EM) E= 166 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-31/SLOT-8/CHAN-93 (is not EM) E= 76 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-31/SLOT-10/CHAN-84 (is not EM) E= 232 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-31/SLOT-12/CHAN-45 (is not EM) E= 240 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-31/SLOT-13/CHAN-53 (is not EM) E= 456 t= -3890 Q= 21 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-31/SLOT-14/CHAN-41 (is not EM) E= 502 t= -34088 Q= 1417 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-0/SLOT-2/CHAN-79 (is not EM) E= 298 t= 15149 Q= 5177 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-31/SLOT-13/CHAN-53 (is not EM) E= 456 t= -3890 Q= 21 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-31/SLOT-14/CHAN-41 (is not EM) E= 502 t= -34088 Q= 1417 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-0/SLOT-2/CHAN-79 (is not EM) E= 298 t= 15149 Q= 5177 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-0/SLOT-2/CHAN-80 (is not EM) E= 219 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-0/SLOT-3/CHAN-19 (is not EM) E= 190 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-0/SLOT-5/CHAN-17 (is not EM) E= 528 t= 2724 Q= 807 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-0/SLOT-5/CHAN-17 (is not EM) E= 528 t= 2724 Q= 807 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-0/SLOT-5/CHAN-97 (is not EM) E= 235 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-0/SLOT-9/CHAN-110 (is not EM) E= 406 t= -4823 Q= 80 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-0/SLOT-11/CHAN-79 (is not EM) E= 452 t= -233 Q= 29 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-0/SLOT-11/CHAN-104 (is not EM) E= 498 t= 886 Q= 58 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-0/SLOT-12/CHAN-54 (is not EM) E= 1032 t= -28829 Q= 8740 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-0/SLOT-12/CHAN-55 (is not EM) E= 1095 t= -35192 Q= 12559 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-0/SLOT-13/CHAN-20 (is not EM) E= 665 t= -2866 Q= 592 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-1/SLOT-5/CHAN-18 (is not EM) E= 272 t= 20582 Q= 65535 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-1/SLOT-5/CHAN-77 (is not EM) E= 286 t= -27627 Q= 27393 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-1/SLOT-11/CHAN-18 (is not EM) E= 717 t= -22456 Q= 2440 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-1/SLOT-11/CHAN-75 (is not EM) E= 754 t= 20823 Q= 4806 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-1/SLOT-11/CHAN-79 (is not EM) E= 541 t= 23204 Q= 6986 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-2/SLOT-3/CHAN-21 (is not EM) E= 426 t= -8238 Q= 106 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-0/SLOT-9/CHAN-110 (is not EM) E= 406 t= -4823 Q= 80 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-0/SLOT-11/CHAN-79 (is not EM) E= 452 t= -233 Q= 29 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-0/SLOT-11/CHAN-104 (is not EM) E= 498 t= 886 Q= 58 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-0/SLOT-12/CHAN-54 (is not EM) E= 1032 t= -28829 Q= 8740 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-0/SLOT-12/CHAN-55 (is not EM) E= 1095 t= -35192 Q= 12559 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-0/SLOT-13/CHAN-20 (is not EM) E= 665 t= -2866 Q= 592 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-1/SLOT-5/CHAN-18 (is not EM) E= 272 t= 20582 Q= 65535 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-1/SLOT-5/CHAN-77 (is not EM) E= 286 t= -27627 Q= 27393 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-1/SLOT-11/CHAN-18 (is not EM) E= 717 t= -22456 Q= 2440 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-1/SLOT-11/CHAN-75 (is not EM) E= 754 t= 20823 Q= 4806 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-1/SLOT-11/CHAN-79 (is not EM) E= 541 t= 23204 Q= 6986 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-2/SLOT-3/CHAN-21 (is not EM) E= 426 t= -8238 Q= 106 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-2/SLOT-3/CHAN-87 (is not EM) E= 244 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-2/SLOT-7/CHAN-49 (is not EM) E= 140 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-2/SLOT-8/CHAN-77 (is not EM) E= 141 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-2/SLOT-8/CHAN-78 (is not EM) E= 195 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-2/SLOT-8/CHAN-112 (is not EM) E= 142 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-2/SLOT-9/CHAN-23 (is not EM) E= 263 t= -30342 Q= 1220 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-2/SLOT-9/CHAN-23 (is not EM) E= 263 t= -30342 Q= 1220 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-2/SLOT-9/CHAN-57 (is not EM) E= 227 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-2/SLOT-9/CHAN-75 (is not EM) E= -135 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-2/SLOT-10/CHAN-28 (is not EM) E= 365 t= -5933 Q= 38 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-2/SLOT-11/CHAN-112 (is not EM) E= 334 t= 7706 Q= 14 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-3/SLOT-5/CHAN-55 Barrel l/e/p= 0/240/0: E= -1750 t= -838 Q= 35 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-3/SLOT-7/CHAN-43 Barrel l/e/p= 0/232/0: E= 1434 t= 33409 Q= 1 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-3/SLOT-7/CHAN-59 Barrel l/e/p= 0/232/0: E= -1427 t= 1163 Q= 20 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-3/SLOT-9/CHAN-24 Barrel l/e/p= 1/232/0: E= 3195 t= -329 Q= 9 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-3/SLOT-9/CHAN-100 Barrel l/e/p= 2/96/0: E= 9140 t= -12885 Q= 355 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-3/SLOT-10/CHAN-52 Barrel l/e/p= 2/80/0: E= 8619 t= 6781 Q= 705 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-3/SLOT-10/CHAN-77 Barrel l/e/p= 1/128/0: E= 2150 t= 14118 Q= 210 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-3/SLOT-10/CHAN-106 Barrel l/e/p= 2/72/0: E= 4646 t= -9260 Q= 193 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-3/SLOT-10/CHAN-117 Barrel l/e/p= 2/64/0: E= 7990 t= -1117 Q= 28 P=0x21a5 G=1 +Channel: ENDCAP/C-SIDE/FT-2/SLOT-10/CHAN-28 (is not EM) E= 365 t= -5933 Q= 38 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-2/SLOT-11/CHAN-112 (is not EM) E= 334 t= 7706 Q= 14 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-3/SLOT-5/CHAN-55 Barrel l/e/p= 0/240/0: E= -1750 t= -838 Q= 35 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-3/SLOT-7/CHAN-43 Barrel l/e/p= 0/232/0: E= 1434 t= 33409 Q= 1 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-3/SLOT-7/CHAN-59 Barrel l/e/p= 0/232/0: E= -1427 t= 1163 Q= 20 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-3/SLOT-9/CHAN-24 Barrel l/e/p= 1/232/0: E= 3195 t= -329 Q= 9 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-3/SLOT-9/CHAN-100 Barrel l/e/p= 2/96/0: E= 9140 t= -12885 Q= 355 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-3/SLOT-10/CHAN-52 Barrel l/e/p= 2/80/0: E= 8619 t= 6781 Q= 705 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-3/SLOT-10/CHAN-77 Barrel l/e/p= 1/128/0: E= 2150 t= 14118 Q= 210 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-3/SLOT-10/CHAN-106 Barrel l/e/p= 2/72/0: E= 4646 t= -9260 Q= 193 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-3/SLOT-10/CHAN-117 Barrel l/e/p= 2/64/0: E= 7990 t= -1117 Q= 28 P=0x20a5 G=1 Channel: ENDCAP/C-SIDE/FT-4/SLOT-4/CHAN-108 (is not EM) E= 216 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-4/SLOT-7/CHAN-42 (is not EM) E= 494 t= 1455 Q= 307 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-4/SLOT-7/CHAN-42 (is not EM) E= 494 t= 1455 Q= 307 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-4/SLOT-8/CHAN-6 (is not EM) E= 168 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-4/SLOT-10/CHAN-99 (is not EM) E= 410 t= -541 Q= 25 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-4/SLOT-11/CHAN-88 (is not EM) E= 559 t= 24260 Q= 5316 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-5/SLOT-9/CHAN-35 (is not EM) E= 386 t= -2352 Q= 12 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-6/SLOT-1/CHAN-7 Barrel l/e/p= 0/112/0: E= 1631 t= 1328 Q= 0 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-6/SLOT-6/CHAN-39 Barrel l/e/p= 2/208/0: E= 17898 t= 1499 Q= 284 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-6/SLOT-6/CHAN-59 Barrel l/e/p= 3/208/0: E= 44734 t= 2161 Q= 377 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-6/SLOT-7/CHAN-12 Barrel l/e/p= 0/432/0: E= 1095 t= 2968 Q= 1 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-6/SLOT-7/CHAN-81 Barrel l/e/p= 1/160/0: E= 14957 t= 146 Q= 73 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-6/SLOT-10/CHAN-5 Barrel l/e/p= 0/96/0: E= 7594 t= -5445 Q= 4 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-6/SLOT-10/CHAN-109 Barrel l/e/p= 0/80/0: E= 1708 t= -614 Q= 3 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-6/SLOT-11/CHAN-58 Barrel l/e/p= 1/304/0: E= 15621 t= -4902 Q= 26 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-6/SLOT-11/CHAN-82 Barrel l/e/p= 1/256/0: E= 36719 t= -10243 Q= 7230 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-6/SLOT-11/CHAN-120 Barrel l/e/p= 1/272/0: E= 17838 t= -12484 Q= 189 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-6/SLOT-13/CHAN-27 Barrel l/e/p= 1/160/0: E= 12699 t= 593 Q= 1 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-6/SLOT-13/CHAN-102 Barrel l/e/p= 0/400/0: E= 6704 t= 4266 Q= 2 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-6/SLOT-14/CHAN-42 Barrel l/e/p= 0/336/0: E= 3875 t= -12200 Q= 12 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-6/SLOT-14/CHAN-91 Barrel l/e/p= 0/32/0: E= 7985 t= 6305 Q= 1 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-6/SLOT-15/CHAN-90 Barrel l/e/p= 0/416/0: E= 5879 t= 3198 Q= 2 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-7/SLOT-5/CHAN-117 (is not EM) E= -346 t= -32062 Q= 65535 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-7/SLOT-5/CHAN-118 (is not EM) E= -374 t= -24456 Q= 65535 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-7/SLOT-7/CHAN-8 (is not EM) E= 490 t= 494 Q= 5324 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-7/SLOT-7/CHAN-68 (is not EM) E= 557 t= -1635 Q= 11507 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-7/SLOT-11/CHAN-127 (is not EM) E= -824 t= -2828 Q= 65535 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-7/SLOT-12/CHAN-19 (is not EM) E= 460 t= 1504 Q= 173 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-4/SLOT-10/CHAN-99 (is not EM) E= 410 t= -541 Q= 25 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-4/SLOT-11/CHAN-88 (is not EM) E= 559 t= 24260 Q= 5316 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-5/SLOT-9/CHAN-35 (is not EM) E= 386 t= -2352 Q= 12 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-6/SLOT-1/CHAN-7 Barrel l/e/p= 0/112/0: E= 1631 t= 1328 Q= 0 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-6/SLOT-6/CHAN-39 Barrel l/e/p= 2/208/0: E= 17898 t= 1499 Q= 284 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-6/SLOT-6/CHAN-59 Barrel l/e/p= 3/208/0: E= 44734 t= 2161 Q= 377 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-6/SLOT-7/CHAN-12 Barrel l/e/p= 0/432/0: E= 1095 t= 2968 Q= 1 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-6/SLOT-7/CHAN-81 Barrel l/e/p= 1/160/0: E= 14957 t= 146 Q= 73 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-6/SLOT-10/CHAN-5 Barrel l/e/p= 0/96/0: E= 7594 t= -5445 Q= 4 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-6/SLOT-10/CHAN-109 Barrel l/e/p= 0/80/0: E= 1708 t= -614 Q= 3 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-6/SLOT-11/CHAN-58 Barrel l/e/p= 1/304/0: E= 15621 t= -4902 Q= 26 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-6/SLOT-11/CHAN-82 Barrel l/e/p= 1/256/0: E= 36719 t= -10243 Q= 7230 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-6/SLOT-11/CHAN-120 Barrel l/e/p= 1/272/0: E= 17838 t= -12484 Q= 189 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-6/SLOT-13/CHAN-27 Barrel l/e/p= 1/160/0: E= 12699 t= 593 Q= 1 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-6/SLOT-13/CHAN-102 Barrel l/e/p= 0/400/0: E= 6704 t= 4266 Q= 2 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-6/SLOT-14/CHAN-42 Barrel l/e/p= 0/336/0: E= 3875 t= -12200 Q= 12 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-6/SLOT-14/CHAN-91 Barrel l/e/p= 0/32/0: E= 7985 t= 6305 Q= 1 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-6/SLOT-15/CHAN-90 Barrel l/e/p= 0/416/0: E= 5879 t= 3198 Q= 2 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-7/SLOT-5/CHAN-117 (is not EM) E= -346 t= -32062 Q= 65535 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-7/SLOT-5/CHAN-118 (is not EM) E= -374 t= -24456 Q= 65535 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-7/SLOT-7/CHAN-8 (is not EM) E= 490 t= 494 Q= 5324 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-7/SLOT-7/CHAN-68 (is not EM) E= 557 t= -1635 Q= 11507 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-7/SLOT-11/CHAN-127 (is not EM) E= -824 t= -2828 Q= 65535 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-7/SLOT-12/CHAN-19 (is not EM) E= 460 t= 1504 Q= 173 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-8/SLOT-3/CHAN-69 (is not EM) E= 140 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-8/SLOT-8/CHAN-22 (is not EM) E= 208 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-8/SLOT-9/CHAN-84 (is not EM) E= -298 t= 2128 Q= 28 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-8/SLOT-12/CHAN-92 (is not EM) E= 667 t= -348 Q= 127 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-9/SLOT-3/CHAN-4 (is not EM) E= 404 t= 35602 Q= 9501 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-8/SLOT-9/CHAN-84 (is not EM) E= -298 t= 2128 Q= 28 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-8/SLOT-12/CHAN-92 (is not EM) E= 667 t= -348 Q= 127 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-9/SLOT-3/CHAN-4 (is not EM) E= 404 t= 35602 Q= 9501 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-9/SLOT-4/CHAN-42 (is not EM) E= 245 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-9/SLOT-7/CHAN-2 (is not EM) E= 94 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-9/SLOT-9/CHAN-35 (is not EM) E= 163 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-9/SLOT-10/CHAN-71 (is not EM) E= 352 t= 28902 Q= 194 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-10/SLOT-1/CHAN-104 (is not EM) E= 8002 t= 2299 Q= 91 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-10/SLOT-2/CHAN-4 (is not EM) E= 1306 t= 757 Q= 18 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-10/SLOT-7/CHAN-23 Barrel l/e/p= 0/112/0: E= 1283 t= 1585 Q= 48 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-10/SLOT-8/CHAN-69 Barrel l/e/p= 0/16/0: E= 2158 t= -2196 Q= 38 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-10/SLOT-8/CHAN-85 Barrel l/e/p= 0/16/0: E= 2370 t= 7119 Q= 102 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-10/SLOT-9/CHAN-0 Barrel l/e/p= 1/120/0: E= 3041 t= 5652 Q= 16 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-10/SLOT-9/CHAN-49 Barrel l/e/p= 2/56/0: E= -4867 t= -12086 Q= 275 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-10/SLOT-10/CHAN-52 Barrel l/e/p= 2/16/0: E= 9492 t= 1652 Q= 1291 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-10/SLOT-10/CHAN-53 Barrel l/e/p= 2/16/0: E= 6424 t= 1558 Q= 336 P=0x21a5 G=1 +Channel: ENDCAP/C-SIDE/FT-9/SLOT-10/CHAN-71 (is not EM) E= 352 t= 28902 Q= 194 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-10/SLOT-1/CHAN-104 (is not EM) E= 8002 t= 2299 Q= 91 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-10/SLOT-2/CHAN-4 (is not EM) E= 1306 t= 757 Q= 18 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-10/SLOT-7/CHAN-23 Barrel l/e/p= 0/112/0: E= 1283 t= 1585 Q= 48 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-10/SLOT-8/CHAN-69 Barrel l/e/p= 0/16/0: E= 2158 t= -2196 Q= 38 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-10/SLOT-8/CHAN-85 Barrel l/e/p= 0/16/0: E= 2370 t= 7119 Q= 102 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-10/SLOT-9/CHAN-0 Barrel l/e/p= 1/120/0: E= 3041 t= 5652 Q= 16 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-10/SLOT-9/CHAN-49 Barrel l/e/p= 2/56/0: E= -4867 t= -12086 Q= 275 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-10/SLOT-10/CHAN-52 Barrel l/e/p= 2/16/0: E= 9492 t= 1652 Q= 1291 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-10/SLOT-10/CHAN-53 Barrel l/e/p= 2/16/0: E= 6424 t= 1558 Q= 336 P=0x20a5 G=1 Channel: ENDCAP/C-SIDE/FT-11/SLOT-5/CHAN-111 (is not EM) E= 255 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-11/SLOT-5/CHAN-112 (is not EM) E= 317 t= 3022 Q= 2010 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-11/SLOT-5/CHAN-112 (is not EM) E= 317 t= 3022 Q= 2010 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-12/SLOT-2/CHAN-31 (is not EM) E= -141 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-12/SLOT-2/CHAN-117 (is not EM) E= 121 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-12/SLOT-5/CHAN-106 (is not EM) E= 220 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-12/SLOT-12/CHAN-27 (is not EM) E= 871 t= -3050 Q= 12 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-12/SLOT-12/CHAN-27 (is not EM) E= 871 t= -3050 Q= 12 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-13/SLOT-4/CHAN-42 (is not EM) E= 241 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-13/SLOT-4/CHAN-76 (is not EM) E= 233 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-13/SLOT-4/CHAN-77 (is not EM) E= 243 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-13/SLOT-4/CHAN-83 (is not EM) E= 611 t= 741 Q= 4991 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-13/SLOT-4/CHAN-84 (is not EM) E= 453 t= -3571 Q= 2270 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-13/SLOT-4/CHAN-83 (is not EM) E= 611 t= 741 Q= 4991 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-13/SLOT-4/CHAN-84 (is not EM) E= 453 t= -3571 Q= 2270 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-13/SLOT-5/CHAN-102 (is not EM) E= 241 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-13/SLOT-6/CHAN-7 (is not EM) E= 329 t= 2121 Q= 726 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-13/SLOT-11/CHAN-20 (is not EM) E= 483 t= -5043 Q= 140 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-13/SLOT-11/CHAN-112 (is not EM) E= 988 t= 2366 Q= 118 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-13/SLOT-11/CHAN-116 (is not EM) E= 3575 t= 115 Q= 1399 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-13/SLOT-11/CHAN-117 (is not EM) E= 542 t= 2149 Q= 167 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-13/SLOT-12/CHAN-7 (is not EM) E= 687 t= 247 Q= 259 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-13/SLOT-12/CHAN-41 (is not EM) E= 555 t= -1211 Q= 44 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-13/SLOT-13/CHAN-124 (is not EM) E= 702 t= 2003 Q= 327 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-13/SLOT-6/CHAN-7 (is not EM) E= 329 t= 2121 Q= 726 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-13/SLOT-11/CHAN-20 (is not EM) E= 483 t= -5043 Q= 140 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-13/SLOT-11/CHAN-112 (is not EM) E= 988 t= 2366 Q= 118 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-13/SLOT-11/CHAN-116 (is not EM) E= 3575 t= 115 Q= 1399 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-13/SLOT-11/CHAN-117 (is not EM) E= 542 t= 2149 Q= 167 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-13/SLOT-12/CHAN-7 (is not EM) E= 687 t= 247 Q= 259 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-13/SLOT-12/CHAN-41 (is not EM) E= 555 t= -1211 Q= 44 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-13/SLOT-13/CHAN-124 (is not EM) E= 702 t= 2003 Q= 327 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-14/SLOT-4/CHAN-41 (is not EM) E= 205 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-14/SLOT-4/CHAN-101 (is not EM) E= 230 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-14/SLOT-5/CHAN-110 (is not EM) E= 350 t= -17415 Q= 25835 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-14/SLOT-5/CHAN-111 (is not EM) E= 605 t= -18263 Q= 65535 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-14/SLOT-7/CHAN-47 (is not EM) E= 508 t= 1474 Q= 1108 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-14/SLOT-5/CHAN-110 (is not EM) E= 350 t= -17415 Q= 25835 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-14/SLOT-5/CHAN-111 (is not EM) E= 605 t= -18263 Q= 65535 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-14/SLOT-7/CHAN-47 (is not EM) E= 508 t= 1474 Q= 1108 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-14/SLOT-8/CHAN-111 (is not EM) E= 207 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-14/SLOT-10/CHAN-126 (is not EM) E= 496 t= -1311 Q= 41 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-14/SLOT-11/CHAN-90 (is not EM) E= 892 t= -273 Q= 139 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-14/SLOT-11/CHAN-121 (is not EM) E= 557 t= -25969 Q= 8557 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-14/SLOT-10/CHAN-126 (is not EM) E= 496 t= -1311 Q= 41 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-14/SLOT-11/CHAN-90 (is not EM) E= 892 t= -273 Q= 139 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-14/SLOT-11/CHAN-121 (is not EM) E= 557 t= -25969 Q= 8557 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-15/SLOT-4/CHAN-36 (is not EM) E= 233 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-15/SLOT-7/CHAN-13 (is not EM) E= -141 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-15/SLOT-7/CHAN-113 (is not EM) E= 124 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-15/SLOT-7/CHAN-114 (is not EM) E= 133 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-15/SLOT-8/CHAN-97 (is not EM) E= 116 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-15/SLOT-11/CHAN-27 (is not EM) E= 436 t= 553 Q= 8 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-15/SLOT-13/CHAN-85 (is not EM) E= 319 t= 7594 Q= 440 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-15/SLOT-14/CHAN-64 (is not EM) E= 698 t= -3686 Q= 545 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-15/SLOT-14/CHAN-65 (is not EM) E= 1023 t= -240 Q= 1402 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-15/SLOT-14/CHAN-76 (is not EM) E= 601 t= -1816 Q= 554 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-16/SLOT-5/CHAN-33 Barrel l/e/p= 0/504/0: E= 1747 t= 2812 Q= 171 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-16/SLOT-5/CHAN-37 Barrel l/e/p= 0/496/0: E= 1901 t= 2877 Q= 15 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-16/SLOT-5/CHAN-40 Barrel l/e/p= 0/488/0: E= 2023 t= -9589 Q= 7 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-16/SLOT-5/CHAN-41 Barrel l/e/p= 0/488/0: E= 2290 t= -6448 Q= 19 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-16/SLOT-5/CHAN-125 Barrel l/e/p= 0/448/0: E= 1948 t= -30189 Q= 105 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-16/SLOT-6/CHAN-57 Barrel l/e/p= 0/424/0: E= 7402 t= 20044 Q= 1240 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-16/SLOT-6/CHAN-61 Barrel l/e/p= 0/416/0: E= 1895 t= 9314 Q= 18 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-16/SLOT-8/CHAN-69 Barrel l/e/p= 0/400/0: E= 2826 t= -11649 Q= 24 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-16/SLOT-8/CHAN-78 Barrel l/e/p= 0/384/0: E= 1480 t= 8595 Q= 190 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-16/SLOT-10/CHAN-70 Barrel l/e/p= 1/400/0: E= 2267 t= 3163 Q= 363 P=0x21a5 G=1 +Channel: ENDCAP/C-SIDE/FT-15/SLOT-11/CHAN-27 (is not EM) E= 436 t= 553 Q= 8 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-15/SLOT-13/CHAN-85 (is not EM) E= 319 t= 7594 Q= 440 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-15/SLOT-14/CHAN-64 (is not EM) E= 698 t= -3686 Q= 545 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-15/SLOT-14/CHAN-65 (is not EM) E= 1023 t= -240 Q= 1402 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-15/SLOT-14/CHAN-76 (is not EM) E= 601 t= -1816 Q= 554 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-16/SLOT-5/CHAN-33 Barrel l/e/p= 0/504/0: E= 1747 t= 2812 Q= 171 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-16/SLOT-5/CHAN-37 Barrel l/e/p= 0/496/0: E= 1901 t= 2877 Q= 15 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-16/SLOT-5/CHAN-40 Barrel l/e/p= 0/488/0: E= 2023 t= -9589 Q= 7 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-16/SLOT-5/CHAN-41 Barrel l/e/p= 0/488/0: E= 2290 t= -6448 Q= 19 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-16/SLOT-5/CHAN-125 Barrel l/e/p= 0/448/0: E= 1948 t= -30189 Q= 105 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-16/SLOT-6/CHAN-57 Barrel l/e/p= 0/424/0: E= 7402 t= 20044 Q= 1240 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-16/SLOT-6/CHAN-61 Barrel l/e/p= 0/416/0: E= 1895 t= 9314 Q= 18 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-16/SLOT-8/CHAN-69 Barrel l/e/p= 0/400/0: E= 2826 t= -11649 Q= 24 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-16/SLOT-8/CHAN-78 Barrel l/e/p= 0/384/0: E= 1480 t= 8595 Q= 190 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-16/SLOT-10/CHAN-70 Barrel l/e/p= 1/400/0: E= 2267 t= 3163 Q= 363 P=0x20a5 G=1 Channel: ENDCAP/C-SIDE/FT-17/SLOT-2/CHAN-85 (is not EM) E= 126 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-17/SLOT-3/CHAN-91 (is not EM) E= 318 t= 20779 Q= 38130 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-17/SLOT-3/CHAN-91 (is not EM) E= 318 t= 20779 Q= 38130 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-17/SLOT-3/CHAN-92 (is not EM) E= 208 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-17/SLOT-3/CHAN-93 (is not EM) E= 284 t= 24471 Q= 43989 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-17/SLOT-3/CHAN-93 (is not EM) E= 284 t= 24471 Q= 43989 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-17/SLOT-4/CHAN-64 (is not EM) E= 241 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-17/SLOT-5/CHAN-117 (is not EM) E= 317 t= 5826 Q= 845 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-17/SLOT-7/CHAN-55 (is not EM) E= -374 t= 1457 Q= 65535 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-17/SLOT-7/CHAN-95 (is not EM) E= 647 t= 386 Q= 2810 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-17/SLOT-5/CHAN-117 (is not EM) E= 317 t= 5826 Q= 845 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-17/SLOT-7/CHAN-55 (is not EM) E= -374 t= 1457 Q= 65535 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-17/SLOT-7/CHAN-95 (is not EM) E= 647 t= 386 Q= 2810 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-17/SLOT-8/CHAN-65 (is not EM) E= 210 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-17/SLOT-10/CHAN-108 (is not EM) E= 748 t= 25784 Q= 3561 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-17/SLOT-10/CHAN-109 (is not EM) E= 943 t= 21118 Q= 3619 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-17/SLOT-12/CHAN-116 (is not EM) E= 568 t= -986 Q= 38 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-17/SLOT-13/CHAN-29 (is not EM) E= 444 t= 3188 Q= 176 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-17/SLOT-10/CHAN-108 (is not EM) E= 748 t= 25784 Q= 3561 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-17/SLOT-10/CHAN-109 (is not EM) E= 943 t= 21118 Q= 3619 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-17/SLOT-12/CHAN-116 (is not EM) E= 568 t= -986 Q= 38 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-17/SLOT-13/CHAN-29 (is not EM) E= 444 t= 3188 Q= 176 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-18/SLOT-2/CHAN-111 (is not EM) E= 126 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-18/SLOT-6/CHAN-53 (is not EM) E= 1329 t= 1116 Q= 2018 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-18/SLOT-6/CHAN-54 (is not EM) E= 372 t= 2379 Q= 1846 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-18/SLOT-7/CHAN-13 (is not EM) E= 551 t= -27 Q= 221 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-18/SLOT-6/CHAN-53 (is not EM) E= 1329 t= 1116 Q= 2018 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-18/SLOT-6/CHAN-54 (is not EM) E= 372 t= 2379 Q= 1846 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-18/SLOT-7/CHAN-13 (is not EM) E= 551 t= -27 Q= 221 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-18/SLOT-8/CHAN-82 (is not EM) E= 193 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-18/SLOT-12/CHAN-85 (is not EM) E= 1503 t= 1029 Q= 77 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-18/SLOT-12/CHAN-85 (is not EM) E= 1503 t= 1029 Q= 77 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-19/SLOT-3/CHAN-104 (is not EM) E= 168 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-19/SLOT-3/CHAN-105 (is not EM) E= 143 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-19/SLOT-3/CHAN-106 (is not EM) E= 222 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-19/SLOT-6/CHAN-116 (is not EM) E= 428 t= 1884 Q= 187 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-19/SLOT-6/CHAN-116 (is not EM) E= 428 t= 1884 Q= 187 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-19/SLOT-8/CHAN-90 (is not EM) E= 197 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-19/SLOT-9/CHAN-87 (is not EM) E= 340 t= 9569 Q= 799 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-19/SLOT-10/CHAN-110 (is not EM) E= 445 t= -214 Q= 2 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-19/SLOT-10/CHAN-116 (is not EM) E= 617 t= 4085 Q= 53 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-19/SLOT-10/CHAN-117 (is not EM) E= 398 t= -2724 Q= 37 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-20/SLOT-1/CHAN-21 (is not EM) E= 1313 t= 3215 Q= 125 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-20/SLOT-1/CHAN-22 (is not EM) E= 1097 t= 917 Q= 29 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-20/SLOT-1/CHAN-29 (is not EM) E= 2188 t= -185 Q= 216 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-20/SLOT-8/CHAN-64 (is not EM) E= 436 t= -24867 Q= 2183 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-20/SLOT-11/CHAN-90 (is not EM) E= 534 t= -2754 Q= 144 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-20/SLOT-13/CHAN-96 (is not EM) E= 607 t= -1038 Q= 11 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-20/SLOT-13/CHAN-100 (is not EM) E= 699 t= -769 Q= 127 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-21/SLOT-3/CHAN-58 (is not EM) E= 293 t= 4848 Q= 147 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-19/SLOT-9/CHAN-87 (is not EM) E= 340 t= 9569 Q= 799 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-19/SLOT-10/CHAN-110 (is not EM) E= 445 t= -214 Q= 2 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-19/SLOT-10/CHAN-116 (is not EM) E= 617 t= 4085 Q= 53 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-19/SLOT-10/CHAN-117 (is not EM) E= 398 t= -2724 Q= 37 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-20/SLOT-1/CHAN-21 (is not EM) E= 1313 t= 3215 Q= 125 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-20/SLOT-1/CHAN-22 (is not EM) E= 1097 t= 917 Q= 29 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-20/SLOT-1/CHAN-29 (is not EM) E= 2188 t= -185 Q= 216 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-20/SLOT-8/CHAN-64 (is not EM) E= 436 t= -24867 Q= 2183 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-20/SLOT-11/CHAN-90 (is not EM) E= 534 t= -2754 Q= 144 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-20/SLOT-13/CHAN-96 (is not EM) E= 607 t= -1038 Q= 11 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-20/SLOT-13/CHAN-100 (is not EM) E= 699 t= -769 Q= 127 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-21/SLOT-3/CHAN-58 (is not EM) E= 293 t= 4848 Q= 147 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-21/SLOT-4/CHAN-43 (is not EM) E= 249 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-21/SLOT-7/CHAN-64 (is not EM) E= 97 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-21/SLOT-9/CHAN-35 (is not EM) E= 291 t= 2069 Q= 57 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-21/SLOT-15/CHAN-106 (is not EM) E= 814 t= 1575 Q= 816 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-22/SLOT-9/CHAN-30 Barrel l/e/p= 1/352/0: E= -1576 t= 7220 Q= 326 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-22/SLOT-10/CHAN-85 Barrel l/e/p= 1/272/0: E= 2795 t= -21527 Q= 70 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-22/SLOT-10/CHAN-89 Barrel l/e/p= 1/264/0: E= 4337 t= -19433 Q= 16 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-23/SLOT-7/CHAN-66 (is not EM) E= 441 t= 1063 Q= 205 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-23/SLOT-9/CHAN-87 (is not EM) E= 330 t= 620 Q= 125 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-23/SLOT-10/CHAN-87 (is not EM) E= 651 t= 5075 Q= 57 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-23/SLOT-12/CHAN-31 (is not EM) E= 744 t= -2327 Q= 134 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-21/SLOT-9/CHAN-35 (is not EM) E= 291 t= 2069 Q= 57 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-21/SLOT-15/CHAN-106 (is not EM) E= 814 t= 1575 Q= 816 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-22/SLOT-9/CHAN-30 Barrel l/e/p= 1/352/0: E= -1576 t= 7220 Q= 326 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-22/SLOT-10/CHAN-85 Barrel l/e/p= 1/272/0: E= 2795 t= -21527 Q= 70 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-22/SLOT-10/CHAN-89 Barrel l/e/p= 1/264/0: E= 4337 t= -19433 Q= 16 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-23/SLOT-7/CHAN-66 (is not EM) E= 441 t= 1063 Q= 205 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-23/SLOT-9/CHAN-87 (is not EM) E= 330 t= 620 Q= 125 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-23/SLOT-10/CHAN-87 (is not EM) E= 651 t= 5075 Q= 57 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-23/SLOT-12/CHAN-31 (is not EM) E= 744 t= -2327 Q= 134 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-24/SLOT-2/CHAN-16 (is not EM) E= 160 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-24/SLOT-2/CHAN-17 (is not EM) E= 128 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-24/SLOT-6/CHAN-86 (is not EM) E= 371 t= 2575 Q= 3897 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-24/SLOT-6/CHAN-92 (is not EM) E= 544 t= 912 Q= 1522 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-24/SLOT-6/CHAN-93 (is not EM) E= 325 t= -3978 Q= 705 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-24/SLOT-7/CHAN-63 (is not EM) E= 447 t= -25550 Q= 60237 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-24/SLOT-7/CHAN-87 (is not EM) E= 517 t= 502 Q= 576 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-24/SLOT-7/CHAN-108 (is not EM) E= 338 t= -54 Q= 807 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-24/SLOT-9/CHAN-27 (is not EM) E= 275 t= -17123 Q= 347 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-24/SLOT-9/CHAN-68 (is not EM) E= 311 t= -1881 Q= 32 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-24/SLOT-12/CHAN-66 (is not EM) E= -492 t= 1253 Q= 6713 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-24/SLOT-12/CHAN-67 (is not EM) E= -434 t= 60 Q= 2688 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-24/SLOT-13/CHAN-92 (is not EM) E= 667 t= -4853 Q= 76 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-24/SLOT-13/CHAN-121 (is not EM) E= 594 t= 3057 Q= 185 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-24/SLOT-6/CHAN-86 (is not EM) E= 371 t= 2575 Q= 3897 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-24/SLOT-6/CHAN-92 (is not EM) E= 544 t= 912 Q= 1522 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-24/SLOT-6/CHAN-93 (is not EM) E= 325 t= -3978 Q= 705 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-24/SLOT-7/CHAN-63 (is not EM) E= 447 t= -25550 Q= 60237 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-24/SLOT-7/CHAN-87 (is not EM) E= 517 t= 502 Q= 576 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-24/SLOT-7/CHAN-108 (is not EM) E= 338 t= -54 Q= 807 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-24/SLOT-9/CHAN-27 (is not EM) E= 275 t= -17123 Q= 347 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-24/SLOT-9/CHAN-68 (is not EM) E= 311 t= -1881 Q= 32 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-24/SLOT-12/CHAN-66 (is not EM) E= -492 t= 1253 Q= 6713 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-24/SLOT-12/CHAN-67 (is not EM) E= -434 t= 60 Q= 2688 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-24/SLOT-13/CHAN-92 (is not EM) E= 667 t= -4853 Q= 76 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-24/SLOT-13/CHAN-121 (is not EM) E= 594 t= 3057 Q= 185 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-0/SLOT-2/CHAN-44 (is not EM) E= 134 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-0/SLOT-2/CHAN-56 (is not EM) E= -177 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-0/SLOT-8/CHAN-106 (is not EM) E= -237 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-1/SLOT-3/CHAN-72 (is not EM) E= 196 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-1/SLOT-7/CHAN-121 (is not EM) E= 339 t= -788 Q= 1021 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-1/SLOT-7/CHAN-121 (is not EM) E= 339 t= -788 Q= 1021 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-1/SLOT-8/CHAN-105 (is not EM) E= 201 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-1/SLOT-12/CHAN-85 (is not EM) E= 648 t= -7233 Q= 175 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-2/SLOT-4/CHAN-14 (is not EM) E= 287 t= 1557 Q= 17 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-2/SLOT-4/CHAN-47 (is not EM) E= 498 t= 3026 Q= 46 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-1/SLOT-12/CHAN-85 (is not EM) E= 648 t= -7233 Q= 175 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-2/SLOT-4/CHAN-14 (is not EM) E= 287 t= 1557 Q= 17 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-2/SLOT-4/CHAN-47 (is not EM) E= 498 t= 3026 Q= 46 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-2/SLOT-4/CHAN-48 (is not EM) E= 214 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-2/SLOT-7/CHAN-11 (is not EM) E= 128 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-2/SLOT-8/CHAN-38 (is not EM) E= 129 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-2/SLOT-8/CHAN-39 (is not EM) E= 128 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-2/SLOT-9/CHAN-16 (is not EM) E= 350 t= 23926 Q= 1332 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-2/SLOT-9/CHAN-16 (is not EM) E= 350 t= 23926 Q= 1332 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-2/SLOT-9/CHAN-67 (is not EM) E= 186 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-2/SLOT-9/CHAN-74 (is not EM) E= 173 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-2/SLOT-9/CHAN-80 (is not EM) E= 132 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-2/SLOT-11/CHAN-118 (is not EM) E= 470 t= 2172 Q= 40 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-2/SLOT-12/CHAN-79 (is not EM) E= 1008 t= 1974 Q= 8180 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-2/SLOT-13/CHAN-2 (is not EM) E= 387 t= -883 Q= 323 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-2/SLOT-13/CHAN-3 (is not EM) E= 550 t= -532 Q= 282 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-2/SLOT-13/CHAN-7 (is not EM) E= 539 t= -896 Q= 200 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-2/SLOT-15/CHAN-62 (is not EM) E= 1114 t= 214 Q= 23 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-3/SLOT-7/CHAN-54 Barrel l/e/p= 0/8/0: E= 2099 t= 4672 Q= 1 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-3/SLOT-8/CHAN-40 Barrel l/e/p= 0/80/0: E= 2713 t= 6693 Q= 112 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-3/SLOT-9/CHAN-20 Barrel l/e/p= 1/8/0: E= 2335 t= -24582 Q= 36 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-3/SLOT-10/CHAN-96 Barrel l/e/p= 2/48/0: E= 6782 t= -401 Q= 779 P=0x21a5 G=1 +Channel: ENDCAP/A-SIDE/FT-2/SLOT-11/CHAN-118 (is not EM) E= 470 t= 2172 Q= 40 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-2/SLOT-12/CHAN-79 (is not EM) E= 1008 t= 1974 Q= 8180 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-2/SLOT-13/CHAN-2 (is not EM) E= 387 t= -883 Q= 323 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-2/SLOT-13/CHAN-3 (is not EM) E= 550 t= -532 Q= 282 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-2/SLOT-13/CHAN-7 (is not EM) E= 539 t= -896 Q= 200 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-2/SLOT-15/CHAN-62 (is not EM) E= 1114 t= 214 Q= 23 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-3/SLOT-7/CHAN-54 Barrel l/e/p= 0/8/0: E= 2099 t= 4672 Q= 1 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-3/SLOT-8/CHAN-40 Barrel l/e/p= 0/80/0: E= 2713 t= 6693 Q= 112 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-3/SLOT-9/CHAN-20 Barrel l/e/p= 1/8/0: E= 2335 t= -24582 Q= 36 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-3/SLOT-10/CHAN-96 Barrel l/e/p= 2/48/0: E= 6782 t= -401 Q= 779 P=0x20a5 G=1 Channel: ENDCAP/A-SIDE/FT-4/SLOT-3/CHAN-61 (is not EM) E= 177 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-4/SLOT-3/CHAN-62 (is not EM) E= 178 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-4/SLOT-5/CHAN-45 (is not EM) E= 232 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-4/SLOT-5/CHAN-46 (is not EM) E= 298 t= 3035 Q= 348 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-4/SLOT-6/CHAN-92 (is not EM) E= 322 t= 1913 Q= 3137 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-4/SLOT-7/CHAN-91 (is not EM) E= 390 t= -332 Q= 1729 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-4/SLOT-12/CHAN-77 (is not EM) E= 744 t= -819 Q= 111 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-4/SLOT-5/CHAN-46 (is not EM) E= 298 t= 3035 Q= 348 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-4/SLOT-6/CHAN-92 (is not EM) E= 322 t= 1913 Q= 3137 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-4/SLOT-7/CHAN-91 (is not EM) E= 390 t= -332 Q= 1729 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-4/SLOT-12/CHAN-77 (is not EM) E= 744 t= -819 Q= 111 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-5/SLOT-3/CHAN-81 (is not EM) E= 149 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-5/SLOT-7/CHAN-31 (is not EM) E= 442 t= 2137 Q= 398 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-5/SLOT-11/CHAN-116 (is not EM) E= 660 t= 1622 Q= 11 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-5/SLOT-13/CHAN-67 (is not EM) E= 792 t= 2761 Q= 161 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-6/SLOT-2/CHAN-43 Barrel l/e/p= 2/32/0: E= 24106 t= -4561 Q= 576 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-6/SLOT-2/CHAN-89 Barrel l/e/p= 1/48/0: E= 9410 t= -2571 Q= 5 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-6/SLOT-3/CHAN-59 Barrel l/e/p= 3/64/0: E= 59504 t= -455 Q= 1264 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-6/SLOT-3/CHAN-96 Barrel l/e/p= 2/336/0: E= 28360 t= 34 Q= 100 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-6/SLOT-10/CHAN-21 Barrel l/e/p= 1/16/0: E= 29130 t= -1312 Q= 352 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-6/SLOT-12/CHAN-73 Barrel l/e/p= 0/176/0: E= 6195 t= 2175 Q= 1 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-6/SLOT-12/CHAN-95 Barrel l/e/p= 1/176/0: E= 18291 t= -778 Q= 149 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-6/SLOT-14/CHAN-6 Barrel l/e/p= 0/304/0: E= 5680 t= -4649 Q= 5 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-6/SLOT-14/CHAN-21 Barrel l/e/p= 0/32/0: E= 5972 t= -15892 Q= 34 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-7/SLOT-1/CHAN-18 (is not EM) E= 930 t= 12929 Q= 2968 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-7/SLOT-1/CHAN-19 (is not EM) E= 2365 t= -393 Q= 171 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-7/SLOT-6/CHAN-36 (is not EM) E= 546 t= -1256 Q= 1717 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-7/SLOT-7/CHAN-106 (is not EM) E= 431 t= 1273 Q= 7828 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-7/SLOT-7/CHAN-107 (is not EM) E= 743 t= 780 Q= 1394 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-5/SLOT-7/CHAN-31 (is not EM) E= 442 t= 2137 Q= 398 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-5/SLOT-11/CHAN-116 (is not EM) E= 660 t= 1622 Q= 11 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-5/SLOT-13/CHAN-67 (is not EM) E= 792 t= 2761 Q= 161 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-6/SLOT-2/CHAN-43 Barrel l/e/p= 2/32/0: E= 24106 t= -4561 Q= 576 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-6/SLOT-2/CHAN-89 Barrel l/e/p= 1/48/0: E= 9410 t= -2571 Q= 5 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-6/SLOT-3/CHAN-59 Barrel l/e/p= 3/64/0: E= 59504 t= -455 Q= 1264 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-6/SLOT-3/CHAN-96 Barrel l/e/p= 2/336/0: E= 28360 t= 34 Q= 100 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-6/SLOT-10/CHAN-21 Barrel l/e/p= 1/16/0: E= 29130 t= -1312 Q= 352 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-6/SLOT-12/CHAN-73 Barrel l/e/p= 0/176/0: E= 6195 t= 2175 Q= 1 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-6/SLOT-12/CHAN-95 Barrel l/e/p= 1/176/0: E= 18291 t= -778 Q= 149 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-6/SLOT-14/CHAN-6 Barrel l/e/p= 0/304/0: E= 5680 t= -4649 Q= 5 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-6/SLOT-14/CHAN-21 Barrel l/e/p= 0/32/0: E= 5972 t= -15892 Q= 34 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-7/SLOT-1/CHAN-18 (is not EM) E= 930 t= 12929 Q= 2968 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-7/SLOT-1/CHAN-19 (is not EM) E= 2365 t= -393 Q= 171 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-7/SLOT-6/CHAN-36 (is not EM) E= 546 t= -1256 Q= 1717 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-7/SLOT-7/CHAN-106 (is not EM) E= 431 t= 1273 Q= 7828 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-7/SLOT-7/CHAN-107 (is not EM) E= 743 t= 780 Q= 1394 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-7/SLOT-8/CHAN-95 (is not EM) E= 221 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-7/SLOT-10/CHAN-6 (is not EM) E= 340 t= -489 Q= 4 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-7/SLOT-13/CHAN-64 (is not EM) E= 628 t= 2812 Q= 416 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-7/SLOT-13/CHAN-106 (is not EM) E= 810 t= -1650 Q= 589 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-7/SLOT-10/CHAN-6 (is not EM) E= 340 t= -489 Q= 4 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-7/SLOT-13/CHAN-64 (is not EM) E= 628 t= 2812 Q= 416 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-7/SLOT-13/CHAN-106 (is not EM) E= 810 t= -1650 Q= 589 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-8/SLOT-3/CHAN-109 (is not EM) E= 187 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-8/SLOT-5/CHAN-109 (is not EM) E= 228 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-8/SLOT-5/CHAN-110 (is not EM) E= 224 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-8/SLOT-6/CHAN-90 (is not EM) E= 742 t= 376 Q= 923 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-8/SLOT-7/CHAN-70 (is not EM) E= 654 t= -4995 Q= 14797 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-8/SLOT-7/CHAN-71 (is not EM) E= 534 t= -2540 Q= 18750 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-8/SLOT-6/CHAN-90 (is not EM) E= 742 t= 376 Q= 923 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-8/SLOT-7/CHAN-70 (is not EM) E= 654 t= -4995 Q= 14797 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-8/SLOT-7/CHAN-71 (is not EM) E= 534 t= -2540 Q= 18750 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-8/SLOT-8/CHAN-40 (is not EM) E= 189 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-8/SLOT-10/CHAN-120 (is not EM) E= 681 t= -194 Q= 3844 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-8/SLOT-12/CHAN-24 (is not EM) E= 519 t= 85 Q= 25 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-9/SLOT-4/CHAN-78 (is not EM) E= 269 t= 3960 Q= 129 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-9/SLOT-4/CHAN-87 (is not EM) E= 295 t= -24565 Q= 1313 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-8/SLOT-10/CHAN-120 (is not EM) E= 681 t= -194 Q= 3844 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-8/SLOT-12/CHAN-24 (is not EM) E= 519 t= 85 Q= 25 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-9/SLOT-4/CHAN-78 (is not EM) E= 269 t= 3960 Q= 129 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-9/SLOT-4/CHAN-87 (is not EM) E= 295 t= -24565 Q= 1313 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-9/SLOT-6/CHAN-2 (is not EM) E= 111 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-9/SLOT-8/CHAN-20 (is not EM) E= 145 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-9/SLOT-10/CHAN-78 (is not EM) E= 481 t= 427 Q= 1 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-9/SLOT-10/CHAN-79 (is not EM) E= 833 t= 1219 Q= 35 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-9/SLOT-10/CHAN-92 (is not EM) E= 548 t= 12102 Q= 209 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-9/SLOT-14/CHAN-68 (is not EM) E= 663 t= -2046 Q= 152 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-9/SLOT-14/CHAN-69 (is not EM) E= 906 t= 1023 Q= 557 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-10/SLOT-5/CHAN-98 Barrel l/e/p= 0/160/0: E= 1644 t= -11001 Q= 206 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-10/SLOT-6/CHAN-0 Barrel l/e/p= 0/192/0: E= 1501 t= 15727 Q= 61 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-11/SLOT-6/CHAN-77 (is not EM) E= 415 t= 3566 Q= 1435 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-11/SLOT-9/CHAN-26 (is not EM) E= 268 t= 18333 Q= 1541 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-11/SLOT-11/CHAN-19 (is not EM) E= 545 t= -6972 Q= 29 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-9/SLOT-10/CHAN-78 (is not EM) E= 481 t= 427 Q= 1 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-9/SLOT-10/CHAN-79 (is not EM) E= 833 t= 1219 Q= 35 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-9/SLOT-10/CHAN-92 (is not EM) E= 548 t= 12102 Q= 209 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-9/SLOT-14/CHAN-68 (is not EM) E= 663 t= -2046 Q= 152 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-9/SLOT-14/CHAN-69 (is not EM) E= 906 t= 1023 Q= 557 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-10/SLOT-5/CHAN-98 Barrel l/e/p= 0/160/0: E= 1644 t= -11001 Q= 206 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-10/SLOT-6/CHAN-0 Barrel l/e/p= 0/192/0: E= 1501 t= 15727 Q= 61 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-11/SLOT-6/CHAN-77 (is not EM) E= 415 t= 3566 Q= 1435 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-11/SLOT-9/CHAN-26 (is not EM) E= 268 t= 18333 Q= 1541 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-11/SLOT-11/CHAN-19 (is not EM) E= 545 t= -6972 Q= 29 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-12/SLOT-3/CHAN-83 (is not EM) E= 147 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-12/SLOT-4/CHAN-64 (is not EM) E= 214 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-12/SLOT-4/CHAN-65 (is not EM) E= 217 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-12/SLOT-5/CHAN-16 (is not EM) E= 247 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-12/SLOT-7/CHAN-119 (is not EM) E= 788 t= 111 Q= 4313 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-12/SLOT-7/CHAN-119 (is not EM) E= 788 t= 111 Q= 4313 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-12/SLOT-8/CHAN-58 (is not EM) E= 203 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-12/SLOT-11/CHAN-90 (is not EM) E= 889 t= 232 Q= 56 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-12/SLOT-11/CHAN-93 (is not EM) E= 437 t= 6402 Q= 25 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-12/SLOT-11/CHAN-94 (is not EM) E= 568 t= 467 Q= 121 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-12/SLOT-11/CHAN-125 (is not EM) E= 788 t= -749 Q= 402 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-12/SLOT-12/CHAN-49 (is not EM) E= 1656 t= -199 Q= 39 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-12/SLOT-13/CHAN-118 (is not EM) E= 843 t= -2943 Q= 930 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-12/SLOT-13/CHAN-119 (is not EM) E= 636 t= -712 Q= 753 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-12/SLOT-11/CHAN-90 (is not EM) E= 889 t= 232 Q= 56 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-12/SLOT-11/CHAN-93 (is not EM) E= 437 t= 6402 Q= 25 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-12/SLOT-11/CHAN-94 (is not EM) E= 568 t= 467 Q= 121 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-12/SLOT-11/CHAN-125 (is not EM) E= 788 t= -749 Q= 402 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-12/SLOT-12/CHAN-49 (is not EM) E= 1656 t= -199 Q= 39 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-12/SLOT-13/CHAN-118 (is not EM) E= 843 t= -2943 Q= 930 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-12/SLOT-13/CHAN-119 (is not EM) E= 636 t= -712 Q= 753 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-13/SLOT-3/CHAN-58 (is not EM) E= 244 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-13/SLOT-5/CHAN-35 (is not EM) E= 418 t= 2147 Q= 354 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-13/SLOT-5/CHAN-35 (is not EM) E= 418 t= 2147 Q= 354 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-13/SLOT-5/CHAN-36 (is not EM) E= 240 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-13/SLOT-7/CHAN-29 (is not EM) E= -513 t= 1700 Q= 65535 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-13/SLOT-9/CHAN-10 (is not EM) E= 300 t= -5803 Q= 29 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-13/SLOT-11/CHAN-82 (is not EM) E= 485 t= 1818 Q= 122 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-13/SLOT-12/CHAN-60 (is not EM) E= 565 t= 2207 Q= 113 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-13/SLOT-7/CHAN-29 (is not EM) E= -513 t= 1700 Q= 65535 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-13/SLOT-9/CHAN-10 (is not EM) E= 300 t= -5803 Q= 29 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-13/SLOT-11/CHAN-82 (is not EM) E= 485 t= 1818 Q= 122 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-13/SLOT-12/CHAN-60 (is not EM) E= 565 t= 2207 Q= 113 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-14/SLOT-4/CHAN-105 (is not EM) E= 218 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-14/SLOT-7/CHAN-109 (is not EM) E= 409 t= -1088 Q= 901 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-14/SLOT-9/CHAN-19 (is not EM) E= 396 t= 824 Q= 65 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-14/SLOT-10/CHAN-47 (is not EM) E= 446 t= -3980 Q= 70 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-14/SLOT-13/CHAN-11 (is not EM) E= 495 t= -29050 Q= 9193 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-14/SLOT-13/CHAN-110 (is not EM) E= 695 t= -992 Q= 30 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-14/SLOT-13/CHAN-113 (is not EM) E= 922 t= 1554 Q= 68 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-14/SLOT-7/CHAN-109 (is not EM) E= 409 t= -1088 Q= 901 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-14/SLOT-9/CHAN-19 (is not EM) E= 396 t= 824 Q= 65 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-14/SLOT-10/CHAN-47 (is not EM) E= 446 t= -3980 Q= 70 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-14/SLOT-13/CHAN-11 (is not EM) E= 495 t= -29050 Q= 9193 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-14/SLOT-13/CHAN-110 (is not EM) E= 695 t= -992 Q= 30 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-14/SLOT-13/CHAN-113 (is not EM) E= 922 t= 1554 Q= 68 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-15/SLOT-6/CHAN-121 (is not EM) E= 140 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-15/SLOT-7/CHAN-53 (is not EM) E= 131 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-15/SLOT-7/CHAN-54 (is not EM) E= 133 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-15/SLOT-10/CHAN-101 (is not EM) E= 481 t= 21992 Q= 163 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-15/SLOT-11/CHAN-20 (is not EM) E= -384 t= 14935 Q= 1504 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-16/SLOT-2/CHAN-124 (is not EM) E= 1853 t= -78 Q= 111 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-16/SLOT-6/CHAN-57 Barrel l/e/p= 0/336/0: E= 1901 t= 1451 Q= 53 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-16/SLOT-8/CHAN-125 Barrel l/e/p= 0/376/0: E= 3066 t= 12653 Q= 353 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-16/SLOT-10/CHAN-18 Barrel l/e/p= 1/320/0: E= 1646 t= -6890 Q= 53 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-17/SLOT-1/CHAN-23 (is not EM) E= 1067 t= 13445 Q= 1747 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-17/SLOT-4/CHAN-20 (is not EM) E= 279 t= -17237 Q= 13669 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-17/SLOT-11/CHAN-49 (is not EM) E= 593 t= 662 Q= 96 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-17/SLOT-13/CHAN-27 (is not EM) E= 528 t= -1257 Q= 72 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-17/SLOT-13/CHAN-31 (is not EM) E= 687 t= 1683 Q= 55 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-17/SLOT-13/CHAN-44 (is not EM) E= 1262 t= -1468 Q= 23 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-17/SLOT-13/CHAN-45 (is not EM) E= 548 t= 1181 Q= 281 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-15/SLOT-10/CHAN-101 (is not EM) E= 481 t= 21992 Q= 163 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-15/SLOT-11/CHAN-20 (is not EM) E= -384 t= 14935 Q= 1504 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-16/SLOT-2/CHAN-124 (is not EM) E= 1853 t= -78 Q= 111 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-16/SLOT-6/CHAN-57 Barrel l/e/p= 0/336/0: E= 1901 t= 1451 Q= 53 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-16/SLOT-8/CHAN-125 Barrel l/e/p= 0/376/0: E= 3066 t= 12653 Q= 353 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-16/SLOT-10/CHAN-18 Barrel l/e/p= 1/320/0: E= 1646 t= -6890 Q= 53 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-17/SLOT-1/CHAN-23 (is not EM) E= 1067 t= 13445 Q= 1747 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-17/SLOT-4/CHAN-20 (is not EM) E= 279 t= -17237 Q= 13669 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-17/SLOT-11/CHAN-49 (is not EM) E= 593 t= 662 Q= 96 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-17/SLOT-13/CHAN-27 (is not EM) E= 528 t= -1257 Q= 72 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-17/SLOT-13/CHAN-31 (is not EM) E= 687 t= 1683 Q= 55 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-17/SLOT-13/CHAN-44 (is not EM) E= 1262 t= -1468 Q= 23 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-17/SLOT-13/CHAN-45 (is not EM) E= 548 t= 1181 Q= 281 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-18/SLOT-3/CHAN-23 (is not EM) E= 168 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-18/SLOT-3/CHAN-24 (is not EM) E= 203 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-18/SLOT-5/CHAN-17 (is not EM) E= -220 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-18/SLOT-5/CHAN-82 (is not EM) E= 236 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-18/SLOT-5/CHAN-83 (is not EM) E= 276 t= 2686 Q= 2210 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-18/SLOT-9/CHAN-110 (is not EM) E= 340 t= 2854 Q= 110 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-18/SLOT-9/CHAN-118 (is not EM) E= 362 t= 27930 Q= 11286 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-19/SLOT-4/CHAN-45 (is not EM) E= 265 t= 11072 Q= 34221 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-19/SLOT-4/CHAN-46 (is not EM) E= 411 t= 2622 Q= 1555 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-19/SLOT-4/CHAN-47 (is not EM) E= 402 t= 133 Q= 605 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-19/SLOT-4/CHAN-48 (is not EM) E= 373 t= 619 Q= 132 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-18/SLOT-5/CHAN-83 (is not EM) E= 276 t= 2686 Q= 2210 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-18/SLOT-9/CHAN-110 (is not EM) E= 340 t= 2854 Q= 110 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-18/SLOT-9/CHAN-118 (is not EM) E= 362 t= 27930 Q= 11286 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-19/SLOT-4/CHAN-45 (is not EM) E= 265 t= 11072 Q= 34221 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-19/SLOT-4/CHAN-46 (is not EM) E= 411 t= 2622 Q= 1555 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-19/SLOT-4/CHAN-47 (is not EM) E= 402 t= 133 Q= 605 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-19/SLOT-4/CHAN-48 (is not EM) E= 373 t= 619 Q= 132 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-19/SLOT-4/CHAN-54 (is not EM) E= 228 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-19/SLOT-4/CHAN-98 (is not EM) E= 474 t= -1222 Q= 2026 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-19/SLOT-7/CHAN-54 (is not EM) E= 431 t= -224 Q= 712 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-19/SLOT-10/CHAN-83 (is not EM) E= 431 t= 247 Q= 24 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-19/SLOT-11/CHAN-24 (is not EM) E= 531 t= -429 Q= 133 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-19/SLOT-13/CHAN-84 (is not EM) E= 722 t= 3108 Q= 133 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-19/SLOT-13/CHAN-88 (is not EM) E= 751 t= 2992 Q= 56 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-19/SLOT-4/CHAN-98 (is not EM) E= 474 t= -1222 Q= 2026 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-19/SLOT-7/CHAN-54 (is not EM) E= 431 t= -224 Q= 712 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-19/SLOT-10/CHAN-83 (is not EM) E= 431 t= 247 Q= 24 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-19/SLOT-11/CHAN-24 (is not EM) E= 531 t= -429 Q= 133 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-19/SLOT-13/CHAN-84 (is not EM) E= 722 t= 3108 Q= 133 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-19/SLOT-13/CHAN-88 (is not EM) E= 751 t= 2992 Q= 56 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-20/SLOT-2/CHAN-79 (is not EM) E= 154 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-20/SLOT-4/CHAN-22 (is not EM) E= 285 t= -96 Q= 596 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-20/SLOT-4/CHAN-23 (is not EM) E= 262 t= -687 Q= 892 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-20/SLOT-6/CHAN-68 (is not EM) E= 350 t= -353 Q= 300 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-20/SLOT-7/CHAN-93 (is not EM) E= 423 t= -35047 Q= 65535 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-20/SLOT-7/CHAN-122 (is not EM) E= 347 t= -1402 Q= 328 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-20/SLOT-4/CHAN-22 (is not EM) E= 285 t= -96 Q= 596 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-20/SLOT-4/CHAN-23 (is not EM) E= 262 t= -687 Q= 892 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-20/SLOT-6/CHAN-68 (is not EM) E= 350 t= -353 Q= 300 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-20/SLOT-7/CHAN-93 (is not EM) E= 423 t= -35047 Q= 65535 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-20/SLOT-7/CHAN-122 (is not EM) E= 347 t= -1402 Q= 328 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-20/SLOT-8/CHAN-67 (is not EM) E= 216 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-20/SLOT-9/CHAN-0 (is not EM) E= 623 t= -23691 Q= 8570 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-20/SLOT-9/CHAN-1 (is not EM) E= 271 t= -18017 Q= 1116 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-20/SLOT-9/CHAN-77 (is not EM) E= 300 t= -678 Q= 306 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-20/SLOT-9/CHAN-99 (is not EM) E= 424 t= 23139 Q= 5749 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-20/SLOT-9/CHAN-102 (is not EM) E= 427 t= -797 Q= 86 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-20/SLOT-11/CHAN-72 (is not EM) E= 439 t= -6545 Q= 32 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-20/SLOT-11/CHAN-73 (is not EM) E= 421 t= -919 Q= 18 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-20/SLOT-11/CHAN-80 (is not EM) E= 533 t= 15230 Q= 1626 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-20/SLOT-11/CHAN-81 (is not EM) E= -515 t= -5071 Q= 57056 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-20/SLOT-11/CHAN-82 (is not EM) E= -509 t= -5952 Q= 43492 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-20/SLOT-11/CHAN-108 (is not EM) E= 611 t= 20459 Q= 4090 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-20/SLOT-13/CHAN-20 (is not EM) E= 885 t= -24877 Q= 6746 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-20/SLOT-13/CHAN-21 (is not EM) E= 495 t= -23041 Q= 3775 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-21/SLOT-1/CHAN-36 (is not EM) E= 756 t= -9628 Q= 50 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-20/SLOT-9/CHAN-0 (is not EM) E= 623 t= -23691 Q= 8570 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-20/SLOT-9/CHAN-1 (is not EM) E= 271 t= -18017 Q= 1116 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-20/SLOT-9/CHAN-77 (is not EM) E= 300 t= -678 Q= 306 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-20/SLOT-9/CHAN-99 (is not EM) E= 424 t= 23139 Q= 5749 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-20/SLOT-9/CHAN-102 (is not EM) E= 427 t= -797 Q= 86 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-20/SLOT-11/CHAN-72 (is not EM) E= 439 t= -6545 Q= 32 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-20/SLOT-11/CHAN-73 (is not EM) E= 421 t= -919 Q= 18 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-20/SLOT-11/CHAN-80 (is not EM) E= 533 t= 15230 Q= 1626 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-20/SLOT-11/CHAN-81 (is not EM) E= -515 t= -5071 Q= 57056 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-20/SLOT-11/CHAN-82 (is not EM) E= -509 t= -5952 Q= 43492 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-20/SLOT-11/CHAN-108 (is not EM) E= 611 t= 20459 Q= 4090 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-20/SLOT-13/CHAN-20 (is not EM) E= 885 t= -24877 Q= 6746 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-20/SLOT-13/CHAN-21 (is not EM) E= 495 t= -23041 Q= 3775 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-21/SLOT-1/CHAN-36 (is not EM) E= 756 t= -9628 Q= 50 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-21/SLOT-4/CHAN-84 (is not EM) E= 244 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-21/SLOT-7/CHAN-4 (is not EM) E= 128 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-21/SLOT-7/CHAN-5 (is not EM) E= 99 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-21/SLOT-7/CHAN-35 (is not EM) E= 118 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-21/SLOT-7/CHAN-36 (is not EM) E= 231 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-21/SLOT-7/CHAN-37 (is not EM) E= 334 t= -15885 Q= 16384 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-21/SLOT-7/CHAN-37 (is not EM) E= 334 t= -15885 Q= 16384 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-21/SLOT-7/CHAN-38 (is not EM) E= 136 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-21/SLOT-7/CHAN-48 (is not EM) E= 148 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-21/SLOT-7/CHAN-52 (is not EM) E= 147 t= 0 Q= 0 P=0xa5 G=0 @@ -946,33 +946,33 @@ Channel: ENDCAP/A-SIDE/FT-21/SLOT-7/CHAN-96 (is not EM) E= 228 t= 0 Q= 0 P=0xa5 Channel: ENDCAP/A-SIDE/FT-21/SLOT-7/CHAN-97 (is not EM) E= 218 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-21/SLOT-7/CHAN-98 (is not EM) E= 104 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-21/SLOT-8/CHAN-1 (is not EM) E= 131 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-21/SLOT-8/CHAN-2 (is not EM) E= 336 t= 2708 Q= 801 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-21/SLOT-8/CHAN-2 (is not EM) E= 336 t= 2708 Q= 801 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-21/SLOT-9/CHAN-0 (is not EM) E= 154 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-21/SLOT-11/CHAN-16 (is not EM) E= 332 t= -13129 Q= 79 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-21/SLOT-14/CHAN-2 (is not EM) E= 1368 t= 30521 Q= 64126 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-21/SLOT-14/CHAN-19 (is not EM) E= 1773 t= 34145 Q= 65535 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-21/SLOT-14/CHAN-69 (is not EM) E= 673 t= 95020 Q= 65535 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-22/SLOT-1/CHAN-97 (is not EM) E= 6981 t= -3359 Q= 223 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-22/SLOT-2/CHAN-33 (is not EM) E= 711 t= 1857 Q= 4 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-22/SLOT-2/CHAN-102 (is not EM) E= 845 t= 4401 Q= 11 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-22/SLOT-2/CHAN-103 (is not EM) E= 727 t= 7238 Q= 20 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-22/SLOT-7/CHAN-112 Barrel l/e/p= 0/416/0: E= 2897 t= 16957 Q= 293 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-22/SLOT-7/CHAN-116 Barrel l/e/p= 0/424/0: E= 2446 t= 208 Q= 183 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-22/SLOT-10/CHAN-16 Barrel l/e/p= 1/448/0: E= 4185 t= -852 Q= 25 P=0x21a5 G=1 +Channel: ENDCAP/A-SIDE/FT-21/SLOT-11/CHAN-16 (is not EM) E= 332 t= -13129 Q= 79 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-21/SLOT-14/CHAN-2 (is not EM) E= 1368 t= 30521 Q= 64126 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-21/SLOT-14/CHAN-19 (is not EM) E= 1773 t= 34145 Q= 65535 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-21/SLOT-14/CHAN-69 (is not EM) E= 673 t= 95020 Q= 65535 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-22/SLOT-1/CHAN-97 (is not EM) E= 6981 t= -3359 Q= 223 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-22/SLOT-2/CHAN-33 (is not EM) E= 711 t= 1857 Q= 4 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-22/SLOT-2/CHAN-102 (is not EM) E= 845 t= 4401 Q= 11 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-22/SLOT-2/CHAN-103 (is not EM) E= 727 t= 7238 Q= 20 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-22/SLOT-7/CHAN-112 Barrel l/e/p= 0/416/0: E= 2897 t= 16957 Q= 293 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-22/SLOT-7/CHAN-116 Barrel l/e/p= 0/424/0: E= 2446 t= 208 Q= 183 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-22/SLOT-10/CHAN-16 Barrel l/e/p= 1/448/0: E= 4185 t= -852 Q= 25 P=0x20a5 G=1 Channel: ENDCAP/A-SIDE/FT-23/SLOT-3/CHAN-42 (is not EM) E= 166 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-23/SLOT-3/CHAN-43 (is not EM) E= 313 t= 3126 Q= 219 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-23/SLOT-4/CHAN-119 (is not EM) E= 297 t= 4098 Q= 3085 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-23/SLOT-12/CHAN-48 (is not EM) E= 469 t= 40342 Q= 8562 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-23/SLOT-12/CHAN-82 (is not EM) E= 543 t= 581 Q= 89 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-24/SLOT-7/CHAN-117 (is not EM) E= 485 t= -22695 Q= 65535 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-24/SLOT-10/CHAN-91 (is not EM) E= -570 t= 1794 Q= 2568 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-23/SLOT-3/CHAN-43 (is not EM) E= 313 t= 3126 Q= 219 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-23/SLOT-4/CHAN-119 (is not EM) E= 297 t= 4098 Q= 3085 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-23/SLOT-12/CHAN-48 (is not EM) E= 469 t= 40342 Q= 8562 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-23/SLOT-12/CHAN-82 (is not EM) E= 543 t= 581 Q= 89 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-24/SLOT-7/CHAN-117 (is not EM) E= 485 t= -22695 Q= 65535 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-24/SLOT-10/CHAN-91 (is not EM) E= -570 t= 1794 Q= 2568 P=0x20a5 G=0 Event 2 contains 967 channels Channel: BARREL/C-SIDE/FT-0/SLOT-2/CHAN-47 (is not EM) E= 106 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-0/SLOT-4/CHAN-36 (is not EM) E= 91 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-0/SLOT-6/CHAN-96 (is not EM) E= 82 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-0/SLOT-9/CHAN-56 (is not EM) E= 155 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-0/SLOT-11/CHAN-102 (is not EM) E= -281 t= 218 Q= 356 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-1/SLOT-1/CHAN-111 (is not EM) E= 800 t= 8476 Q= 697 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-0/SLOT-11/CHAN-102 (is not EM) E= -281 t= 218 Q= 356 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-1/SLOT-1/CHAN-111 (is not EM) E= 800 t= 8476 Q= 697 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-1/SLOT-2/CHAN-13 (is not EM) E= 118 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-1/SLOT-2/CHAN-14 (is not EM) E= 198 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-1/SLOT-3/CHAN-102 (is not EM) E= 118 t= 0 Q= 0 P=0xa5 G=0 @@ -981,23 +981,23 @@ Channel: BARREL/C-SIDE/FT-1/SLOT-7/CHAN-79 (is not EM) E= 93 t= 0 Q= 0 P=0xa5 G= Channel: BARREL/C-SIDE/FT-1/SLOT-8/CHAN-49 (is not EM) E= 90 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-1/SLOT-9/CHAN-8 (is not EM) E= -93 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-1/SLOT-9/CHAN-48 (is not EM) E= 166 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-2/SLOT-2/CHAN-68 (is not EM) E= 290 t= -547 Q= 132 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-2/SLOT-2/CHAN-69 (is not EM) E= 320 t= 880 Q= 63 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-2/SLOT-2/CHAN-68 (is not EM) E= 290 t= -547 Q= 132 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-2/SLOT-2/CHAN-69 (is not EM) E= 320 t= 880 Q= 63 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-2/SLOT-4/CHAN-45 (is not EM) E= 135 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-2/SLOT-6/CHAN-78 (is not EM) E= 83 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-2/SLOT-6/CHAN-101 (is not EM) E= -75 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-2/SLOT-9/CHAN-77 (is not EM) E= 174 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-2/SLOT-9/CHAN-99 (is not EM) E= 86 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-2/SLOT-10/CHAN-68 (is not EM) E= 223 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-2/SLOT-11/CHAN-19 (is not EM) E= 807 t= -1448 Q= 95 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-2/SLOT-11/CHAN-64 (is not EM) E= 410 t= -4660 Q= 23 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-2/SLOT-11/CHAN-65 (is not EM) E= 383 t= -8556 Q= 90 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-2/SLOT-12/CHAN-65 (is not EM) E= 375 t= -22494 Q= 6491 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-2/SLOT-11/CHAN-19 (is not EM) E= 807 t= -1448 Q= 95 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-2/SLOT-11/CHAN-64 (is not EM) E= 410 t= -4660 Q= 23 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-2/SLOT-11/CHAN-65 (is not EM) E= 383 t= -8556 Q= 90 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-2/SLOT-12/CHAN-65 (is not EM) E= 375 t= -22494 Q= 6491 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-3/SLOT-5/CHAN-57 (is not EM) E= 99 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-3/SLOT-6/CHAN-44 (is not EM) E= 75 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-3/SLOT-11/CHAN-33 (is not EM) E= 262 t= 2148 Q= 226 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-3/SLOT-11/CHAN-66 (is not EM) E= 364 t= 3787 Q= 52 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-4/SLOT-1/CHAN-54 (is not EM) E= 462 t= -6638 Q= 244 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-3/SLOT-11/CHAN-33 (is not EM) E= 262 t= 2148 Q= 226 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-3/SLOT-11/CHAN-66 (is not EM) E= 364 t= 3787 Q= 52 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-4/SLOT-1/CHAN-54 (is not EM) E= 462 t= -6638 Q= 244 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-4/SLOT-2/CHAN-8 (is not EM) E= 81 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-4/SLOT-3/CHAN-65 (is not EM) E= 173 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-4/SLOT-3/CHAN-66 (is not EM) E= 164 t= 0 Q= 0 P=0xa5 G=0 @@ -1008,10 +1008,10 @@ Channel: BARREL/C-SIDE/FT-4/SLOT-5/CHAN-68 (is not EM) E= 125 t= 0 Q= 0 P=0xa5 G Channel: BARREL/C-SIDE/FT-4/SLOT-7/CHAN-6 (is not EM) E= 96 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-4/SLOT-7/CHAN-7 (is not EM) E= 105 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-4/SLOT-9/CHAN-36 (is not EM) E= -128 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-4/SLOT-11/CHAN-73 (is not EM) E= 468 t= -2646 Q= 126 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-4/SLOT-11/CHAN-73 (is not EM) E= 468 t= -2646 Q= 126 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-4/SLOT-11/CHAN-77 (is not EM) E= 222 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-4/SLOT-12/CHAN-59 (is not EM) E= 238 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-4/SLOT-12/CHAN-120 (is not EM) E= 476 t= 1850 Q= 702 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-4/SLOT-12/CHAN-120 (is not EM) E= 476 t= 1850 Q= 702 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-4/SLOT-12/CHAN-126 (is not EM) E= -222 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-5/SLOT-2/CHAN-87 (is not EM) E= -85 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-5/SLOT-2/CHAN-88 (is not EM) E= -199 t= 0 Q= 0 P=0xa5 G=0 @@ -1027,19 +1027,19 @@ Channel: BARREL/C-SIDE/FT-5/SLOT-4/CHAN-30 (is not EM) E= 125 t= 0 Q= 0 P=0xa5 G Channel: BARREL/C-SIDE/FT-5/SLOT-4/CHAN-31 (is not EM) E= 106 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-5/SLOT-5/CHAN-35 (is not EM) E= -94 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-5/SLOT-10/CHAN-6 (is not EM) E= 122 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-5/SLOT-11/CHAN-79 (is not EM) E= -852 t= -3588 Q= 9623 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-6/SLOT-1/CHAN-47 (is not EM) E= 425 t= 5423 Q= 26 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-5/SLOT-11/CHAN-79 (is not EM) E= -852 t= -3588 Q= 9623 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-6/SLOT-1/CHAN-47 (is not EM) E= 425 t= 5423 Q= 26 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-6/SLOT-3/CHAN-8 (is not EM) E= 119 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-6/SLOT-7/CHAN-9 (is not EM) E= 91 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-6/SLOT-8/CHAN-81 (is not EM) E= 116 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-6/SLOT-9/CHAN-13 (is not EM) E= -106 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-6/SLOT-9/CHAN-28 (is not EM) E= -83 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-6/SLOT-11/CHAN-12 (is not EM) E= -346 t= -5697 Q= 1786 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-6/SLOT-12/CHAN-23 (is not EM) E= 803 t= 2678 Q= 46 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-6/SLOT-12/CHAN-125 (is not EM) E= 451 t= -10321 Q= 203 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-6/SLOT-12/CHAN-126 (is not EM) E= 579 t= -12711 Q= 807 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-6/SLOT-13/CHAN-36 (is not EM) E= 349 t= -15784 Q= 54 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-6/SLOT-13/CHAN-37 (is not EM) E= 536 t= -2084 Q= 8 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-6/SLOT-11/CHAN-12 (is not EM) E= -346 t= -5697 Q= 1786 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-6/SLOT-12/CHAN-23 (is not EM) E= 803 t= 2678 Q= 46 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-6/SLOT-12/CHAN-125 (is not EM) E= 451 t= -10321 Q= 203 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-6/SLOT-12/CHAN-126 (is not EM) E= 579 t= -12711 Q= 807 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-6/SLOT-13/CHAN-36 (is not EM) E= 349 t= -15784 Q= 54 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-6/SLOT-13/CHAN-37 (is not EM) E= 536 t= -2084 Q= 8 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-7/SLOT-2/CHAN-19 (is not EM) E= 121 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-7/SLOT-2/CHAN-20 (is not EM) E= 98 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-7/SLOT-2/CHAN-22 (is not EM) E= 89 t= 0 Q= 0 P=0xa5 G=0 @@ -1059,48 +1059,48 @@ Channel: BARREL/C-SIDE/FT-8/SLOT-4/CHAN-79 (is not EM) E= 90 t= 0 Q= 0 P=0xa5 G= Channel: BARREL/C-SIDE/FT-8/SLOT-4/CHAN-125 (is not EM) E= 146 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-8/SLOT-5/CHAN-2 (is not EM) E= 154 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-8/SLOT-6/CHAN-47 (is not EM) E= 138 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-9/SLOT-1/CHAN-9 (is not EM) E= 425 t= -961 Q= 163 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-9/SLOT-1/CHAN-9 (is not EM) E= 425 t= -961 Q= 163 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-9/SLOT-2/CHAN-82 (is not EM) E= 102 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-9/SLOT-7/CHAN-65 (is not EM) E= -98 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-9/SLOT-9/CHAN-55 (is not EM) E= 140 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-9/SLOT-12/CHAN-108 (is not EM) E= 299 t= -4705 Q= 178 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-9/SLOT-13/CHAN-111 (is not EM) E= 418 t= 5991 Q= 59 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-10/SLOT-1/CHAN-45 (is not EM) E= 432 t= -10691 Q= 1759 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-9/SLOT-12/CHAN-108 (is not EM) E= 299 t= -4705 Q= 178 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-9/SLOT-13/CHAN-111 (is not EM) E= 418 t= 5991 Q= 59 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-10/SLOT-1/CHAN-45 (is not EM) E= 432 t= -10691 Q= 1759 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-10/SLOT-2/CHAN-46 (is not EM) E= 95 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-10/SLOT-10/CHAN-19 (is not EM) E= -169 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-10/SLOT-12/CHAN-71 (is not EM) E= -278 t= 6892 Q= 90 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-10/SLOT-13/CHAN-94 (is not EM) E= 365 t= 4145 Q= 24 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-10/SLOT-13/CHAN-123 (is not EM) E= 396 t= 5532 Q= 7 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-10/SLOT-12/CHAN-71 (is not EM) E= -278 t= 6892 Q= 90 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-10/SLOT-13/CHAN-94 (is not EM) E= 365 t= 4145 Q= 24 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-10/SLOT-13/CHAN-123 (is not EM) E= 396 t= 5532 Q= 7 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-11/SLOT-2/CHAN-63 (is not EM) E= 122 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-11/SLOT-6/CHAN-122 (is not EM) E= -103 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-11/SLOT-8/CHAN-0 (is not EM) E= 109 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-11/SLOT-8/CHAN-1 (is not EM) E= 197 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-11/SLOT-8/CHAN-45 (is not EM) E= -90 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-11/SLOT-9/CHAN-30 (is not EM) E= 84 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-11/SLOT-13/CHAN-56 (is not EM) E= 426 t= -242 Q= 26 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-11/SLOT-13/CHAN-56 (is not EM) E= 426 t= -242 Q= 26 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-12/SLOT-3/CHAN-28 (is not EM) E= 102 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-12/SLOT-3/CHAN-29 (is not EM) E= 93 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-12/SLOT-3/CHAN-84 (is not EM) E= 117 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-12/SLOT-3/CHAN-85 (is not EM) E= 94 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-12/SLOT-11/CHAN-40 (is not EM) E= 266 t= 4130 Q= 17 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-12/SLOT-12/CHAN-83 (is not EM) E= -320 t= -1028 Q= 909 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-12/SLOT-13/CHAN-52 (is not EM) E= 326 t= -16981 Q= 127 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-12/SLOT-14/CHAN-22 (is not EM) E= 320 t= -32385 Q= 116 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-12/SLOT-14/CHAN-23 (is not EM) E= 341 t= -23392 Q= 54 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-13/SLOT-1/CHAN-83 (is not EM) E= 564 t= 2972 Q= 267 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-12/SLOT-11/CHAN-40 (is not EM) E= 266 t= 4130 Q= 17 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-12/SLOT-12/CHAN-83 (is not EM) E= -320 t= -1028 Q= 909 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-12/SLOT-13/CHAN-52 (is not EM) E= 326 t= -16981 Q= 127 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-12/SLOT-14/CHAN-22 (is not EM) E= 320 t= -32385 Q= 116 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-12/SLOT-14/CHAN-23 (is not EM) E= 341 t= -23392 Q= 54 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-13/SLOT-1/CHAN-83 (is not EM) E= 564 t= 2972 Q= 267 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-13/SLOT-3/CHAN-95 (is not EM) E= 94 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-13/SLOT-5/CHAN-35 (is not EM) E= 178 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-13/SLOT-10/CHAN-127 (is not EM) E= 586 t= -3041 Q= 201 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-13/SLOT-10/CHAN-127 (is not EM) E= 586 t= -3041 Q= 201 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-13/SLOT-11/CHAN-20 (is not EM) E= -211 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-13/SLOT-13/CHAN-66 (is not EM) E= 463 t= 823 Q= 32 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-13/SLOT-14/CHAN-60 (is not EM) E= 706 t= -1817 Q= 27 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-14/SLOT-1/CHAN-27 (is not EM) E= 450 t= -5296 Q= 4 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-13/SLOT-13/CHAN-66 (is not EM) E= 463 t= 823 Q= 32 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-13/SLOT-14/CHAN-60 (is not EM) E= 706 t= -1817 Q= 27 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-14/SLOT-1/CHAN-27 (is not EM) E= 450 t= -5296 Q= 4 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-14/SLOT-3/CHAN-59 (is not EM) E= 145 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-14/SLOT-3/CHAN-60 (is not EM) E= 132 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-14/SLOT-3/CHAN-63 (is not EM) E= 87 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-14/SLOT-8/CHAN-91 (is not EM) E= -85 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-14/SLOT-13/CHAN-102 (is not EM) E= -339 t= -22790 Q= 943 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-15/SLOT-1/CHAN-81 (is not EM) E= -596 t= 5258 Q= 2908 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-14/SLOT-13/CHAN-102 (is not EM) E= -339 t= -22790 Q= 943 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-15/SLOT-1/CHAN-81 (is not EM) E= -596 t= 5258 Q= 2908 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-15/SLOT-3/CHAN-8 (is not EM) E= 88 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-15/SLOT-3/CHAN-40 (is not EM) E= 100 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-15/SLOT-7/CHAN-13 (is not EM) E= -96 t= 0 Q= 0 P=0xa5 G=0 @@ -1111,9 +1111,9 @@ Channel: BARREL/C-SIDE/FT-15/SLOT-7/CHAN-98 (is not EM) E= -94 t= 0 Q= 0 P=0xa5 Channel: BARREL/C-SIDE/FT-15/SLOT-7/CHAN-99 (is not EM) E= -143 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-15/SLOT-7/CHAN-100 (is not EM) E= -94 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-15/SLOT-10/CHAN-75 (is not EM) E= 120 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-15/SLOT-11/CHAN-108 (is not EM) E= 274 t= -26151 Q= 748 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-15/SLOT-13/CHAN-41 (is not EM) E= -286 t= -21779 Q= 742 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-15/SLOT-13/CHAN-112 (is not EM) E= -286 t= -6307 Q= 508 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-15/SLOT-11/CHAN-108 (is not EM) E= 274 t= -26151 Q= 748 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-15/SLOT-13/CHAN-41 (is not EM) E= -286 t= -21779 Q= 742 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-15/SLOT-13/CHAN-112 (is not EM) E= -286 t= -6307 Q= 508 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-16/SLOT-3/CHAN-79 (is not EM) E= 130 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-16/SLOT-3/CHAN-117 (is not EM) E= 216 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-16/SLOT-3/CHAN-118 (is not EM) E= 87 t= 0 Q= 0 P=0xa5 G=0 @@ -1126,24 +1126,24 @@ Channel: BARREL/C-SIDE/FT-16/SLOT-9/CHAN-7 (is not EM) E= 96 t= 0 Q= 0 P=0xa5 G= Channel: BARREL/C-SIDE/FT-16/SLOT-9/CHAN-39 (is not EM) E= -94 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-16/SLOT-10/CHAN-76 (is not EM) E= -118 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-16/SLOT-11/CHAN-11 (is not EM) E= 247 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-16/SLOT-11/CHAN-15 (is not EM) E= 514 t= 2068 Q= 8 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-16/SLOT-12/CHAN-42 (is not EM) E= -263 t= 3954 Q= 252 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-16/SLOT-12/CHAN-56 (is not EM) E= 276 t= -20714 Q= 420 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-16/SLOT-11/CHAN-15 (is not EM) E= 514 t= 2068 Q= 8 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-16/SLOT-12/CHAN-42 (is not EM) E= -263 t= 3954 Q= 252 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-16/SLOT-12/CHAN-56 (is not EM) E= 276 t= -20714 Q= 420 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-16/SLOT-12/CHAN-57 (is not EM) E= 249 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-16/SLOT-12/CHAN-60 (is not EM) E= 364 t= -22351 Q= 1343 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-16/SLOT-12/CHAN-107 (is not EM) E= 298 t= -969 Q= 21 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-16/SLOT-13/CHAN-17 (is not EM) E= 275 t= -29387 Q= 56 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-16/SLOT-13/CHAN-92 (is not EM) E= 304 t= 12253 Q= 81 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-16/SLOT-14/CHAN-33 (is not EM) E= 529 t= -26639 Q= 455 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-16/SLOT-14/CHAN-59 (is not EM) E= 587 t= -22265 Q= 523 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-16/SLOT-12/CHAN-60 (is not EM) E= 364 t= -22351 Q= 1343 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-16/SLOT-12/CHAN-107 (is not EM) E= 298 t= -969 Q= 21 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-16/SLOT-13/CHAN-17 (is not EM) E= 275 t= -29387 Q= 56 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-16/SLOT-13/CHAN-92 (is not EM) E= 304 t= 12253 Q= 81 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-16/SLOT-14/CHAN-33 (is not EM) E= 529 t= -26639 Q= 455 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-16/SLOT-14/CHAN-59 (is not EM) E= 587 t= -22265 Q= 523 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-17/SLOT-3/CHAN-8 (is not EM) E= 128 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-17/SLOT-3/CHAN-62 (is not EM) E= 117 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-17/SLOT-3/CHAN-63 (is not EM) E= 543 t= 1342 Q= 510 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-17/SLOT-3/CHAN-63 (is not EM) E= 543 t= 1342 Q= 510 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-17/SLOT-4/CHAN-0 (is not EM) E= 168 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-17/SLOT-11/CHAN-32 (is not EM) E= 277 t= -27710 Q= 5746 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-17/SLOT-11/CHAN-36 (is not EM) E= 770 t= -22309 Q= 45414 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-17/SLOT-11/CHAN-62 (is not EM) E= 561 t= -1490 Q= 563 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-17/SLOT-12/CHAN-2 (is not EM) E= 374 t= 6068 Q= 3 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-17/SLOT-11/CHAN-32 (is not EM) E= 277 t= -27710 Q= 5746 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-17/SLOT-11/CHAN-36 (is not EM) E= 770 t= -22309 Q= 45414 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-17/SLOT-11/CHAN-62 (is not EM) E= 561 t= -1490 Q= 563 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-17/SLOT-12/CHAN-2 (is not EM) E= 374 t= 6068 Q= 3 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-18/SLOT-2/CHAN-100 (is not EM) E= 95 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-18/SLOT-2/CHAN-101 (is not EM) E= 177 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-18/SLOT-2/CHAN-102 (is not EM) E= 108 t= 0 Q= 0 P=0xa5 G=0 @@ -1155,46 +1155,46 @@ Channel: BARREL/C-SIDE/FT-18/SLOT-5/CHAN-71 (is not EM) E= 120 t= 0 Q= 0 P=0xa5 Channel: BARREL/C-SIDE/FT-18/SLOT-5/CHAN-72 (is not EM) E= 100 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-18/SLOT-5/CHAN-75 (is not EM) E= 90 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-18/SLOT-7/CHAN-86 (is not EM) E= 87 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-18/SLOT-7/CHAN-87 (is not EM) E= 271 t= -15549 Q= 65535 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-18/SLOT-7/CHAN-87 (is not EM) E= 271 t= -15549 Q= 65535 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-18/SLOT-8/CHAN-12 (is not EM) E= 85 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-18/SLOT-8/CHAN-64 (is not EM) E= 84 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-18/SLOT-9/CHAN-29 (is not EM) E= 88 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-18/SLOT-10/CHAN-61 (is not EM) E= 602 t= -2530 Q= 36 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-18/SLOT-10/CHAN-61 (is not EM) E= 602 t= -2530 Q= 36 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-18/SLOT-10/CHAN-91 (is not EM) E= 169 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-18/SLOT-10/CHAN-95 (is not EM) E= 184 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-18/SLOT-10/CHAN-99 (is not EM) E= 399 t= -12540 Q= 600 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-18/SLOT-10/CHAN-99 (is not EM) E= 399 t= -12540 Q= 600 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-18/SLOT-11/CHAN-56 (is not EM) E= 246 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-18/SLOT-12/CHAN-61 (is not EM) E= 221 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-18/SLOT-12/CHAN-114 (is not EM) E= 371 t= 196 Q= 101 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-18/SLOT-12/CHAN-118 (is not EM) E= 259 t= 778 Q= 8 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-18/SLOT-13/CHAN-4 (is not EM) E= 365 t= -42618 Q= 420 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-18/SLOT-13/CHAN-105 (is not EM) E= 316 t= -63084 Q= 2503 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-18/SLOT-13/CHAN-106 (is not EM) E= 305 t= -60512 Q= 2103 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-18/SLOT-12/CHAN-114 (is not EM) E= 371 t= 196 Q= 101 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-18/SLOT-12/CHAN-118 (is not EM) E= 259 t= 778 Q= 8 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-18/SLOT-13/CHAN-4 (is not EM) E= 365 t= -42618 Q= 420 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-18/SLOT-13/CHAN-105 (is not EM) E= 316 t= -63084 Q= 2503 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-18/SLOT-13/CHAN-106 (is not EM) E= 305 t= -60512 Q= 2103 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-19/SLOT-4/CHAN-102 (is not EM) E= 93 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-19/SLOT-4/CHAN-116 (is not EM) E= 99 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-19/SLOT-6/CHAN-50 (is not EM) E= 215 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-19/SLOT-6/CHAN-51 (is not EM) E= 148 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-19/SLOT-12/CHAN-55 (is not EM) E= 320 t= 9679 Q= 45 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-19/SLOT-12/CHAN-90 (is not EM) E= 689 t= -19603 Q= 3018 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-19/SLOT-12/CHAN-112 (is not EM) E= 1052 t= -419 Q= 22 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-19/SLOT-12/CHAN-116 (is not EM) E= 730 t= -953 Q= 289 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-19/SLOT-13/CHAN-25 (is not EM) E= 285 t= 805 Q= 7 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-19/SLOT-12/CHAN-55 (is not EM) E= 320 t= 9679 Q= 45 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-19/SLOT-12/CHAN-90 (is not EM) E= 689 t= -19603 Q= 3018 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-19/SLOT-12/CHAN-112 (is not EM) E= 1052 t= -419 Q= 22 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-19/SLOT-12/CHAN-116 (is not EM) E= 730 t= -953 Q= 289 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-19/SLOT-13/CHAN-25 (is not EM) E= 285 t= 805 Q= 7 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-20/SLOT-2/CHAN-57 (is not EM) E= 93 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-20/SLOT-3/CHAN-63 (is not EM) E= -115 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-20/SLOT-5/CHAN-122 (is not EM) E= -127 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-20/SLOT-5/CHAN-123 (is not EM) E= -151 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-20/SLOT-6/CHAN-31 (is not EM) E= 83 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-20/SLOT-12/CHAN-125 (is not EM) E= -242 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-21/SLOT-1/CHAN-117 (is not EM) E= 906 t= -12546 Q= 2524 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-21/SLOT-1/CHAN-117 (is not EM) E= 906 t= -12546 Q= 2524 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-21/SLOT-3/CHAN-39 (is not EM) E= -89 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-21/SLOT-5/CHAN-49 (is not EM) E= 180 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-21/SLOT-7/CHAN-25 (is not EM) E= 76 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-21/SLOT-7/CHAN-26 (is not EM) E= 153 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-21/SLOT-7/CHAN-27 (is not EM) E= 129 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-21/SLOT-10/CHAN-116 (is not EM) E= 192 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-21/SLOT-10/CHAN-117 (is not EM) E= 286 t= 2543 Q= 47 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-21/SLOT-10/CHAN-125 (is not EM) E= 375 t= -6533 Q= 77 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-22/SLOT-1/CHAN-82 (is not EM) E= 712 t= -6914 Q= 3926 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-21/SLOT-10/CHAN-117 (is not EM) E= 286 t= 2543 Q= 47 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-21/SLOT-10/CHAN-125 (is not EM) E= 375 t= -6533 Q= 77 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-22/SLOT-1/CHAN-82 (is not EM) E= 712 t= -6914 Q= 3926 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-22/SLOT-2/CHAN-58 (is not EM) E= 90 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-22/SLOT-3/CHAN-45 (is not EM) E= 191 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-22/SLOT-4/CHAN-87 (is not EM) E= 160 t= 0 Q= 0 P=0xa5 G=0 @@ -1205,31 +1205,31 @@ Channel: BARREL/C-SIDE/FT-22/SLOT-8/CHAN-26 (is not EM) E= 134 t= 0 Q= 0 P=0xa5 Channel: BARREL/C-SIDE/FT-22/SLOT-8/CHAN-27 (is not EM) E= 94 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-22/SLOT-10/CHAN-11 (is not EM) E= -100 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-22/SLOT-10/CHAN-28 (is not EM) E= 179 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-22/SLOT-10/CHAN-32 (is not EM) E= 354 t= -39771 Q= 3516 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-22/SLOT-13/CHAN-113 (is not EM) E= 458 t= 3076 Q= 109 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-22/SLOT-10/CHAN-32 (is not EM) E= 354 t= -39771 Q= 3516 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-22/SLOT-13/CHAN-113 (is not EM) E= 458 t= 3076 Q= 109 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-23/SLOT-2/CHAN-45 (is not EM) E= -114 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-23/SLOT-5/CHAN-124 (is not EM) E= 137 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-23/SLOT-5/CHAN-125 (is not EM) E= 107 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-23/SLOT-8/CHAN-119 (is not EM) E= 101 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-23/SLOT-8/CHAN-120 (is not EM) E= 554 t= -16851 Q= 32884 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-23/SLOT-8/CHAN-121 (is not EM) E= 405 t= -17976 Q= 21071 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-23/SLOT-8/CHAN-120 (is not EM) E= 554 t= -16851 Q= 32884 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-23/SLOT-8/CHAN-121 (is not EM) E= 405 t= -17976 Q= 21071 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-23/SLOT-8/CHAN-122 (is not EM) E= 137 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-23/SLOT-10/CHAN-20 (is not EM) E= 214 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-23/SLOT-14/CHAN-58 (is not EM) E= 453 t= -31229 Q= 203 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-23/SLOT-14/CHAN-59 (is not EM) E= 1052 t= -26765 Q= 2127 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-23/SLOT-14/CHAN-62 (is not EM) E= 728 t= -27218 Q= 1305 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-23/SLOT-14/CHAN-63 (is not EM) E= 2682 t= -24771 Q= 14128 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-23/SLOT-14/CHAN-58 (is not EM) E= 453 t= -31229 Q= 203 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-23/SLOT-14/CHAN-59 (is not EM) E= 1052 t= -26765 Q= 2127 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-23/SLOT-14/CHAN-62 (is not EM) E= 728 t= -27218 Q= 1305 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-23/SLOT-14/CHAN-63 (is not EM) E= 2682 t= -24771 Q= 14128 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-24/SLOT-4/CHAN-7 (is not EM) E= -95 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-24/SLOT-8/CHAN-10 (is not EM) E= 171 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-24/SLOT-8/CHAN-11 (is not EM) E= 193 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-24/SLOT-8/CHAN-12 (is not EM) E= 130 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-24/SLOT-8/CHAN-37 (is not EM) E= 155 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-24/SLOT-8/CHAN-38 (is not EM) E= 285 t= -17690 Q= 9658 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-24/SLOT-9/CHAN-55 (is not EM) E= 275 t= -11906 Q= 81 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-24/SLOT-8/CHAN-38 (is not EM) E= 285 t= -17690 Q= 9658 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-24/SLOT-9/CHAN-55 (is not EM) E= 275 t= -11906 Q= 81 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-24/SLOT-10/CHAN-53 (is not EM) E= 162 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-24/SLOT-14/CHAN-32 (is not EM) E= 393 t= -48855 Q= 742 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-24/SLOT-14/CHAN-33 (is not EM) E= 584 t= -38569 Q= 1351 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-24/SLOT-14/CHAN-44 (is not EM) E= 418 t= -20327 Q= 283 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-24/SLOT-14/CHAN-32 (is not EM) E= 393 t= -48855 Q= 742 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-24/SLOT-14/CHAN-33 (is not EM) E= 584 t= -38569 Q= 1351 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-24/SLOT-14/CHAN-44 (is not EM) E= 418 t= -20327 Q= 283 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-25/SLOT-2/CHAN-66 (is not EM) E= 84 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-25/SLOT-3/CHAN-108 (is not EM) E= 176 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-26/SLOT-2/CHAN-98 (is not EM) E= 85 t= 0 Q= 0 P=0xa5 G=0 @@ -1239,8 +1239,8 @@ Channel: BARREL/C-SIDE/FT-26/SLOT-3/CHAN-29 (is not EM) E= 126 t= 0 Q= 0 P=0xa5 Channel: BARREL/C-SIDE/FT-26/SLOT-3/CHAN-72 (is not EM) E= 242 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-26/SLOT-3/CHAN-73 (is not EM) E= 103 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-26/SLOT-10/CHAN-31 (is not EM) E= 187 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-26/SLOT-12/CHAN-121 (is not EM) E= -290 t= -7980 Q= 909 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-26/SLOT-13/CHAN-65 (is not EM) E= -299 t= -24325 Q= 503 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-26/SLOT-12/CHAN-121 (is not EM) E= -290 t= -7980 Q= 909 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-26/SLOT-13/CHAN-65 (is not EM) E= -299 t= -24325 Q= 503 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-27/SLOT-6/CHAN-38 (is not EM) E= 77 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-28/SLOT-2/CHAN-13 (is not EM) E= 99 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-28/SLOT-4/CHAN-46 (is not EM) E= 151 t= 0 Q= 0 P=0xa5 G=0 @@ -1249,9 +1249,9 @@ Channel: BARREL/C-SIDE/FT-28/SLOT-4/CHAN-88 (is not EM) E= 120 t= 0 Q= 0 P=0xa5 Channel: BARREL/C-SIDE/FT-28/SLOT-5/CHAN-7 (is not EM) E= 91 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-28/SLOT-5/CHAN-36 (is not EM) E= 138 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-28/SLOT-11/CHAN-84 (is not EM) E= 223 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-28/SLOT-12/CHAN-50 (is not EM) E= 303 t= -348 Q= 57 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-28/SLOT-12/CHAN-85 (is not EM) E= 799 t= -19960 Q= 2120 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-28/SLOT-12/CHAN-86 (is not EM) E= 265 t= -23038 Q= 741 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-28/SLOT-12/CHAN-50 (is not EM) E= 303 t= -348 Q= 57 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-28/SLOT-12/CHAN-85 (is not EM) E= 799 t= -19960 Q= 2120 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-28/SLOT-12/CHAN-86 (is not EM) E= 265 t= -23038 Q= 741 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-29/SLOT-2/CHAN-50 (is not EM) E= -83 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-29/SLOT-3/CHAN-108 (is not EM) E= 94 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-29/SLOT-4/CHAN-8 (is not EM) E= 97 t= 0 Q= 0 P=0xa5 G=0 @@ -1259,7 +1259,7 @@ Channel: BARREL/C-SIDE/FT-29/SLOT-7/CHAN-57 (is not EM) E= 98 t= 0 Q= 0 P=0xa5 G Channel: BARREL/C-SIDE/FT-29/SLOT-9/CHAN-115 (is not EM) E= 108 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-29/SLOT-9/CHAN-118 (is not EM) E= 219 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-29/SLOT-9/CHAN-119 (is not EM) E= 161 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-29/SLOT-13/CHAN-49 (is not EM) E= -661 t= 4042 Q= 231 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-29/SLOT-13/CHAN-49 (is not EM) E= -661 t= 4042 Q= 231 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-30/SLOT-2/CHAN-12 (is not EM) E= 94 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-30/SLOT-3/CHAN-64 (is not EM) E= 111 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-30/SLOT-3/CHAN-65 (is not EM) E= 94 t= 0 Q= 0 P=0xa5 G=0 @@ -1270,21 +1270,21 @@ Channel: BARREL/C-SIDE/FT-30/SLOT-6/CHAN-47 (is not EM) E= 99 t= 0 Q= 0 P=0xa5 G Channel: BARREL/C-SIDE/FT-30/SLOT-8/CHAN-60 (is not EM) E= 120 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-30/SLOT-8/CHAN-61 (is not EM) E= 81 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-30/SLOT-9/CHAN-87 (is not EM) E= 87 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-30/SLOT-11/CHAN-5 (is not EM) E= 299 t= -11369 Q= 68 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-30/SLOT-11/CHAN-118 (is not EM) E= 274 t= -33231 Q= 12211 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-30/SLOT-12/CHAN-43 (is not EM) E= 270 t= -25391 Q= 1219 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-30/SLOT-11/CHAN-5 (is not EM) E= 299 t= -11369 Q= 68 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-30/SLOT-11/CHAN-118 (is not EM) E= 274 t= -33231 Q= 12211 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-30/SLOT-12/CHAN-43 (is not EM) E= 270 t= -25391 Q= 1219 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-31/SLOT-3/CHAN-102 (is not EM) E= 107 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-31/SLOT-3/CHAN-104 (is not EM) E= 192 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-31/SLOT-3/CHAN-105 (is not EM) E= 116 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-31/SLOT-6/CHAN-109 (is not EM) E= 72 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-31/SLOT-10/CHAN-73 (is not EM) E= -98 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-31/SLOT-11/CHAN-118 (is not EM) E= 267 t= -15416 Q= 3371 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-31/SLOT-11/CHAN-118 (is not EM) E= 267 t= -15416 Q= 3371 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-31/SLOT-11/CHAN-119 (is not EM) E= 242 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-31/SLOT-12/CHAN-112 (is not EM) E= 302 t= 3376 Q= 285 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-31/SLOT-12/CHAN-113 (is not EM) E= 285 t= 6933 Q= 65 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-31/SLOT-13/CHAN-80 (is not EM) E= 474 t= -22704 Q= 147 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-0/SLOT-1/CHAN-26 (is not EM) E= 421 t= -17385 Q= 20758 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-0/SLOT-1/CHAN-60 (is not EM) E= 488 t= 4306 Q= 45 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-31/SLOT-12/CHAN-112 (is not EM) E= 302 t= 3376 Q= 285 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-31/SLOT-12/CHAN-113 (is not EM) E= 285 t= 6933 Q= 65 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-31/SLOT-13/CHAN-80 (is not EM) E= 474 t= -22704 Q= 147 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-0/SLOT-1/CHAN-26 (is not EM) E= 421 t= -17385 Q= 20758 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-0/SLOT-1/CHAN-60 (is not EM) E= 488 t= 4306 Q= 45 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-0/SLOT-2/CHAN-105 (is not EM) E= 188 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-0/SLOT-2/CHAN-106 (is not EM) E= 241 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-0/SLOT-5/CHAN-97 (is not EM) E= 116 t= 0 Q= 0 P=0xa5 G=0 @@ -1296,12 +1296,12 @@ Channel: BARREL/A-SIDE/FT-0/SLOT-5/CHAN-103 (is not EM) E= 107 t= 0 Q= 0 P=0xa5 Channel: BARREL/A-SIDE/FT-0/SLOT-7/CHAN-88 (is not EM) E= -89 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-0/SLOT-9/CHAN-107 (is not EM) E= 123 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-0/SLOT-10/CHAN-9 (is not EM) E= 96 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-0/SLOT-11/CHAN-117 (is not EM) E= 371 t= -23147 Q= 1553 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-0/SLOT-12/CHAN-77 (is not EM) E= 303 t= -4002 Q= 114 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-0/SLOT-12/CHAN-90 (is not EM) E= 293 t= -3301 Q= 187 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-0/SLOT-12/CHAN-114 (is not EM) E= 310 t= 1063 Q= 9 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-0/SLOT-13/CHAN-20 (is not EM) E= 284 t= -56959 Q= 1779 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-1/SLOT-1/CHAN-47 (is not EM) E= 1002 t= -329 Q= 85 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-0/SLOT-11/CHAN-117 (is not EM) E= 371 t= -23147 Q= 1553 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-0/SLOT-12/CHAN-77 (is not EM) E= 303 t= -4002 Q= 114 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-0/SLOT-12/CHAN-90 (is not EM) E= 293 t= -3301 Q= 187 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-0/SLOT-12/CHAN-114 (is not EM) E= 310 t= 1063 Q= 9 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-0/SLOT-13/CHAN-20 (is not EM) E= 284 t= -56959 Q= 1779 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-1/SLOT-1/CHAN-47 (is not EM) E= 1002 t= -329 Q= 85 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-1/SLOT-6/CHAN-31 (is not EM) E= 89 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-1/SLOT-8/CHAN-37 (is not EM) E= 103 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-2/SLOT-4/CHAN-84 (is not EM) E= 144 t= 0 Q= 0 P=0xa5 G=0 @@ -1316,7 +1316,7 @@ Channel: BARREL/A-SIDE/FT-2/SLOT-8/CHAN-20 (is not EM) E= 137 t= 0 Q= 0 P=0xa5 G Channel: BARREL/A-SIDE/FT-3/SLOT-3/CHAN-39 (is not EM) E= 86 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-3/SLOT-8/CHAN-18 (is not EM) E= 94 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-3/SLOT-11/CHAN-91 (is not EM) E= -236 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-3/SLOT-12/CHAN-43 (is not EM) E= 286 t= 2240 Q= 146 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-3/SLOT-12/CHAN-43 (is not EM) E= 286 t= 2240 Q= 146 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-4/SLOT-4/CHAN-91 (is not EM) E= 122 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-4/SLOT-6/CHAN-6 (is not EM) E= 64 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-4/SLOT-6/CHAN-74 (is not EM) E= -85 t= 0 Q= 0 P=0xa5 G=0 @@ -1324,15 +1324,15 @@ Channel: BARREL/A-SIDE/FT-4/SLOT-7/CHAN-64 (is not EM) E= 73 t= 0 Q= 0 P=0xa5 G= Channel: BARREL/A-SIDE/FT-4/SLOT-7/CHAN-65 (is not EM) E= 82 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-4/SLOT-9/CHAN-54 (is not EM) E= 121 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-4/SLOT-9/CHAN-55 (is not EM) E= 234 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-4/SLOT-11/CHAN-71 (is not EM) E= 274 t= -15181 Q= 6130 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-4/SLOT-11/CHAN-71 (is not EM) E= 274 t= -15181 Q= 6130 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-5/SLOT-6/CHAN-61 (is not EM) E= 72 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-5/SLOT-7/CHAN-32 (is not EM) E= 83 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-5/SLOT-9/CHAN-66 (is not EM) E= -83 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-5/SLOT-11/CHAN-70 (is not EM) E= 288 t= -1094 Q= 17 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-5/SLOT-12/CHAN-40 (is not EM) E= 285 t= 6311 Q= 25 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-5/SLOT-12/CHAN-65 (is not EM) E= 324 t= -34323 Q= 2637 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-6/SLOT-1/CHAN-22 (is not EM) E= 474 t= 2210 Q= 68 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-6/SLOT-1/CHAN-41 (is not EM) E= 420 t= -14938 Q= 21 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-5/SLOT-11/CHAN-70 (is not EM) E= 288 t= -1094 Q= 17 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-5/SLOT-12/CHAN-40 (is not EM) E= 285 t= 6311 Q= 25 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-5/SLOT-12/CHAN-65 (is not EM) E= 324 t= -34323 Q= 2637 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-6/SLOT-1/CHAN-22 (is not EM) E= 474 t= 2210 Q= 68 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-6/SLOT-1/CHAN-41 (is not EM) E= 420 t= -14938 Q= 21 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-6/SLOT-3/CHAN-70 (is not EM) E= -131 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-6/SLOT-3/CHAN-86 (is not EM) E= 148 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-6/SLOT-3/CHAN-87 (is not EM) E= 137 t= 0 Q= 0 P=0xa5 G=0 @@ -1343,26 +1343,26 @@ Channel: BARREL/A-SIDE/FT-6/SLOT-5/CHAN-56 (is not EM) E= 95 t= 0 Q= 0 P=0xa5 G= Channel: BARREL/A-SIDE/FT-6/SLOT-5/CHAN-58 (is not EM) E= 96 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-6/SLOT-8/CHAN-58 (is not EM) E= 171 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-6/SLOT-10/CHAN-95 (is not EM) E= 220 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-6/SLOT-10/CHAN-98 (is not EM) E= 272 t= 3335 Q= 119 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-6/SLOT-10/CHAN-98 (is not EM) E= 272 t= 3335 Q= 119 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-6/SLOT-10/CHAN-113 (is not EM) E= 163 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-6/SLOT-10/CHAN-117 (is not EM) E= 180 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-6/SLOT-11/CHAN-110 (is not EM) E= 224 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-7/SLOT-1/CHAN-95 (is not EM) E= 630 t= 1668 Q= 326 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-7/SLOT-1/CHAN-95 (is not EM) E= 630 t= 1668 Q= 326 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-7/SLOT-3/CHAN-105 (is not EM) E= 184 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-7/SLOT-3/CHAN-106 (is not EM) E= 155 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-7/SLOT-7/CHAN-123 (is not EM) E= 206 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-7/SLOT-7/CHAN-124 (is not EM) E= 167 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-7/SLOT-7/CHAN-125 (is not EM) E= 79 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-7/SLOT-9/CHAN-116 (is not EM) E= 409 t= -9199 Q= 6125 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-7/SLOT-9/CHAN-116 (is not EM) E= 409 t= -9199 Q= 6125 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-7/SLOT-9/CHAN-125 (is not EM) E= 196 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-7/SLOT-10/CHAN-24 (is not EM) E= 483 t= -22008 Q= 2159 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-7/SLOT-10/CHAN-24 (is not EM) E= 483 t= -22008 Q= 2159 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-7/SLOT-11/CHAN-27 (is not EM) E= 211 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-7/SLOT-12/CHAN-84 (is not EM) E= 245 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-7/SLOT-13/CHAN-127 (is not EM) E= 1302 t= -1259 Q= 80 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-7/SLOT-13/CHAN-127 (is not EM) E= 1302 t= -1259 Q= 80 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-8/SLOT-2/CHAN-65 (is not EM) E= 228 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-8/SLOT-9/CHAN-70 (is not EM) E= -82 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-8/SLOT-11/CHAN-64 (is not EM) E= 211 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-8/SLOT-12/CHAN-101 (is not EM) E= 279 t= -5596 Q= 144 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-8/SLOT-12/CHAN-101 (is not EM) E= 279 t= -5596 Q= 144 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-9/SLOT-3/CHAN-25 (is not EM) E= 122 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-9/SLOT-4/CHAN-27 (is not EM) E= 121 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-9/SLOT-4/CHAN-83 (is not EM) E= 97 t= 0 Q= 0 P=0xa5 G=0 @@ -1370,31 +1370,31 @@ Channel: BARREL/A-SIDE/FT-9/SLOT-4/CHAN-84 (is not EM) E= 88 t= 0 Q= 0 P=0xa5 G= Channel: BARREL/A-SIDE/FT-9/SLOT-5/CHAN-14 (is not EM) E= -91 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-9/SLOT-7/CHAN-99 (is not EM) E= -86 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-9/SLOT-8/CHAN-8 (is not EM) E= 84 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-9/SLOT-12/CHAN-95 (is not EM) E= 312 t= -31320 Q= 790 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-9/SLOT-12/CHAN-95 (is not EM) E= 312 t= -31320 Q= 790 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-10/SLOT-8/CHAN-52 (is not EM) E= -89 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-10/SLOT-8/CHAN-94 (is not EM) E= 88 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-10/SLOT-8/CHAN-95 (is not EM) E= 135 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-10/SLOT-8/CHAN-96 (is not EM) E= 113 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-10/SLOT-8/CHAN-102 (is not EM) E= 80 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-10/SLOT-10/CHAN-14 (is not EM) E= 111 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-10/SLOT-10/CHAN-24 (is not EM) E= 536 t= 2979 Q= 225 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-10/SLOT-10/CHAN-25 (is not EM) E= 261 t= -16639 Q= 804 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-10/SLOT-10/CHAN-24 (is not EM) E= 536 t= 2979 Q= 225 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-10/SLOT-10/CHAN-25 (is not EM) E= 261 t= -16639 Q= 804 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-10/SLOT-10/CHAN-26 (is not EM) E= 222 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-10/SLOT-10/CHAN-90 (is not EM) E= 177 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-10/SLOT-12/CHAN-85 (is not EM) E= 243 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-11/SLOT-1/CHAN-32 (is not EM) E= -473 t= -3521 Q= 1451 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-11/SLOT-1/CHAN-70 (is not EM) E= 443 t= -15497 Q= 128 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-11/SLOT-1/CHAN-32 (is not EM) E= -473 t= -3521 Q= 1451 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-11/SLOT-1/CHAN-70 (is not EM) E= 443 t= -15497 Q= 128 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-11/SLOT-3/CHAN-19 (is not EM) E= 95 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-11/SLOT-3/CHAN-76 (is not EM) E= 96 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-11/SLOT-4/CHAN-0 (is not EM) E= 211 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-11/SLOT-9/CHAN-38 (is not EM) E= -89 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-11/SLOT-10/CHAN-21 (is not EM) E= 338 t= -16214 Q= 787 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-11/SLOT-11/CHAN-60 (is not EM) E= 462 t= 6333 Q= 68 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-11/SLOT-11/CHAN-61 (is not EM) E= 381 t= 4796 Q= 101 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-12/SLOT-1/CHAN-55 (is not EM) E= 516 t= 868 Q= 131 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-11/SLOT-10/CHAN-21 (is not EM) E= 338 t= -16214 Q= 787 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-11/SLOT-11/CHAN-60 (is not EM) E= 462 t= 6333 Q= 68 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-11/SLOT-11/CHAN-61 (is not EM) E= 381 t= 4796 Q= 101 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-12/SLOT-1/CHAN-55 (is not EM) E= 516 t= 868 Q= 131 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-12/SLOT-2/CHAN-15 (is not EM) E= 120 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-12/SLOT-2/CHAN-32 (is not EM) E= 130 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-12/SLOT-2/CHAN-33 (is not EM) E= 344 t= 224 Q= 227 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-12/SLOT-2/CHAN-33 (is not EM) E= 344 t= 224 Q= 227 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-12/SLOT-2/CHAN-34 (is not EM) E= 204 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-12/SLOT-2/CHAN-36 (is not EM) E= 115 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-12/SLOT-4/CHAN-70 (is not EM) E= 112 t= 0 Q= 0 P=0xa5 G=0 @@ -1403,7 +1403,7 @@ Channel: BARREL/A-SIDE/FT-12/SLOT-5/CHAN-1 (is not EM) E= 96 t= 0 Q= 0 P=0xa5 G= Channel: BARREL/A-SIDE/FT-12/SLOT-9/CHAN-59 (is not EM) E= 153 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-12/SLOT-9/CHAN-123 (is not EM) E= 149 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-12/SLOT-10/CHAN-5 (is not EM) E= 96 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-12/SLOT-12/CHAN-28 (is not EM) E= 276 t= 6096 Q= 18 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-12/SLOT-12/CHAN-28 (is not EM) E= 276 t= 6096 Q= 18 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-12/SLOT-12/CHAN-55 (is not EM) E= 253 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-12/SLOT-12/CHAN-56 (is not EM) E= 242 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-13/SLOT-2/CHAN-88 (is not EM) E= 85 t= 0 Q= 0 P=0xa5 G=0 @@ -1415,13 +1415,13 @@ Channel: BARREL/A-SIDE/FT-13/SLOT-6/CHAN-71 (is not EM) E= 76 t= 0 Q= 0 P=0xa5 G Channel: BARREL/A-SIDE/FT-13/SLOT-8/CHAN-42 (is not EM) E= 83 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-13/SLOT-8/CHAN-106 (is not EM) E= 90 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-13/SLOT-8/CHAN-107 (is not EM) E= 85 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-13/SLOT-10/CHAN-35 (is not EM) E= 435 t= 6308 Q= 77 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-13/SLOT-10/CHAN-35 (is not EM) E= 435 t= 6308 Q= 77 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-13/SLOT-10/CHAN-38 (is not EM) E= 187 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-13/SLOT-10/CHAN-92 (is not EM) E= 401 t= 3177 Q= 57 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-13/SLOT-10/CHAN-96 (is not EM) E= 376 t= 6919 Q= 56 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-13/SLOT-11/CHAN-93 (is not EM) E= 295 t= 5299 Q= 25 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-13/SLOT-14/CHAN-58 (is not EM) E= 324 t= -11089 Q= 68 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-14/SLOT-1/CHAN-53 (is not EM) E= 457 t= -5144 Q= 66 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-13/SLOT-10/CHAN-92 (is not EM) E= 401 t= 3177 Q= 57 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-13/SLOT-10/CHAN-96 (is not EM) E= 376 t= 6919 Q= 56 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-13/SLOT-11/CHAN-93 (is not EM) E= 295 t= 5299 Q= 25 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-13/SLOT-14/CHAN-58 (is not EM) E= 324 t= -11089 Q= 68 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-14/SLOT-1/CHAN-53 (is not EM) E= 457 t= -5144 Q= 66 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-14/SLOT-4/CHAN-36 (is not EM) E= 106 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-14/SLOT-4/CHAN-75 (is not EM) E= 90 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-14/SLOT-4/CHAN-79 (is not EM) E= 110 t= 0 Q= 0 P=0xa5 G=0 @@ -1433,11 +1433,11 @@ Channel: BARREL/A-SIDE/FT-14/SLOT-5/CHAN-86 (is not EM) E= -91 t= 0 Q= 0 P=0xa5 Channel: BARREL/A-SIDE/FT-14/SLOT-6/CHAN-12 (is not EM) E= 156 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-14/SLOT-6/CHAN-13 (is not EM) E= 90 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-14/SLOT-8/CHAN-66 (is not EM) E= -88 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-14/SLOT-13/CHAN-4 (is not EM) E= 348 t= 551 Q= 2 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-14/SLOT-13/CHAN-5 (is not EM) E= 704 t= 1541 Q= 3 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-14/SLOT-13/CHAN-4 (is not EM) E= 348 t= 551 Q= 2 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-14/SLOT-13/CHAN-5 (is not EM) E= 704 t= 1541 Q= 3 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-15/SLOT-5/CHAN-20 (is not EM) E= -94 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-15/SLOT-8/CHAN-40 (is not EM) E= 94 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-15/SLOT-13/CHAN-64 (is not EM) E= -321 t= -8741 Q= 84 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-15/SLOT-13/CHAN-64 (is not EM) E= -321 t= -8741 Q= 84 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-16/SLOT-2/CHAN-57 (is not EM) E= 112 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-16/SLOT-3/CHAN-2 (is not EM) E= 116 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-16/SLOT-5/CHAN-11 (is not EM) E= 86 t= 0 Q= 0 P=0xa5 G=0 @@ -1446,9 +1446,9 @@ Channel: BARREL/A-SIDE/FT-16/SLOT-5/CHAN-91 (is not EM) E= 116 t= 0 Q= 0 P=0xa5 Channel: BARREL/A-SIDE/FT-16/SLOT-5/CHAN-92 (is not EM) E= 190 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-16/SLOT-5/CHAN-93 (is not EM) E= 96 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-17/SLOT-8/CHAN-78 (is not EM) E= 93 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-17/SLOT-10/CHAN-61 (is not EM) E= 488 t= -15044 Q= 2146 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-17/SLOT-11/CHAN-12 (is not EM) E= -313 t= -9316 Q= 889 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-18/SLOT-1/CHAN-32 (is not EM) E= 368 t= 2349 Q= 211 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-17/SLOT-10/CHAN-61 (is not EM) E= 488 t= -15044 Q= 2146 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-17/SLOT-11/CHAN-12 (is not EM) E= -313 t= -9316 Q= 889 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-18/SLOT-1/CHAN-32 (is not EM) E= 368 t= 2349 Q= 211 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-18/SLOT-4/CHAN-47 (is not EM) E= 217 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-18/SLOT-5/CHAN-13 (is not EM) E= 101 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-18/SLOT-6/CHAN-81 (is not EM) E= 168 t= 0 Q= 0 P=0xa5 G=0 @@ -1458,9 +1458,9 @@ Channel: BARREL/A-SIDE/FT-18/SLOT-9/CHAN-94 (is not EM) E= -82 t= 0 Q= 0 P=0xa5 Channel: BARREL/A-SIDE/FT-18/SLOT-9/CHAN-119 (is not EM) E= -165 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-18/SLOT-11/CHAN-39 (is not EM) E= -218 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-18/SLOT-11/CHAN-47 (is not EM) E= 233 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-18/SLOT-12/CHAN-36 (is not EM) E= 439 t= -23500 Q= 12279 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-18/SLOT-12/CHAN-36 (is not EM) E= 439 t= -23500 Q= 12279 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-18/SLOT-12/CHAN-104 (is not EM) E= 252 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-19/SLOT-1/CHAN-37 (is not EM) E= 438 t= -3304 Q= 10 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-19/SLOT-1/CHAN-37 (is not EM) E= 438 t= -3304 Q= 10 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-19/SLOT-2/CHAN-39 (is not EM) E= -120 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-19/SLOT-2/CHAN-106 (is not EM) E= 112 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-19/SLOT-3/CHAN-20 (is not EM) E= 94 t= 0 Q= 0 P=0xa5 G=0 @@ -1477,10 +1477,10 @@ Channel: BARREL/A-SIDE/FT-19/SLOT-5/CHAN-65 (is not EM) E= 133 t= 0 Q= 0 P=0xa5 Channel: BARREL/A-SIDE/FT-19/SLOT-5/CHAN-88 (is not EM) E= 110 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-19/SLOT-9/CHAN-40 (is not EM) E= -144 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-19/SLOT-9/CHAN-45 (is not EM) E= -115 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-19/SLOT-12/CHAN-35 (is not EM) E= 268 t= 5700 Q= 211 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-19/SLOT-12/CHAN-35 (is not EM) E= 268 t= 5700 Q= 211 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-19/SLOT-12/CHAN-87 (is not EM) E= 249 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-19/SLOT-12/CHAN-107 (is not EM) E= 244 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-20/SLOT-1/CHAN-51 (is not EM) E= 432 t= 946 Q= 323 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-20/SLOT-1/CHAN-51 (is not EM) E= 432 t= 946 Q= 323 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-20/SLOT-4/CHAN-12 (is not EM) E= 118 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-20/SLOT-4/CHAN-119 (is not EM) E= 176 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-20/SLOT-8/CHAN-0 (is not EM) E= 88 t= 0 Q= 0 P=0xa5 G=0 @@ -1491,7 +1491,7 @@ Channel: BARREL/A-SIDE/FT-20/SLOT-8/CHAN-96 (is not EM) E= 76 t= 0 Q= 0 P=0xa5 G Channel: BARREL/A-SIDE/FT-20/SLOT-10/CHAN-37 (is not EM) E= -188 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-20/SLOT-10/CHAN-106 (is not EM) E= 93 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-20/SLOT-10/CHAN-115 (is not EM) E= 225 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-20/SLOT-11/CHAN-40 (is not EM) E= 502 t= -2234 Q= 2 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-20/SLOT-11/CHAN-40 (is not EM) E= 502 t= -2234 Q= 2 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-21/SLOT-2/CHAN-102 (is not EM) E= 89 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-21/SLOT-2/CHAN-104 (is not EM) E= 98 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-21/SLOT-7/CHAN-118 (is not EM) E= 110 t= 0 Q= 0 P=0xa5 G=0 @@ -1504,16 +1504,16 @@ Channel: BARREL/A-SIDE/FT-22/SLOT-6/CHAN-117 (is not EM) E= 81 t= 0 Q= 0 P=0xa5 Channel: BARREL/A-SIDE/FT-22/SLOT-7/CHAN-103 (is not EM) E= 84 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-22/SLOT-7/CHAN-104 (is not EM) E= 90 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-22/SLOT-7/CHAN-105 (is not EM) E= 93 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-22/SLOT-12/CHAN-4 (is not EM) E= 302 t= -2669 Q= 35 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-22/SLOT-12/CHAN-4 (is not EM) E= 302 t= -2669 Q= 35 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-23/SLOT-2/CHAN-53 (is not EM) E= 92 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-23/SLOT-9/CHAN-4 (is not EM) E= 161 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-23/SLOT-9/CHAN-21 (is not EM) E= 91 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-24/SLOT-1/CHAN-42 (is not EM) E= 441 t= -4163 Q= 392 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-24/SLOT-1/CHAN-42 (is not EM) E= 441 t= -4163 Q= 392 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-24/SLOT-3/CHAN-67 (is not EM) E= -137 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-24/SLOT-6/CHAN-4 (is not EM) E= -71 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-24/SLOT-14/CHAN-58 (is not EM) E= 496 t= -3228 Q= 139 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-25/SLOT-1/CHAN-48 (is not EM) E= 685 t= -1988 Q= 12 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-25/SLOT-1/CHAN-84 (is not EM) E= 723 t= -138 Q= 27 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-24/SLOT-14/CHAN-58 (is not EM) E= 496 t= -3228 Q= 139 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-25/SLOT-1/CHAN-48 (is not EM) E= 685 t= -1988 Q= 12 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-25/SLOT-1/CHAN-84 (is not EM) E= 723 t= -138 Q= 27 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-25/SLOT-5/CHAN-74 (is not EM) E= 95 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-25/SLOT-11/CHAN-70 (is not EM) E= -221 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-26/SLOT-2/CHAN-2 (is not EM) E= -92 t= 0 Q= 0 P=0xa5 G=0 @@ -1537,12 +1537,12 @@ Channel: BARREL/A-SIDE/FT-28/SLOT-8/CHAN-6 (is not EM) E= 106 t= 0 Q= 0 P=0xa5 G Channel: BARREL/A-SIDE/FT-28/SLOT-8/CHAN-98 (is not EM) E= 80 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-28/SLOT-8/CHAN-103 (is not EM) E= 78 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-28/SLOT-8/CHAN-107 (is not EM) E= 78 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-28/SLOT-8/CHAN-108 (is not EM) E= 259 t= 1438 Q= 120 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-28/SLOT-8/CHAN-108 (is not EM) E= 259 t= 1438 Q= 120 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-28/SLOT-8/CHAN-109 (is not EM) E= 127 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-28/SLOT-11/CHAN-111 (is not EM) E= 242 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-28/SLOT-12/CHAN-57 (is not EM) E= 244 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-28/SLOT-14/CHAN-54 (is not EM) E= 323 t= -4899 Q= 13 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-28/SLOT-14/CHAN-55 (is not EM) E= 931 t= 668 Q= 42 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-28/SLOT-14/CHAN-54 (is not EM) E= 323 t= -4899 Q= 13 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-28/SLOT-14/CHAN-55 (is not EM) E= 931 t= 668 Q= 42 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-29/SLOT-2/CHAN-12 (is not EM) E= 126 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-29/SLOT-2/CHAN-109 (is not EM) E= 84 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-29/SLOT-2/CHAN-127 (is not EM) E= -118 t= 0 Q= 0 P=0xa5 G=0 @@ -1553,350 +1553,350 @@ Channel: BARREL/A-SIDE/FT-29/SLOT-6/CHAN-123 (is not EM) E= 79 t= 0 Q= 0 P=0xa5 Channel: BARREL/A-SIDE/FT-29/SLOT-10/CHAN-43 (is not EM) E= 92 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-29/SLOT-10/CHAN-106 (is not EM) E= 129 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-29/SLOT-11/CHAN-9 (is not EM) E= 231 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-29/SLOT-11/CHAN-22 (is not EM) E= 292 t= 6831 Q= 117 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-29/SLOT-13/CHAN-93 (is not EM) E= 450 t= -7017 Q= 142 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-29/SLOT-14/CHAN-17 (is not EM) E= 337 t= -66022 Q= 2068 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-29/SLOT-11/CHAN-22 (is not EM) E= 292 t= 6831 Q= 117 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-29/SLOT-13/CHAN-93 (is not EM) E= 450 t= -7017 Q= 142 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-29/SLOT-14/CHAN-17 (is not EM) E= 337 t= -66022 Q= 2068 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-30/SLOT-7/CHAN-58 (is not EM) E= 86 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-30/SLOT-7/CHAN-104 (is not EM) E= 126 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-30/SLOT-10/CHAN-30 (is not EM) E= 460 t= 1373 Q= 35 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-30/SLOT-10/CHAN-30 (is not EM) E= 460 t= 1373 Q= 35 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-30/SLOT-10/CHAN-56 (is not EM) E= 157 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-30/SLOT-10/CHAN-81 (is not EM) E= 243 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-30/SLOT-13/CHAN-63 (is not EM) E= 314 t= -12834 Q= 5 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-30/SLOT-13/CHAN-63 (is not EM) E= 314 t= -12834 Q= 5 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-31/SLOT-2/CHAN-60 (is not EM) E= 135 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-31/SLOT-5/CHAN-88 (is not EM) E= -177 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-31/SLOT-5/CHAN-108 (is not EM) E= 134 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-31/SLOT-6/CHAN-72 (is not EM) E= -85 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-31/SLOT-6/CHAN-100 (is not EM) E= 84 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-31/SLOT-12/CHAN-35 (is not EM) E= 291 t= -13321 Q= 738 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-31/SLOT-12/CHAN-35 (is not EM) E= 291 t= -13321 Q= 738 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-0/SLOT-2/CHAN-30 (is not EM) E= 184 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-0/SLOT-2/CHAN-65 (is not EM) E= 142 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-0/SLOT-3/CHAN-60 (is not EM) E= 412 t= 371 Q= 494 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-0/SLOT-3/CHAN-60 (is not EM) E= 412 t= 371 Q= 494 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-0/SLOT-3/CHAN-61 (is not EM) E= 238 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-0/SLOT-6/CHAN-75 (is not EM) E= 513 t= 1663 Q= 1019 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-0/SLOT-7/CHAN-116 (is not EM) E= 351 t= 447 Q= 784 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-0/SLOT-8/CHAN-29 (is not EM) E= 301 t= -13542 Q= 2062 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-0/SLOT-6/CHAN-75 (is not EM) E= 513 t= 1663 Q= 1019 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-0/SLOT-7/CHAN-116 (is not EM) E= 351 t= 447 Q= 784 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-0/SLOT-8/CHAN-29 (is not EM) E= 301 t= -13542 Q= 2062 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-0/SLOT-8/CHAN-54 (is not EM) E= 225 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-0/SLOT-8/CHAN-55 (is not EM) E= 191 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-0/SLOT-10/CHAN-95 (is not EM) E= 995 t= -600 Q= 36 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-0/SLOT-10/CHAN-106 (is not EM) E= 435 t= -18739 Q= 1149 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-0/SLOT-11/CHAN-124 (is not EM) E= 433 t= 6321 Q= 26 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-0/SLOT-12/CHAN-41 (is not EM) E= 769 t= -1807 Q= 79 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-0/SLOT-10/CHAN-95 (is not EM) E= 995 t= -600 Q= 36 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-0/SLOT-10/CHAN-106 (is not EM) E= 435 t= -18739 Q= 1149 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-0/SLOT-11/CHAN-124 (is not EM) E= 433 t= 6321 Q= 26 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-0/SLOT-12/CHAN-41 (is not EM) E= 769 t= -1807 Q= 79 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-1/SLOT-2/CHAN-19 (is not EM) E= 124 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-1/SLOT-2/CHAN-24 (is not EM) E= 122 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-1/SLOT-6/CHAN-121 (is not EM) E= 496 t= -25719 Q= 65535 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-1/SLOT-6/CHAN-121 (is not EM) E= 496 t= -25719 Q= 65535 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-1/SLOT-8/CHAN-36 (is not EM) E= 201 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-1/SLOT-8/CHAN-106 (is not EM) E= 211 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-1/SLOT-9/CHAN-14 (is not EM) E= 273 t= 4500 Q= 13 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-1/SLOT-9/CHAN-15 (is not EM) E= 334 t= -4479 Q= 33 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-1/SLOT-10/CHAN-14 (is not EM) E= 359 t= -10477 Q= 298 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-1/SLOT-13/CHAN-89 (is not EM) E= 592 t= -3698 Q= 332 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-2/SLOT-1/CHAN-2 (is not EM) E= 899 t= -9812 Q= 940 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-2/SLOT-11/CHAN-2 (is not EM) E= 409 t= -15392 Q= 260 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-2/SLOT-11/CHAN-3 (is not EM) E= 273 t= -29691 Q= 30 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-2/SLOT-12/CHAN-0 (is not EM) E= 1089 t= -1 Q= 40866 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-2/SLOT-13/CHAN-38 (is not EM) E= 421 t= -567 Q= 215 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-2/SLOT-14/CHAN-0 (is not EM) E= 617 t= -1063 Q= 69 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-2/SLOT-14/CHAN-4 (is not EM) E= 770 t= 2041 Q= 553 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-3/SLOT-1/CHAN-118 (is not EM) E= 11564 t= -31277 Q= 30226 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-3/SLOT-2/CHAN-0 (is not EM) E= 584 t= -3997 Q= 3 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-3/SLOT-6/CHAN-33 Barrel l/e/p= 0/184/0: E= 1957 t= -13463 Q= 10 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-3/SLOT-6/CHAN-41 Barrel l/e/p= 0/168/0: E= 1888 t= -36909 Q= 57 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-3/SLOT-8/CHAN-12 Barrel l/e/p= 0/160/0: E= 3136 t= 2128 Q= 25 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-3/SLOT-8/CHAN-50 Barrel l/e/p= 0/184/0: E= 1569 t= -15702 Q= 45 P=0x21a5 G=1 +Channel: ENDCAP/C-SIDE/FT-1/SLOT-9/CHAN-14 (is not EM) E= 273 t= 4500 Q= 13 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-1/SLOT-9/CHAN-15 (is not EM) E= 334 t= -4479 Q= 33 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-1/SLOT-10/CHAN-14 (is not EM) E= 359 t= -10477 Q= 298 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-1/SLOT-13/CHAN-89 (is not EM) E= 592 t= -3698 Q= 332 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-2/SLOT-1/CHAN-2 (is not EM) E= 899 t= -9812 Q= 940 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-2/SLOT-11/CHAN-2 (is not EM) E= 409 t= -15392 Q= 260 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-2/SLOT-11/CHAN-3 (is not EM) E= 273 t= -29691 Q= 30 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-2/SLOT-12/CHAN-0 (is not EM) E= 1089 t= -1 Q= 40866 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-2/SLOT-13/CHAN-38 (is not EM) E= 421 t= -567 Q= 215 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-2/SLOT-14/CHAN-0 (is not EM) E= 617 t= -1063 Q= 69 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-2/SLOT-14/CHAN-4 (is not EM) E= 770 t= 2041 Q= 553 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-3/SLOT-1/CHAN-118 (is not EM) E= 11564 t= -31277 Q= 30226 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-3/SLOT-2/CHAN-0 (is not EM) E= 584 t= -3997 Q= 3 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-3/SLOT-6/CHAN-33 Barrel l/e/p= 0/184/0: E= 1957 t= -13463 Q= 10 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-3/SLOT-6/CHAN-41 Barrel l/e/p= 0/168/0: E= 1888 t= -36909 Q= 57 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-3/SLOT-8/CHAN-12 Barrel l/e/p= 0/160/0: E= 3136 t= 2128 Q= 25 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-3/SLOT-8/CHAN-50 Barrel l/e/p= 0/184/0: E= 1569 t= -15702 Q= 45 P=0x20a5 G=1 Channel: ENDCAP/C-SIDE/FT-4/SLOT-8/CHAN-13 (is not EM) E= 172 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-4/SLOT-9/CHAN-64 (is not EM) E= 296 t= -4100 Q= 12 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-4/SLOT-9/CHAN-91 (is not EM) E= 297 t= 936 Q= 5 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-4/SLOT-12/CHAN-91 (is not EM) E= 565 t= 2997 Q= 160 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-4/SLOT-9/CHAN-64 (is not EM) E= 296 t= -4100 Q= 12 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-4/SLOT-9/CHAN-91 (is not EM) E= 297 t= 936 Q= 5 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-4/SLOT-12/CHAN-91 (is not EM) E= 565 t= 2997 Q= 160 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-5/SLOT-2/CHAN-69 (is not EM) E= 182 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-5/SLOT-2/CHAN-70 (is not EM) E= 160 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-5/SLOT-3/CHAN-99 (is not EM) E= 240 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-5/SLOT-3/CHAN-100 (is not EM) E= 212 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-5/SLOT-5/CHAN-18 (is not EM) E= 315 t= -21566 Q= 53515 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-5/SLOT-9/CHAN-16 (is not EM) E= 371 t= -22815 Q= 4231 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-6/SLOT-1/CHAN-22 Barrel l/e/p= 1/368/0: E= -8172 t= -7545 Q= 464 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-6/SLOT-2/CHAN-86 Barrel l/e/p= 1/320/0: E= 6680 t= -35979 Q= 189 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-6/SLOT-4/CHAN-33 Barrel l/e/p= 2/16/0: E= 32363 t= -21880 Q= 975 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-6/SLOT-4/CHAN-36 Barrel l/e/p= 2/272/0: E= 36818 t= -7641 Q= 1806 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-6/SLOT-4/CHAN-37 Barrel l/e/p= 2/16/0: E= 31991 t= -187 Q= 2338 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-6/SLOT-6/CHAN-120 Barrel l/e/p= 3/448/0: E= 21923 t= -8986 Q= 3521 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-6/SLOT-7/CHAN-52 Barrel l/e/p= 3/432/0: E= 30916 t= -4389 Q= 8776 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-6/SLOT-7/CHAN-55 Barrel l/e/p= 3/176/0: E= 24227 t= -6623 Q= 2749 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-6/SLOT-10/CHAN-15 Barrel l/e/p= 0/96/0: E= 1658 t= -9225 Q= 2 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-6/SLOT-10/CHAN-100 Barrel l/e/p= 0/336/0: E= 7851 t= -2660 Q= 3 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-6/SLOT-11/CHAN-12 Barrel l/e/p= 0/288/0: E= 1785 t= -3688 Q= 6 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-6/SLOT-12/CHAN-1 Barrel l/e/p= 0/224/0: E= 8610 t= -4514 Q= 0 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-6/SLOT-13/CHAN-26 Barrel l/e/p= 1/416/0: E= -12074 t= -4759 Q= 19 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-6/SLOT-13/CHAN-86 Barrel l/e/p= 1/384/0: E= -35869 t= -10120 Q= 1995 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-6/SLOT-13/CHAN-90 Barrel l/e/p= 1/384/0: E= 36702 t= -1137 Q= 13 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-6/SLOT-14/CHAN-80 Barrel l/e/p= 0/288/0: E= -17045 t= 15169 Q= 840 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-6/SLOT-14/CHAN-81 Barrel l/e/p= 0/32/0: E= -20092 t= 6374 Q= 199 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-6/SLOT-14/CHAN-123 Barrel l/e/p= 0/0/0: E= -3956 t= -12385 Q= 15 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-6/SLOT-15/CHAN-67 Barrel l/e/p= 0/176/0: E= -11266 t= 1060 Q= 126 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-6/SLOT-15/CHAN-80 Barrel l/e/p= 0/416/0: E= -24401 t= 6648 Q= 1754 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-7/SLOT-4/CHAN-37 (is not EM) E= 325 t= 2091 Q= 292 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-5/SLOT-5/CHAN-18 (is not EM) E= 315 t= -21566 Q= 53515 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-5/SLOT-9/CHAN-16 (is not EM) E= 371 t= -22815 Q= 4231 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-6/SLOT-1/CHAN-22 Barrel l/e/p= 1/368/0: E= -8172 t= -7545 Q= 464 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-6/SLOT-2/CHAN-86 Barrel l/e/p= 1/320/0: E= 6680 t= -35979 Q= 189 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-6/SLOT-4/CHAN-33 Barrel l/e/p= 2/16/0: E= 32363 t= -21880 Q= 975 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-6/SLOT-4/CHAN-36 Barrel l/e/p= 2/272/0: E= 36818 t= -7641 Q= 1806 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-6/SLOT-4/CHAN-37 Barrel l/e/p= 2/16/0: E= 31991 t= -187 Q= 2338 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-6/SLOT-6/CHAN-120 Barrel l/e/p= 3/448/0: E= 21923 t= -8986 Q= 3521 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-6/SLOT-7/CHAN-52 Barrel l/e/p= 3/432/0: E= 30916 t= -4389 Q= 8776 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-6/SLOT-7/CHAN-55 Barrel l/e/p= 3/176/0: E= 24227 t= -6623 Q= 2749 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-6/SLOT-10/CHAN-15 Barrel l/e/p= 0/96/0: E= 1658 t= -9225 Q= 2 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-6/SLOT-10/CHAN-100 Barrel l/e/p= 0/336/0: E= 7851 t= -2660 Q= 3 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-6/SLOT-11/CHAN-12 Barrel l/e/p= 0/288/0: E= 1785 t= -3688 Q= 6 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-6/SLOT-12/CHAN-1 Barrel l/e/p= 0/224/0: E= 8610 t= -4514 Q= 0 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-6/SLOT-13/CHAN-26 Barrel l/e/p= 1/416/0: E= -12074 t= -4759 Q= 19 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-6/SLOT-13/CHAN-86 Barrel l/e/p= 1/384/0: E= -35869 t= -10120 Q= 1995 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-6/SLOT-13/CHAN-90 Barrel l/e/p= 1/384/0: E= 36702 t= -1137 Q= 13 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-6/SLOT-14/CHAN-80 Barrel l/e/p= 0/288/0: E= -17045 t= 15169 Q= 840 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-6/SLOT-14/CHAN-81 Barrel l/e/p= 0/32/0: E= -20092 t= 6374 Q= 199 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-6/SLOT-14/CHAN-123 Barrel l/e/p= 0/0/0: E= -3956 t= -12385 Q= 15 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-6/SLOT-15/CHAN-67 Barrel l/e/p= 0/176/0: E= -11266 t= 1060 Q= 126 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-6/SLOT-15/CHAN-80 Barrel l/e/p= 0/416/0: E= -24401 t= 6648 Q= 1754 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-7/SLOT-4/CHAN-37 (is not EM) E= 325 t= 2091 Q= 292 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-7/SLOT-8/CHAN-7 (is not EM) E= 242 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-7/SLOT-8/CHAN-58 (is not EM) E= 178 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-7/SLOT-10/CHAN-64 (is not EM) E= 599 t= -587 Q= 27 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-7/SLOT-11/CHAN-101 (is not EM) E= 431 t= -31082 Q= 5992 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-7/SLOT-10/CHAN-64 (is not EM) E= 599 t= -587 Q= 27 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-7/SLOT-11/CHAN-101 (is not EM) E= 431 t= -31082 Q= 5992 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-8/SLOT-5/CHAN-102 (is not EM) E= -220 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-8/SLOT-6/CHAN-27 (is not EM) E= 373 t= -1292 Q= 144 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-8/SLOT-6/CHAN-27 (is not EM) E= 373 t= -1292 Q= 144 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-8/SLOT-8/CHAN-41 (is not EM) E= 192 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-8/SLOT-10/CHAN-52 (is not EM) E= 357 t= 2335 Q= 2 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-8/SLOT-10/CHAN-104 (is not EM) E= 392 t= -16454 Q= 1377 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-9/SLOT-1/CHAN-8 (is not EM) E= 1671 t= -9228 Q= 22897 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-8/SLOT-10/CHAN-52 (is not EM) E= 357 t= 2335 Q= 2 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-8/SLOT-10/CHAN-104 (is not EM) E= 392 t= -16454 Q= 1377 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-9/SLOT-1/CHAN-8 (is not EM) E= 1671 t= -9228 Q= 22897 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-9/SLOT-7/CHAN-8 (is not EM) E= 149 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-9/SLOT-7/CHAN-9 (is not EM) E= 251 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-9/SLOT-7/CHAN-10 (is not EM) E= 114 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-9/SLOT-9/CHAN-12 (is not EM) E= 210 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-9/SLOT-9/CHAN-62 (is not EM) E= 214 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-9/SLOT-9/CHAN-121 (is not EM) E= 225 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-9/SLOT-10/CHAN-2 (is not EM) E= 436 t= 194 Q= 73 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-9/SLOT-10/CHAN-125 (is not EM) E= 567 t= -210 Q= 4 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-9/SLOT-13/CHAN-96 (is not EM) E= 364 t= 6 Q= 98 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-9/SLOT-14/CHAN-88 (is not EM) E= 851 t= 2001 Q= 476 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-10/SLOT-2/CHAN-74 (is not EM) E= 1559 t= 3252 Q= 110 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-10/SLOT-9/CHAN-109 Barrel l/e/p= 2/32/0: E= 12828 t= -724 Q= 1402 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-11/SLOT-1/CHAN-1 (is not EM) E= 1092 t= -20346 Q= 970 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-11/SLOT-8/CHAN-76 (is not EM) E= 323 t= -2383 Q= 41 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-11/SLOT-9/CHAN-116 (is not EM) E= 354 t= 2380 Q= 124 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-11/SLOT-10/CHAN-99 (is not EM) E= 617 t= -5433 Q= 21 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-12/SLOT-3/CHAN-120 (is not EM) E= 414 t= -104 Q= 2486 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-9/SLOT-10/CHAN-2 (is not EM) E= 436 t= 194 Q= 73 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-9/SLOT-10/CHAN-125 (is not EM) E= 567 t= -210 Q= 4 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-9/SLOT-13/CHAN-96 (is not EM) E= 364 t= 6 Q= 98 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-9/SLOT-14/CHAN-88 (is not EM) E= 851 t= 2001 Q= 476 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-10/SLOT-2/CHAN-74 (is not EM) E= 1559 t= 3252 Q= 110 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-10/SLOT-9/CHAN-109 Barrel l/e/p= 2/32/0: E= 12828 t= -724 Q= 1402 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-11/SLOT-1/CHAN-1 (is not EM) E= 1092 t= -20346 Q= 970 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-11/SLOT-8/CHAN-76 (is not EM) E= 323 t= -2383 Q= 41 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-11/SLOT-9/CHAN-116 (is not EM) E= 354 t= 2380 Q= 124 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-11/SLOT-10/CHAN-99 (is not EM) E= 617 t= -5433 Q= 21 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-12/SLOT-3/CHAN-120 (is not EM) E= 414 t= -104 Q= 2486 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-12/SLOT-3/CHAN-121 (is not EM) E= 162 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-12/SLOT-7/CHAN-85 (is not EM) E= 646 t= 2584 Q= 5805 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-12/SLOT-10/CHAN-83 (is not EM) E= 736 t= -1994 Q= 316 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-12/SLOT-13/CHAN-43 (is not EM) E= 451 t= -2500 Q= 888 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-13/SLOT-1/CHAN-6 (is not EM) E= 868 t= -24666 Q= 434 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-13/SLOT-7/CHAN-77 (is not EM) E= 623 t= -4659 Q= 1910 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-13/SLOT-7/CHAN-78 (is not EM) E= 1246 t= 626 Q= 543 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-12/SLOT-7/CHAN-85 (is not EM) E= 646 t= 2584 Q= 5805 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-12/SLOT-10/CHAN-83 (is not EM) E= 736 t= -1994 Q= 316 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-12/SLOT-13/CHAN-43 (is not EM) E= 451 t= -2500 Q= 888 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-13/SLOT-1/CHAN-6 (is not EM) E= 868 t= -24666 Q= 434 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-13/SLOT-7/CHAN-77 (is not EM) E= 623 t= -4659 Q= 1910 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-13/SLOT-7/CHAN-78 (is not EM) E= 1246 t= 626 Q= 543 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-13/SLOT-8/CHAN-6 (is not EM) E= -168 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-13/SLOT-8/CHAN-118 (is not EM) E= 206 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-13/SLOT-13/CHAN-120 (is not EM) E= 934 t= -42182 Q= 20791 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-13/SLOT-13/CHAN-120 (is not EM) E= 934 t= -42182 Q= 20791 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-14/SLOT-3/CHAN-51 (is not EM) E= 161 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-14/SLOT-8/CHAN-99 (is not EM) E= 208 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-14/SLOT-10/CHAN-91 (is not EM) E= 619 t= -2326 Q= 315 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-14/SLOT-12/CHAN-55 (is not EM) E= 665 t= 533 Q= 13 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-15/SLOT-1/CHAN-8 (is not EM) E= 1069 t= -9526 Q= 27704 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-15/SLOT-1/CHAN-52 (is not EM) E= 949 t= -17504 Q= 307 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-15/SLOT-2/CHAN-92 (is not EM) E= 1033 t= -27058 Q= 212 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-14/SLOT-10/CHAN-91 (is not EM) E= 619 t= -2326 Q= 315 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-14/SLOT-12/CHAN-55 (is not EM) E= 665 t= 533 Q= 13 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-15/SLOT-1/CHAN-8 (is not EM) E= 1069 t= -9526 Q= 27704 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-15/SLOT-1/CHAN-52 (is not EM) E= 949 t= -17504 Q= 307 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-15/SLOT-2/CHAN-92 (is not EM) E= 1033 t= -27058 Q= 212 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-15/SLOT-3/CHAN-32 (is not EM) E= 187 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-15/SLOT-4/CHAN-45 (is not EM) E= 360 t= -3870 Q= 44 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-15/SLOT-4/CHAN-45 (is not EM) E= 360 t= -3870 Q= 44 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-15/SLOT-7/CHAN-65 (is not EM) E= 105 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-15/SLOT-7/CHAN-67 (is not EM) E= 101 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-17/SLOT-2/CHAN-44 (is not EM) E= 190 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-17/SLOT-3/CHAN-66 (is not EM) E= 176 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-18/SLOT-3/CHAN-68 (is not EM) E= 153 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-18/SLOT-6/CHAN-101 (is not EM) E= 396 t= -1564 Q= 6733 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-18/SLOT-7/CHAN-95 (is not EM) E= 524 t= -21021 Q= 53060 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-18/SLOT-6/CHAN-101 (is not EM) E= 396 t= -1564 Q= 6733 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-18/SLOT-7/CHAN-95 (is not EM) E= 524 t= -21021 Q= 53060 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-18/SLOT-8/CHAN-64 (is not EM) E= 198 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-18/SLOT-8/CHAN-69 (is not EM) E= 481 t= 1196 Q= 38 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-18/SLOT-8/CHAN-119 (is not EM) E= 347 t= -19742 Q= 4482 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-18/SLOT-8/CHAN-124 (is not EM) E= 263 t= -3374 Q= 319 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-18/SLOT-8/CHAN-125 (is not EM) E= 358 t= -159 Q= 136 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-18/SLOT-12/CHAN-55 (is not EM) E= 508 t= -1943 Q= 41 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-19/SLOT-1/CHAN-22 (is not EM) E= 1088 t= -17113 Q= 661 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-18/SLOT-8/CHAN-69 (is not EM) E= 481 t= 1196 Q= 38 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-18/SLOT-8/CHAN-119 (is not EM) E= 347 t= -19742 Q= 4482 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-18/SLOT-8/CHAN-124 (is not EM) E= 263 t= -3374 Q= 319 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-18/SLOT-8/CHAN-125 (is not EM) E= 358 t= -159 Q= 136 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-18/SLOT-12/CHAN-55 (is not EM) E= 508 t= -1943 Q= 41 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-19/SLOT-1/CHAN-22 (is not EM) E= 1088 t= -17113 Q= 661 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-19/SLOT-4/CHAN-101 (is not EM) E= 244 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-19/SLOT-4/CHAN-102 (is not EM) E= 211 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-19/SLOT-8/CHAN-11 (is not EM) E= 157 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-19/SLOT-13/CHAN-115 (is not EM) E= 829 t= -240 Q= 4502 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-19/SLOT-13/CHAN-115 (is not EM) E= 829 t= -240 Q= 4502 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-20/SLOT-2/CHAN-109 (is not EM) E= 139 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-20/SLOT-3/CHAN-46 (is not EM) E= 206 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-20/SLOT-7/CHAN-40 (is not EM) E= 500 t= -455 Q= 2519 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-20/SLOT-7/CHAN-41 (is not EM) E= 462 t= -9849 Q= 14776 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-20/SLOT-9/CHAN-125 (is not EM) E= -406 t= -4867 Q= 1050 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-20/SLOT-10/CHAN-87 (is not EM) E= 510 t= -4459 Q= 11 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-20/SLOT-11/CHAN-64 (is not EM) E= 515 t= 2291 Q= 33 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-20/SLOT-11/CHAN-74 (is not EM) E= 591 t= -5580 Q= 386 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-20/SLOT-13/CHAN-69 (is not EM) E= 663 t= -1149 Q= 264 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-20/SLOT-13/CHAN-73 (is not EM) E= 1720 t= -2379 Q= 214 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-20/SLOT-13/CHAN-74 (is not EM) E= 587 t= -5539 Q= 310 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-20/SLOT-7/CHAN-40 (is not EM) E= 500 t= -455 Q= 2519 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-20/SLOT-7/CHAN-41 (is not EM) E= 462 t= -9849 Q= 14776 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-20/SLOT-9/CHAN-125 (is not EM) E= -406 t= -4867 Q= 1050 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-20/SLOT-10/CHAN-87 (is not EM) E= 510 t= -4459 Q= 11 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-20/SLOT-11/CHAN-64 (is not EM) E= 515 t= 2291 Q= 33 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-20/SLOT-11/CHAN-74 (is not EM) E= 591 t= -5580 Q= 386 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-20/SLOT-13/CHAN-69 (is not EM) E= 663 t= -1149 Q= 264 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-20/SLOT-13/CHAN-73 (is not EM) E= 1720 t= -2379 Q= 214 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-20/SLOT-13/CHAN-74 (is not EM) E= 587 t= -5539 Q= 310 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-21/SLOT-3/CHAN-101 (is not EM) E= 193 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-21/SLOT-4/CHAN-11 (is not EM) E= 422 t= -12359 Q= 757 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-21/SLOT-6/CHAN-22 (is not EM) E= -374 t= -658 Q= 5957 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-21/SLOT-4/CHAN-11 (is not EM) E= 422 t= -12359 Q= 757 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-21/SLOT-6/CHAN-22 (is not EM) E= -374 t= -658 Q= 5957 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-21/SLOT-9/CHAN-77 (is not EM) E= 185 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-21/SLOT-10/CHAN-39 (is not EM) E= -346 t= 313 Q= 652 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-21/SLOT-13/CHAN-81 (is not EM) E= 378 t= -2087 Q= 160 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-21/SLOT-13/CHAN-88 (is not EM) E= 477 t= -6249 Q= 647 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-21/SLOT-13/CHAN-89 (is not EM) E= 353 t= -4822 Q= 172 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-21/SLOT-14/CHAN-36 (is not EM) E= 1134 t= -48528 Q= 56886 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-21/SLOT-14/CHAN-96 (is not EM) E= 1458 t= -2351 Q= 284 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-21/SLOT-14/CHAN-97 (is not EM) E= 1078 t= -643 Q= 280 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-22/SLOT-7/CHAN-107 Barrel l/e/p= 0/328/0: E= -1517 t= -7657 Q= 119 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-22/SLOT-8/CHAN-101 Barrel l/e/p= 0/272/0: E= 3063 t= 5394 Q= 12 P=0x21a5 G=1 +Channel: ENDCAP/C-SIDE/FT-21/SLOT-10/CHAN-39 (is not EM) E= -346 t= 313 Q= 652 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-21/SLOT-13/CHAN-81 (is not EM) E= 378 t= -2087 Q= 160 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-21/SLOT-13/CHAN-88 (is not EM) E= 477 t= -6249 Q= 647 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-21/SLOT-13/CHAN-89 (is not EM) E= 353 t= -4822 Q= 172 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-21/SLOT-14/CHAN-36 (is not EM) E= 1134 t= -48528 Q= 56886 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-21/SLOT-14/CHAN-96 (is not EM) E= 1458 t= -2351 Q= 284 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-21/SLOT-14/CHAN-97 (is not EM) E= 1078 t= -643 Q= 280 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-22/SLOT-7/CHAN-107 Barrel l/e/p= 0/328/0: E= -1517 t= -7657 Q= 119 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-22/SLOT-8/CHAN-101 Barrel l/e/p= 0/272/0: E= 3063 t= 5394 Q= 12 P=0x20a5 G=1 Channel: ENDCAP/C-SIDE/FT-23/SLOT-2/CHAN-123 (is not EM) E= 137 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-23/SLOT-7/CHAN-26 (is not EM) E= 731 t= -24806 Q= 65535 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-23/SLOT-7/CHAN-35 (is not EM) E= 342 t= -1798 Q= 226 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-23/SLOT-7/CHAN-79 (is not EM) E= 460 t= 466 Q= 1588 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-23/SLOT-7/CHAN-99 (is not EM) E= 711 t= 208 Q= 2356 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-23/SLOT-7/CHAN-100 (is not EM) E= 512 t= 245 Q= 4809 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-23/SLOT-9/CHAN-84 (is not EM) E= 291 t= -27863 Q= 3626 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-23/SLOT-9/CHAN-125 (is not EM) E= 514 t= -2107 Q= 140 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-23/SLOT-9/CHAN-126 (is not EM) E= 725 t= -740 Q= 88 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-23/SLOT-9/CHAN-127 (is not EM) E= 395 t= -1740 Q= 132 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-23/SLOT-7/CHAN-26 (is not EM) E= 731 t= -24806 Q= 65535 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-23/SLOT-7/CHAN-35 (is not EM) E= 342 t= -1798 Q= 226 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-23/SLOT-7/CHAN-79 (is not EM) E= 460 t= 466 Q= 1588 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-23/SLOT-7/CHAN-99 (is not EM) E= 711 t= 208 Q= 2356 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-23/SLOT-7/CHAN-100 (is not EM) E= 512 t= 245 Q= 4809 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-23/SLOT-9/CHAN-84 (is not EM) E= 291 t= -27863 Q= 3626 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-23/SLOT-9/CHAN-125 (is not EM) E= 514 t= -2107 Q= 140 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-23/SLOT-9/CHAN-126 (is not EM) E= 725 t= -740 Q= 88 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-23/SLOT-9/CHAN-127 (is not EM) E= 395 t= -1740 Q= 132 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-24/SLOT-3/CHAN-77 (is not EM) E= 147 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-24/SLOT-3/CHAN-78 (is not EM) E= 146 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-24/SLOT-7/CHAN-77 (is not EM) E= 441 t= -20254 Q= 34032 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-24/SLOT-7/CHAN-77 (is not EM) E= 441 t= -20254 Q= 34032 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-24/SLOT-8/CHAN-0 (is not EM) E= 174 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-24/SLOT-8/CHAN-3 (is not EM) E= 197 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-24/SLOT-9/CHAN-81 (is not EM) E= 380 t= -1216 Q= 97 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-24/SLOT-13/CHAN-23 (is not EM) E= 606 t= -24676 Q= 2902 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-0/SLOT-1/CHAN-10 (is not EM) E= 996 t= 1080 Q= 526 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-24/SLOT-9/CHAN-81 (is not EM) E= 380 t= -1216 Q= 97 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-24/SLOT-13/CHAN-23 (is not EM) E= 606 t= -24676 Q= 2902 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-0/SLOT-1/CHAN-10 (is not EM) E= 996 t= 1080 Q= 526 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-0/SLOT-4/CHAN-6 (is not EM) E= 255 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-0/SLOT-4/CHAN-7 (is not EM) E= 386 t= -354 Q= 656 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-0/SLOT-4/CHAN-8 (is not EM) E= 444 t= 913 Q= 282 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-0/SLOT-7/CHAN-99 (is not EM) E= 365 t= -2043 Q= 1823 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-0/SLOT-10/CHAN-29 (is not EM) E= 469 t= 4125 Q= 52 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-0/SLOT-11/CHAN-6 (is not EM) E= 766 t= -2789 Q= 68 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-0/SLOT-11/CHAN-20 (is not EM) E= 484 t= 2308 Q= 100 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-0/SLOT-11/CHAN-78 (is not EM) E= 444 t= -847 Q= 240 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-0/SLOT-12/CHAN-2 (is not EM) E= 600 t= -2202 Q= 55 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-0/SLOT-4/CHAN-7 (is not EM) E= 386 t= -354 Q= 656 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-0/SLOT-4/CHAN-8 (is not EM) E= 444 t= 913 Q= 282 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-0/SLOT-7/CHAN-99 (is not EM) E= 365 t= -2043 Q= 1823 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-0/SLOT-10/CHAN-29 (is not EM) E= 469 t= 4125 Q= 52 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-0/SLOT-11/CHAN-6 (is not EM) E= 766 t= -2789 Q= 68 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-0/SLOT-11/CHAN-20 (is not EM) E= 484 t= 2308 Q= 100 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-0/SLOT-11/CHAN-78 (is not EM) E= 444 t= -847 Q= 240 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-0/SLOT-12/CHAN-2 (is not EM) E= 600 t= -2202 Q= 55 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-1/SLOT-2/CHAN-45 (is not EM) E= 118 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-1/SLOT-4/CHAN-110 (is not EM) E= 197 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-1/SLOT-7/CHAN-17 (is not EM) E= 505 t= 3386 Q= 4334 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-1/SLOT-7/CHAN-29 (is not EM) E= 430 t= -922 Q= 4343 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-1/SLOT-8/CHAN-3 (is not EM) E= 278 t= -6195 Q= 427 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-1/SLOT-7/CHAN-17 (is not EM) E= 505 t= 3386 Q= 4334 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-1/SLOT-7/CHAN-29 (is not EM) E= 430 t= -922 Q= 4343 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-1/SLOT-8/CHAN-3 (is not EM) E= 278 t= -6195 Q= 427 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-1/SLOT-8/CHAN-8 (is not EM) E= 187 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-1/SLOT-8/CHAN-36 (is not EM) E= -229 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-1/SLOT-10/CHAN-71 (is not EM) E= 597 t= 5633 Q= 36 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-1/SLOT-13/CHAN-19 (is not EM) E= 508 t= -2545 Q= 79 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-1/SLOT-10/CHAN-71 (is not EM) E= 597 t= 5633 Q= 36 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-1/SLOT-13/CHAN-19 (is not EM) E= 508 t= -2545 Q= 79 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-2/SLOT-6/CHAN-90 (is not EM) E= 126 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-2/SLOT-7/CHAN-102 (is not EM) E= 200 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-2/SLOT-7/CHAN-103 (is not EM) E= 137 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-2/SLOT-7/CHAN-104 (is not EM) E= 143 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-2/SLOT-8/CHAN-60 (is not EM) E= 167 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-2/SLOT-9/CHAN-53 (is not EM) E= 283 t= -10564 Q= 22 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-2/SLOT-9/CHAN-70 (is not EM) E= 321 t= -13498 Q= 11257 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-2/SLOT-9/CHAN-71 (is not EM) E= 457 t= -11505 Q= 11955 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-2/SLOT-9/CHAN-53 (is not EM) E= 283 t= -10564 Q= 22 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-2/SLOT-9/CHAN-70 (is not EM) E= 321 t= -13498 Q= 11257 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-2/SLOT-9/CHAN-71 (is not EM) E= 457 t= -11505 Q= 11955 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-2/SLOT-9/CHAN-91 (is not EM) E= 138 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-3/SLOT-2/CHAN-42 (is not EM) E= 1168 t= 1356 Q= 112 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-3/SLOT-8/CHAN-2 Barrel l/e/p= 0/64/0: E= 3142 t= 20735 Q= 41 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-3/SLOT-9/CHAN-33 Barrel l/e/p= 2/0/0: E= -6211 t= -2872 Q= 2613 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-3/SLOT-10/CHAN-75 Barrel l/e/p= 1/112/0: E= 1890 t= -13064 Q= 168 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-3/SLOT-10/CHAN-116 Barrel l/e/p= 2/56/0: E= 7520 t= -7496 Q= 4461 P=0x21a5 G=1 +Channel: ENDCAP/A-SIDE/FT-3/SLOT-2/CHAN-42 (is not EM) E= 1168 t= 1356 Q= 112 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-3/SLOT-8/CHAN-2 Barrel l/e/p= 0/64/0: E= 3142 t= 20735 Q= 41 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-3/SLOT-9/CHAN-33 Barrel l/e/p= 2/0/0: E= -6211 t= -2872 Q= 2613 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-3/SLOT-10/CHAN-75 Barrel l/e/p= 1/112/0: E= 1890 t= -13064 Q= 168 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-3/SLOT-10/CHAN-116 Barrel l/e/p= 2/56/0: E= 7520 t= -7496 Q= 4461 P=0x20a5 G=1 Channel: ENDCAP/A-SIDE/FT-4/SLOT-3/CHAN-17 (is not EM) E= 237 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-4/SLOT-3/CHAN-18 (is not EM) E= 852 t= -230 Q= 651 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-4/SLOT-3/CHAN-19 (is not EM) E= 1035 t= 916 Q= 219 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-4/SLOT-3/CHAN-20 (is not EM) E= 761 t= -673 Q= 171 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-4/SLOT-3/CHAN-21 (is not EM) E= 415 t= -736 Q= 400 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-4/SLOT-3/CHAN-18 (is not EM) E= 852 t= -230 Q= 651 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-4/SLOT-3/CHAN-19 (is not EM) E= 1035 t= 916 Q= 219 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-4/SLOT-3/CHAN-20 (is not EM) E= 761 t= -673 Q= 171 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-4/SLOT-3/CHAN-21 (is not EM) E= 415 t= -736 Q= 400 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-4/SLOT-3/CHAN-22 (is not EM) E= 175 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-4/SLOT-10/CHAN-73 (is not EM) E= 609 t= 6131 Q= 209 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-4/SLOT-10/CHAN-74 (is not EM) E= 1121 t= -1057 Q= 18 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-4/SLOT-11/CHAN-9 (is not EM) E= -437 t= -1535 Q= 21 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-4/SLOT-10/CHAN-73 (is not EM) E= 609 t= 6131 Q= 209 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-4/SLOT-10/CHAN-74 (is not EM) E= 1121 t= -1057 Q= 18 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-4/SLOT-11/CHAN-9 (is not EM) E= -437 t= -1535 Q= 21 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-5/SLOT-2/CHAN-63 (is not EM) E= 156 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-5/SLOT-3/CHAN-32 (is not EM) E= 136 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-5/SLOT-3/CHAN-104 (is not EM) E= 165 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-5/SLOT-3/CHAN-105 (is not EM) E= 172 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-6/SLOT-2/CHAN-40 Barrel l/e/p= 2/288/0: E= 20077 t= -3462 Q= 285 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-6/SLOT-4/CHAN-42 Barrel l/e/p= 2/352/0: E= 18214 t= -37013 Q= 1245 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-6/SLOT-4/CHAN-55 Barrel l/e/p= 3/96/0: E= 29669 t= -9572 Q= 3929 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-6/SLOT-6/CHAN-24 Barrel l/e/p= 1/416/0: E= -9720 t= -9156 Q= 760 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-6/SLOT-6/CHAN-49 Barrel l/e/p= 3/160/0: E= 52173 t= -456 Q= 17766 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-6/SLOT-9/CHAN-44 Barrel l/e/p= 2/480/0: E= 34358 t= -1940 Q= 136 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-6/SLOT-9/CHAN-46 Barrel l/e/p= 2/480/0: E= 11782 t= -3301 Q= 101 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-6/SLOT-11/CHAN-4 Barrel l/e/p= 0/336/0: E= 13563 t= -216 Q= 3 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-6/SLOT-11/CHAN-108 Barrel l/e/p= 0/352/0: E= 1879 t= -1147 Q= 2 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-6/SLOT-12/CHAN-56 Barrel l/e/p= 1/384/0: E= 13745 t= -27531 Q= 456 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-6/SLOT-14/CHAN-65 Barrel l/e/p= 0/112/0: E= -25454 t= 3328 Q= 128 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-6/SLOT-15/CHAN-33 Barrel l/e/p= 0/144/0: E= 26492 t= -3069 Q= 27 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-6/SLOT-15/CHAN-85 Barrel l/e/p= 0/224/0: E= -41736 t= -4272 Q= 72 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-7/SLOT-11/CHAN-20 (is not EM) E= 433 t= 1905 Q= 29 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-7/SLOT-11/CHAN-24 (is not EM) E= 987 t= -2803 Q= 77 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-7/SLOT-11/CHAN-25 (is not EM) E= 431 t= -4743 Q= 61 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-7/SLOT-12/CHAN-50 (is not EM) E= 1249 t= -2204 Q= 128 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-7/SLOT-12/CHAN-51 (is not EM) E= 465 t= 1154 Q= 110 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-6/SLOT-2/CHAN-40 Barrel l/e/p= 2/288/0: E= 20077 t= -3462 Q= 285 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-6/SLOT-4/CHAN-42 Barrel l/e/p= 2/352/0: E= 18214 t= -37013 Q= 1245 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-6/SLOT-4/CHAN-55 Barrel l/e/p= 3/96/0: E= 29669 t= -9572 Q= 3929 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-6/SLOT-6/CHAN-24 Barrel l/e/p= 1/416/0: E= -9720 t= -9156 Q= 760 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-6/SLOT-6/CHAN-49 Barrel l/e/p= 3/160/0: E= 52173 t= -456 Q= 17766 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-6/SLOT-9/CHAN-44 Barrel l/e/p= 2/480/0: E= 34358 t= -1940 Q= 136 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-6/SLOT-9/CHAN-46 Barrel l/e/p= 2/480/0: E= 11782 t= -3301 Q= 101 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-6/SLOT-11/CHAN-4 Barrel l/e/p= 0/336/0: E= 13563 t= -216 Q= 3 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-6/SLOT-11/CHAN-108 Barrel l/e/p= 0/352/0: E= 1879 t= -1147 Q= 2 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-6/SLOT-12/CHAN-56 Barrel l/e/p= 1/384/0: E= 13745 t= -27531 Q= 456 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-6/SLOT-14/CHAN-65 Barrel l/e/p= 0/112/0: E= -25454 t= 3328 Q= 128 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-6/SLOT-15/CHAN-33 Barrel l/e/p= 0/144/0: E= 26492 t= -3069 Q= 27 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-6/SLOT-15/CHAN-85 Barrel l/e/p= 0/224/0: E= -41736 t= -4272 Q= 72 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-7/SLOT-11/CHAN-20 (is not EM) E= 433 t= 1905 Q= 29 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-7/SLOT-11/CHAN-24 (is not EM) E= 987 t= -2803 Q= 77 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-7/SLOT-11/CHAN-25 (is not EM) E= 431 t= -4743 Q= 61 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-7/SLOT-12/CHAN-50 (is not EM) E= 1249 t= -2204 Q= 128 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-7/SLOT-12/CHAN-51 (is not EM) E= 465 t= 1154 Q= 110 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-8/SLOT-2/CHAN-61 (is not EM) E= 127 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-8/SLOT-6/CHAN-49 (is not EM) E= 345 t= -2264 Q= 221 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-8/SLOT-6/CHAN-50 (is not EM) E= 1270 t= 603 Q= 303 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-8/SLOT-6/CHAN-51 (is not EM) E= 392 t= 159 Q= 458 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-8/SLOT-7/CHAN-105 (is not EM) E= 609 t= 1229 Q= 3507 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-8/SLOT-12/CHAN-67 (is not EM) E= 516 t= 1994 Q= 37 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-8/SLOT-12/CHAN-80 (is not EM) E= 1941 t= -80 Q= 162 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-8/SLOT-13/CHAN-106 (is not EM) E= 872 t= -585 Q= 102 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-8/SLOT-13/CHAN-107 (is not EM) E= 761 t= -195 Q= 156 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-9/SLOT-1/CHAN-32 (is not EM) E= 972 t= -7799 Q= 30 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-9/SLOT-1/CHAN-33 (is not EM) E= 1204 t= -13876 Q= 319 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-8/SLOT-6/CHAN-49 (is not EM) E= 345 t= -2264 Q= 221 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-8/SLOT-6/CHAN-50 (is not EM) E= 1270 t= 603 Q= 303 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-8/SLOT-6/CHAN-51 (is not EM) E= 392 t= 159 Q= 458 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-8/SLOT-7/CHAN-105 (is not EM) E= 609 t= 1229 Q= 3507 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-8/SLOT-12/CHAN-67 (is not EM) E= 516 t= 1994 Q= 37 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-8/SLOT-12/CHAN-80 (is not EM) E= 1941 t= -80 Q= 162 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-8/SLOT-13/CHAN-106 (is not EM) E= 872 t= -585 Q= 102 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-8/SLOT-13/CHAN-107 (is not EM) E= 761 t= -195 Q= 156 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-9/SLOT-1/CHAN-32 (is not EM) E= 972 t= -7799 Q= 30 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-9/SLOT-1/CHAN-33 (is not EM) E= 1204 t= -13876 Q= 319 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-9/SLOT-3/CHAN-117 (is not EM) E= 203 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-9/SLOT-6/CHAN-32 (is not EM) E= 130 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-9/SLOT-7/CHAN-50 (is not EM) E= 138 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-9/SLOT-15/CHAN-51 (is not EM) E= 998 t= -3731 Q= 1199 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-9/SLOT-15/CHAN-64 (is not EM) E= 856 t= -2106 Q= 451 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-9/SLOT-15/CHAN-67 (is not EM) E= 632 t= -1346 Q= 383 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-10/SLOT-1/CHAN-33 (is not EM) E= 14343 t= -4165 Q= 98 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-10/SLOT-1/CHAN-36 (is not EM) E= 6973 t= -7908 Q= 415 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-10/SLOT-1/CHAN-37 (is not EM) E= 6631 t= -2962 Q= 219 P=0x21a5 G=1 +Channel: ENDCAP/A-SIDE/FT-9/SLOT-15/CHAN-51 (is not EM) E= 998 t= -3731 Q= 1199 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-9/SLOT-15/CHAN-64 (is not EM) E= 856 t= -2106 Q= 451 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-9/SLOT-15/CHAN-67 (is not EM) E= 632 t= -1346 Q= 383 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-10/SLOT-1/CHAN-33 (is not EM) E= 14343 t= -4165 Q= 98 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-10/SLOT-1/CHAN-36 (is not EM) E= 6973 t= -7908 Q= 415 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-10/SLOT-1/CHAN-37 (is not EM) E= 6631 t= -2962 Q= 219 P=0x20a5 G=1 Channel: ENDCAP/A-SIDE/FT-11/SLOT-4/CHAN-0 (is not EM) E= 248 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-11/SLOT-9/CHAN-29 (is not EM) E= 277 t= -3522 Q= 117 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-11/SLOT-9/CHAN-84 (is not EM) E= 685 t= -26851 Q= 19638 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-11/SLOT-9/CHAN-85 (is not EM) E= 1001 t= -25755 Q= 28208 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-11/SLOT-10/CHAN-81 (is not EM) E= 1331 t= 613 Q= 86 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-11/SLOT-11/CHAN-0 (is not EM) E= 605 t= -4878 Q= 51 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-11/SLOT-12/CHAN-57 (is not EM) E= 558 t= -1822 Q= 39 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-11/SLOT-9/CHAN-29 (is not EM) E= 277 t= -3522 Q= 117 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-11/SLOT-9/CHAN-84 (is not EM) E= 685 t= -26851 Q= 19638 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-11/SLOT-9/CHAN-85 (is not EM) E= 1001 t= -25755 Q= 28208 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-11/SLOT-10/CHAN-81 (is not EM) E= 1331 t= 613 Q= 86 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-11/SLOT-11/CHAN-0 (is not EM) E= 605 t= -4878 Q= 51 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-11/SLOT-12/CHAN-57 (is not EM) E= 558 t= -1822 Q= 39 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-12/SLOT-4/CHAN-4 (is not EM) E= 210 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-12/SLOT-8/CHAN-67 (is not EM) E= 208 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-12/SLOT-9/CHAN-4 (is not EM) E= 313 t= 2749 Q= 55 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-12/SLOT-11/CHAN-106 (is not EM) E= -444 t= -428 Q= 2489 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-12/SLOT-11/CHAN-109 (is not EM) E= -434 t= 4514 Q= 3791 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-12/SLOT-11/CHAN-110 (is not EM) E= -629 t= 41 Q= 9693 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-13/SLOT-3/CHAN-37 (is not EM) E= 298 t= 2267 Q= 1084 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-12/SLOT-9/CHAN-4 (is not EM) E= 313 t= 2749 Q= 55 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-12/SLOT-11/CHAN-106 (is not EM) E= -444 t= -428 Q= 2489 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-12/SLOT-11/CHAN-109 (is not EM) E= -434 t= 4514 Q= 3791 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-12/SLOT-11/CHAN-110 (is not EM) E= -629 t= 41 Q= 9693 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-13/SLOT-3/CHAN-37 (is not EM) E= 298 t= 2267 Q= 1084 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-13/SLOT-3/CHAN-38 (is not EM) E= 187 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-13/SLOT-3/CHAN-41 (is not EM) E= 216 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-13/SLOT-3/CHAN-127 (is not EM) E= 164 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-13/SLOT-5/CHAN-72 (is not EM) E= 236 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-13/SLOT-6/CHAN-24 (is not EM) E= -453 t= -27922 Q= 65535 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-13/SLOT-6/CHAN-25 (is not EM) E= -539 t= -27814 Q= 65535 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-13/SLOT-6/CHAN-109 (is not EM) E= 501 t= -61 Q= 5617 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-13/SLOT-7/CHAN-107 (is not EM) E= 492 t= -7382 Q= 2416 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-13/SLOT-7/CHAN-108 (is not EM) E= 776 t= -2070 Q= 2358 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-13/SLOT-9/CHAN-68 (is not EM) E= 472 t= 1044 Q= 30 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-13/SLOT-9/CHAN-87 (is not EM) E= 858 t= -2689 Q= 211 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-13/SLOT-9/CHAN-92 (is not EM) E= 1442 t= -2467 Q= 200 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-13/SLOT-9/CHAN-93 (is not EM) E= 439 t= -273 Q= 12 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-13/SLOT-10/CHAN-83 (is not EM) E= 436 t= -4900 Q= 109 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-13/SLOT-10/CHAN-127 (is not EM) E= 459 t= -3127 Q= 102 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-13/SLOT-11/CHAN-51 (is not EM) E= 483 t= -3713 Q= 26 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-13/SLOT-13/CHAN-45 (is not EM) E= 471 t= 206 Q= 62 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-13/SLOT-6/CHAN-24 (is not EM) E= -453 t= -27922 Q= 65535 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-13/SLOT-6/CHAN-25 (is not EM) E= -539 t= -27814 Q= 65535 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-13/SLOT-6/CHAN-109 (is not EM) E= 501 t= -61 Q= 5617 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-13/SLOT-7/CHAN-107 (is not EM) E= 492 t= -7382 Q= 2416 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-13/SLOT-7/CHAN-108 (is not EM) E= 776 t= -2070 Q= 2358 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-13/SLOT-9/CHAN-68 (is not EM) E= 472 t= 1044 Q= 30 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-13/SLOT-9/CHAN-87 (is not EM) E= 858 t= -2689 Q= 211 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-13/SLOT-9/CHAN-92 (is not EM) E= 1442 t= -2467 Q= 200 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-13/SLOT-9/CHAN-93 (is not EM) E= 439 t= -273 Q= 12 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-13/SLOT-10/CHAN-83 (is not EM) E= 436 t= -4900 Q= 109 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-13/SLOT-10/CHAN-127 (is not EM) E= 459 t= -3127 Q= 102 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-13/SLOT-11/CHAN-51 (is not EM) E= 483 t= -3713 Q= 26 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-13/SLOT-13/CHAN-45 (is not EM) E= 471 t= 206 Q= 62 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-14/SLOT-2/CHAN-68 (is not EM) E= 127 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-14/SLOT-6/CHAN-82 (is not EM) E= 342 t= 740 Q= 153 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-14/SLOT-7/CHAN-110 (is not EM) E= 437 t= -1352 Q= 1718 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-14/SLOT-7/CHAN-111 (is not EM) E= 575 t= 1386 Q= 516 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-14/SLOT-6/CHAN-82 (is not EM) E= 342 t= 740 Q= 153 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-14/SLOT-7/CHAN-110 (is not EM) E= 437 t= -1352 Q= 1718 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-14/SLOT-7/CHAN-111 (is not EM) E= 575 t= 1386 Q= 516 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-14/SLOT-8/CHAN-5 (is not EM) E= 156 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-14/SLOT-10/CHAN-76 (is not EM) E= 1219 t= -1101 Q= 36 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-14/SLOT-13/CHAN-12 (is not EM) E= 578 t= -1782 Q= 49 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-15/SLOT-1/CHAN-42 (is not EM) E= 1631 t= -14573 Q= 1193 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-15/SLOT-3/CHAN-46 (is not EM) E= 524 t= 3474 Q= 25 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-14/SLOT-10/CHAN-76 (is not EM) E= 1219 t= -1101 Q= 36 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-14/SLOT-13/CHAN-12 (is not EM) E= 578 t= -1782 Q= 49 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-15/SLOT-1/CHAN-42 (is not EM) E= 1631 t= -14573 Q= 1193 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-15/SLOT-3/CHAN-46 (is not EM) E= 524 t= 3474 Q= 25 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-15/SLOT-5/CHAN-80 (is not EM) E= 179 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-15/SLOT-5/CHAN-81 (is not EM) E= 208 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-15/SLOT-5/CHAN-82 (is not EM) E= 210 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-15/SLOT-5/CHAN-83 (is not EM) E= 235 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-15/SLOT-8/CHAN-71 (is not EM) E= 120 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-15/SLOT-8/CHAN-72 (is not EM) E= 321 t= -22649 Q= 9393 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-15/SLOT-8/CHAN-72 (is not EM) E= 321 t= -22649 Q= 9393 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-15/SLOT-8/CHAN-73 (is not EM) E= 194 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-15/SLOT-9/CHAN-16 (is not EM) E= 227 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-15/SLOT-9/CHAN-84 (is not EM) E= 435 t= -9741 Q= 488 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-15/SLOT-9/CHAN-115 (is not EM) E= 267 t= 7090 Q= 162 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-15/SLOT-10/CHAN-27 (is not EM) E= 385 t= -3813 Q= 83 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-15/SLOT-10/CHAN-34 (is not EM) E= 466 t= 2864 Q= 5 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-15/SLOT-14/CHAN-43 (is not EM) E= 937 t= 1280 Q= 936 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-15/SLOT-14/CHAN-56 (is not EM) E= 3223 t= -5053 Q= 4817 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-16/SLOT-2/CHAN-39 (is not EM) E= 708 t= -8173 Q= 20 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-16/SLOT-7/CHAN-60 Barrel l/e/p= 0/280/0: E= 2662 t= -4314 Q= 0 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-16/SLOT-9/CHAN-73 Barrel l/e/p= 1/304/0: E= 4543 t= 765 Q= 79 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-17/SLOT-2/CHAN-120 (is not EM) E= 279 t= 752 Q= 89 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-15/SLOT-9/CHAN-84 (is not EM) E= 435 t= -9741 Q= 488 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-15/SLOT-9/CHAN-115 (is not EM) E= 267 t= 7090 Q= 162 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-15/SLOT-10/CHAN-27 (is not EM) E= 385 t= -3813 Q= 83 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-15/SLOT-10/CHAN-34 (is not EM) E= 466 t= 2864 Q= 5 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-15/SLOT-14/CHAN-43 (is not EM) E= 937 t= 1280 Q= 936 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-15/SLOT-14/CHAN-56 (is not EM) E= 3223 t= -5053 Q= 4817 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-16/SLOT-2/CHAN-39 (is not EM) E= 708 t= -8173 Q= 20 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-16/SLOT-7/CHAN-60 Barrel l/e/p= 0/280/0: E= 2662 t= -4314 Q= 0 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-16/SLOT-9/CHAN-73 Barrel l/e/p= 1/304/0: E= 4543 t= 765 Q= 79 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-17/SLOT-2/CHAN-120 (is not EM) E= 279 t= 752 Q= 89 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-17/SLOT-4/CHAN-14 (is not EM) E= 212 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-17/SLOT-7/CHAN-62 (is not EM) E= 373 t= -675 Q= 341 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-17/SLOT-7/CHAN-62 (is not EM) E= 373 t= -675 Q= 341 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-17/SLOT-8/CHAN-18 (is not EM) E= 198 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-17/SLOT-9/CHAN-28 (is not EM) E= 407 t= 1424 Q= 222 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-18/SLOT-6/CHAN-78 (is not EM) E= -340 t= -22935 Q= 65535 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-18/SLOT-9/CHAN-44 (is not EM) E= 394 t= -28236 Q= 5354 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-18/SLOT-9/CHAN-45 (is not EM) E= 262 t= -26529 Q= 1445 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-18/SLOT-9/CHAN-96 (is not EM) E= 522 t= -3105 Q= 96 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-18/SLOT-11/CHAN-117 (is not EM) E= 436 t= 4246 Q= 35 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-19/SLOT-7/CHAN-41 (is not EM) E= 437 t= 3472 Q= 810 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-19/SLOT-7/CHAN-114 (is not EM) E= -350 t= -16513 Q= 65535 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-17/SLOT-9/CHAN-28 (is not EM) E= 407 t= 1424 Q= 222 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-18/SLOT-6/CHAN-78 (is not EM) E= -340 t= -22935 Q= 65535 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-18/SLOT-9/CHAN-44 (is not EM) E= 394 t= -28236 Q= 5354 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-18/SLOT-9/CHAN-45 (is not EM) E= 262 t= -26529 Q= 1445 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-18/SLOT-9/CHAN-96 (is not EM) E= 522 t= -3105 Q= 96 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-18/SLOT-11/CHAN-117 (is not EM) E= 436 t= 4246 Q= 35 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-19/SLOT-7/CHAN-41 (is not EM) E= 437 t= 3472 Q= 810 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-19/SLOT-7/CHAN-114 (is not EM) E= -350 t= -16513 Q= 65535 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-19/SLOT-8/CHAN-64 (is not EM) E= -219 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-19/SLOT-9/CHAN-27 (is not EM) E= 446 t= -18682 Q= 3166 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-19/SLOT-11/CHAN-103 (is not EM) E= 763 t= -871 Q= 382 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-19/SLOT-12/CHAN-61 (is not EM) E= 519 t= 2355 Q= 313 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-19/SLOT-12/CHAN-114 (is not EM) E= 471 t= 4489 Q= 33 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-19/SLOT-9/CHAN-27 (is not EM) E= 446 t= -18682 Q= 3166 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-19/SLOT-11/CHAN-103 (is not EM) E= 763 t= -871 Q= 382 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-19/SLOT-12/CHAN-61 (is not EM) E= 519 t= 2355 Q= 313 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-19/SLOT-12/CHAN-114 (is not EM) E= 471 t= 4489 Q= 33 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-21/SLOT-4/CHAN-83 (is not EM) E= 171 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-21/SLOT-4/CHAN-87 (is not EM) E= 198 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-21/SLOT-7/CHAN-35 (is not EM) E= 95 t= 0 Q= 0 P=0xa5 G=0 @@ -1904,75 +1904,75 @@ Channel: ENDCAP/A-SIDE/FT-21/SLOT-8/CHAN-69 (is not EM) E= 138 t= 0 Q= 0 P=0xa5 Channel: ENDCAP/A-SIDE/FT-21/SLOT-8/CHAN-70 (is not EM) E= 166 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-21/SLOT-8/CHAN-76 (is not EM) E= 116 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-21/SLOT-9/CHAN-66 (is not EM) E= 135 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-21/SLOT-10/CHAN-95 (is not EM) E= 1445 t= 380 Q= 66 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-21/SLOT-11/CHAN-98 (is not EM) E= 375 t= -15990 Q= 27 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-21/SLOT-13/CHAN-12 (is not EM) E= 493 t= -4418 Q= 1 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-21/SLOT-13/CHAN-13 (is not EM) E= 371 t= -9402 Q= 325 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-21/SLOT-14/CHAN-28 (is not EM) E= 648 t= -3132 Q= 55 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-22/SLOT-2/CHAN-18 (is not EM) E= 1705 t= 5425 Q= 277 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-22/SLOT-5/CHAN-60 Barrel l/e/p= 0/408/0: E= 28735 t= -25039 Q= 1188 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-22/SLOT-5/CHAN-61 Barrel l/e/p= 0/408/0: E= 3123 t= -19664 Q= 280 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-22/SLOT-6/CHAN-97 Barrel l/e/p= 0/480/0: E= -1781 t= 3170 Q= 61 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-22/SLOT-7/CHAN-10 Barrel l/e/p= 0/400/0: E= 2264 t= -39527 Q= 277 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-22/SLOT-7/CHAN-89 Barrel l/e/p= 0/432/0: E= 2291 t= -3106 Q= 0 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-22/SLOT-10/CHAN-92 Barrel l/e/p= 1/504/0: E= -3305 t= -2092 Q= 183 P=0x21a5 G=1 +Channel: ENDCAP/A-SIDE/FT-21/SLOT-10/CHAN-95 (is not EM) E= 1445 t= 380 Q= 66 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-21/SLOT-11/CHAN-98 (is not EM) E= 375 t= -15990 Q= 27 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-21/SLOT-13/CHAN-12 (is not EM) E= 493 t= -4418 Q= 1 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-21/SLOT-13/CHAN-13 (is not EM) E= 371 t= -9402 Q= 325 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-21/SLOT-14/CHAN-28 (is not EM) E= 648 t= -3132 Q= 55 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-22/SLOT-2/CHAN-18 (is not EM) E= 1705 t= 5425 Q= 277 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-22/SLOT-5/CHAN-60 Barrel l/e/p= 0/408/0: E= 28735 t= -25039 Q= 1188 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-22/SLOT-5/CHAN-61 Barrel l/e/p= 0/408/0: E= 3123 t= -19664 Q= 280 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-22/SLOT-6/CHAN-97 Barrel l/e/p= 0/480/0: E= -1781 t= 3170 Q= 61 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-22/SLOT-7/CHAN-10 Barrel l/e/p= 0/400/0: E= 2264 t= -39527 Q= 277 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-22/SLOT-7/CHAN-89 Barrel l/e/p= 0/432/0: E= 2291 t= -3106 Q= 0 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-22/SLOT-10/CHAN-92 Barrel l/e/p= 1/504/0: E= -3305 t= -2092 Q= 183 P=0x20a5 G=1 Channel: ENDCAP/A-SIDE/FT-23/SLOT-3/CHAN-37 (is not EM) E= 170 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-23/SLOT-6/CHAN-62 (is not EM) E= 714 t= -702 Q= 2125 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-23/SLOT-6/CHAN-63 (is not EM) E= 1024 t= 180 Q= 17682 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-23/SLOT-7/CHAN-70 (is not EM) E= 693 t= 697 Q= 3421 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-23/SLOT-7/CHAN-71 (is not EM) E= 677 t= 1762 Q= 10899 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-23/SLOT-8/CHAN-46 (is not EM) E= 284 t= -915 Q= 94 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-23/SLOT-9/CHAN-103 (is not EM) E= 601 t= -5309 Q= 134 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-24/SLOT-4/CHAN-13 (is not EM) E= 302 t= 2093 Q= 456 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-23/SLOT-6/CHAN-62 (is not EM) E= 714 t= -702 Q= 2125 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-23/SLOT-6/CHAN-63 (is not EM) E= 1024 t= 180 Q= 17682 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-23/SLOT-7/CHAN-70 (is not EM) E= 693 t= 697 Q= 3421 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-23/SLOT-7/CHAN-71 (is not EM) E= 677 t= 1762 Q= 10899 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-23/SLOT-8/CHAN-46 (is not EM) E= 284 t= -915 Q= 94 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-23/SLOT-9/CHAN-103 (is not EM) E= 601 t= -5309 Q= 134 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-24/SLOT-4/CHAN-13 (is not EM) E= 302 t= 2093 Q= 456 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-24/SLOT-4/CHAN-14 (is not EM) E= 226 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-24/SLOT-6/CHAN-91 (is not EM) E= 325 t= -1887 Q= 303 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-24/SLOT-7/CHAN-30 (is not EM) E= 670 t= -1214 Q= 2689 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-24/SLOT-7/CHAN-31 (is not EM) E= 557 t= -241 Q= 1248 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-24/SLOT-7/CHAN-82 (is not EM) E= 579 t= -18720 Q= 65535 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-24/SLOT-10/CHAN-67 (is not EM) E= 387 t= -2534 Q= 39 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-24/SLOT-12/CHAN-112 (is not EM) E= 869 t= -368 Q= 28 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-24/SLOT-12/CHAN-116 (is not EM) E= 713 t= 2133 Q= 343 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-24/SLOT-13/CHAN-48 (is not EM) E= 1129 t= -25181 Q= 15816 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-24/SLOT-13/CHAN-49 (is not EM) E= 764 t= -33293 Q= 11139 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-24/SLOT-6/CHAN-91 (is not EM) E= 325 t= -1887 Q= 303 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-24/SLOT-7/CHAN-30 (is not EM) E= 670 t= -1214 Q= 2689 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-24/SLOT-7/CHAN-31 (is not EM) E= 557 t= -241 Q= 1248 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-24/SLOT-7/CHAN-82 (is not EM) E= 579 t= -18720 Q= 65535 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-24/SLOT-10/CHAN-67 (is not EM) E= 387 t= -2534 Q= 39 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-24/SLOT-12/CHAN-112 (is not EM) E= 869 t= -368 Q= 28 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-24/SLOT-12/CHAN-116 (is not EM) E= 713 t= 2133 Q= 343 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-24/SLOT-13/CHAN-48 (is not EM) E= 1129 t= -25181 Q= 15816 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-24/SLOT-13/CHAN-49 (is not EM) E= 764 t= -33293 Q= 11139 P=0x20a5 G=0 Event 3 contains 743 channels -Channel: BARREL/C-SIDE/FT-0/SLOT-1/CHAN-44 (is not EM) E= 706 t= -902 Q= 288 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-0/SLOT-1/CHAN-44 (is not EM) E= 706 t= -902 Q= 288 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-0/SLOT-5/CHAN-113 (is not EM) E= 112 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-0/SLOT-5/CHAN-114 (is not EM) E= 147 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-0/SLOT-9/CHAN-36 (is not EM) E= -110 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-0/SLOT-13/CHAN-84 (is not EM) E= -270 t= -3567 Q= 370 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-0/SLOT-13/CHAN-85 (is not EM) E= -406 t= -8434 Q= 587 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-1/SLOT-1/CHAN-104 (is not EM) E= 754 t= 4801 Q= 523 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-0/SLOT-13/CHAN-84 (is not EM) E= -270 t= -3567 Q= 370 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-0/SLOT-13/CHAN-85 (is not EM) E= -406 t= -8434 Q= 587 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-1/SLOT-1/CHAN-104 (is not EM) E= 754 t= 4801 Q= 523 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-1/SLOT-4/CHAN-68 (is not EM) E= 116 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-1/SLOT-5/CHAN-98 (is not EM) E= 120 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-1/SLOT-6/CHAN-26 (is not EM) E= 94 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-1/SLOT-6/CHAN-27 (is not EM) E= 159 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-1/SLOT-6/CHAN-28 (is not EM) E= 268 t= -242 Q= 256 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-1/SLOT-6/CHAN-28 (is not EM) E= 268 t= -242 Q= 256 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-1/SLOT-6/CHAN-29 (is not EM) E= 74 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-1/SLOT-7/CHAN-104 (is not EM) E= -97 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-1/SLOT-13/CHAN-15 (is not EM) E= 339 t= 5728 Q= 6 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-1/SLOT-14/CHAN-5 (is not EM) E= 353 t= -42644 Q= 322 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-1/SLOT-14/CHAN-6 (is not EM) E= 314 t= 18452 Q= 33 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-1/SLOT-13/CHAN-15 (is not EM) E= 339 t= 5728 Q= 6 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-1/SLOT-14/CHAN-5 (is not EM) E= 353 t= -42644 Q= 322 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-1/SLOT-14/CHAN-6 (is not EM) E= 314 t= 18452 Q= 33 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-2/SLOT-4/CHAN-75 (is not EM) E= 88 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-2/SLOT-5/CHAN-70 (is not EM) E= -139 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-2/SLOT-9/CHAN-118 (is not EM) E= 132 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-2/SLOT-13/CHAN-19 (is not EM) E= 445 t= 4768 Q= 34 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-2/SLOT-13/CHAN-19 (is not EM) E= 445 t= 4768 Q= 34 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-3/SLOT-2/CHAN-80 (is not EM) E= 91 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-3/SLOT-4/CHAN-84 (is not EM) E= 95 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-3/SLOT-5/CHAN-39 (is not EM) E= -100 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-3/SLOT-5/CHAN-40 (is not EM) E= -337 t= -4237 Q= 41243 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-3/SLOT-5/CHAN-40 (is not EM) E= -337 t= -4237 Q= 41243 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-3/SLOT-5/CHAN-41 (is not EM) E= -229 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-3/SLOT-10/CHAN-114 (is not EM) E= 156 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-3/SLOT-12/CHAN-53 (is not EM) E= -483 t= -10831 Q= 3983 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-3/SLOT-12/CHAN-54 (is not EM) E= -520 t= -3376 Q= 2799 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-3/SLOT-12/CHAN-53 (is not EM) E= -483 t= -10831 Q= 3983 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-3/SLOT-12/CHAN-54 (is not EM) E= -520 t= -3376 Q= 2799 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-4/SLOT-2/CHAN-27 (is not EM) E= 86 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-4/SLOT-2/CHAN-108 (is not EM) E= -129 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-4/SLOT-9/CHAN-120 (is not EM) E= 398 t= 2995 Q= 93 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-4/SLOT-9/CHAN-120 (is not EM) E= 398 t= 2995 Q= 93 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-4/SLOT-11/CHAN-17 (is not EM) E= 217 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-4/SLOT-11/CHAN-114 (is not EM) E= 325 t= 10812 Q= 97 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-4/SLOT-11/CHAN-114 (is not EM) E= 325 t= 10812 Q= 97 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-4/SLOT-11/CHAN-127 (is not EM) E= 246 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-4/SLOT-12/CHAN-118 (is not EM) E= 327 t= 7637 Q= 102 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-4/SLOT-12/CHAN-119 (is not EM) E= 293 t= -6660 Q= 37 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-4/SLOT-12/CHAN-121 (is not EM) E= 297 t= 5857 Q= 38 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-4/SLOT-12/CHAN-118 (is not EM) E= 327 t= 7637 Q= 102 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-4/SLOT-12/CHAN-119 (is not EM) E= 293 t= -6660 Q= 37 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-4/SLOT-12/CHAN-121 (is not EM) E= 297 t= 5857 Q= 38 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-5/SLOT-4/CHAN-103 (is not EM) E= 105 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-5/SLOT-4/CHAN-104 (is not EM) E= 106 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-5/SLOT-6/CHAN-27 (is not EM) E= -130 t= 0 Q= 0 P=0xa5 G=0 @@ -1981,53 +1981,53 @@ Channel: BARREL/C-SIDE/FT-5/SLOT-7/CHAN-85 (is not EM) E= 78 t= 0 Q= 0 P=0xa5 G= Channel: BARREL/C-SIDE/FT-5/SLOT-7/CHAN-86 (is not EM) E= 161 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-5/SLOT-7/CHAN-87 (is not EM) E= 81 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-5/SLOT-9/CHAN-78 (is not EM) E= -91 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-5/SLOT-14/CHAN-33 (is not EM) E= 355 t= 19029 Q= 14 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-6/SLOT-1/CHAN-14 (is not EM) E= 389 t= -1532 Q= 122 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-5/SLOT-14/CHAN-33 (is not EM) E= 355 t= 19029 Q= 14 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-6/SLOT-1/CHAN-14 (is not EM) E= 389 t= -1532 Q= 122 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-6/SLOT-4/CHAN-58 (is not EM) E= -92 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-6/SLOT-5/CHAN-80 (is not EM) E= -99 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-6/SLOT-8/CHAN-1 (is not EM) E= 84 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-6/SLOT-12/CHAN-15 (is not EM) E= 301 t= -71 Q= 99 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-6/SLOT-12/CHAN-70 (is not EM) E= 383 t= -6447 Q= 24 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-6/SLOT-12/CHAN-15 (is not EM) E= 301 t= -71 Q= 99 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-6/SLOT-12/CHAN-70 (is not EM) E= 383 t= -6447 Q= 24 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-7/SLOT-6/CHAN-99 (is not EM) E= 84 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-7/SLOT-12/CHAN-22 (is not EM) E= 299 t= -13112 Q= 410 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-7/SLOT-12/CHAN-22 (is not EM) E= 299 t= -13112 Q= 410 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-8/SLOT-3/CHAN-79 (is not EM) E= -116 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-8/SLOT-9/CHAN-124 (is not EM) E= 193 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-8/SLOT-12/CHAN-80 (is not EM) E= 406 t= -16193 Q= 153 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-8/SLOT-13/CHAN-108 (is not EM) E= 364 t= -3183 Q= 23 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-8/SLOT-12/CHAN-80 (is not EM) E= 406 t= -16193 Q= 153 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-8/SLOT-13/CHAN-108 (is not EM) E= 364 t= -3183 Q= 23 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-9/SLOT-2/CHAN-126 (is not EM) E= -90 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-9/SLOT-7/CHAN-38 (is not EM) E= 84 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-9/SLOT-8/CHAN-1 (is not EM) E= 150 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-9/SLOT-11/CHAN-114 (is not EM) E= 230 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-9/SLOT-14/CHAN-15 (is not EM) E= 406 t= -22091 Q= 159 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-9/SLOT-14/CHAN-28 (is not EM) E= 336 t= -18548 Q= 84 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-9/SLOT-14/CHAN-35 (is not EM) E= 450 t= -32846 Q= 131 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-9/SLOT-14/CHAN-15 (is not EM) E= 406 t= -22091 Q= 159 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-9/SLOT-14/CHAN-28 (is not EM) E= 336 t= -18548 Q= 84 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-9/SLOT-14/CHAN-35 (is not EM) E= 450 t= -32846 Q= 131 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-10/SLOT-2/CHAN-93 (is not EM) E= 104 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-10/SLOT-3/CHAN-39 (is not EM) E= 108 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-10/SLOT-7/CHAN-69 (is not EM) E= 78 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-10/SLOT-8/CHAN-93 (is not EM) E= 81 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-10/SLOT-11/CHAN-126 (is not EM) E= 297 t= -15076 Q= 77 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-10/SLOT-11/CHAN-126 (is not EM) E= 297 t= -15076 Q= 77 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-11/SLOT-4/CHAN-97 (is not EM) E= 158 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-11/SLOT-7/CHAN-24 (is not EM) E= 93 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-11/SLOT-8/CHAN-3 (is not EM) E= 101 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-11/SLOT-11/CHAN-20 (is not EM) E= 306 t= -16866 Q= 339 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-11/SLOT-11/CHAN-20 (is not EM) E= 306 t= -16866 Q= 339 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-12/SLOT-5/CHAN-42 (is not EM) E= 90 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-12/SLOT-5/CHAN-71 (is not EM) E= 147 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-12/SLOT-8/CHAN-110 (is not EM) E= 96 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-12/SLOT-12/CHAN-46 (is not EM) E= 443 t= -666 Q= 130 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-12/SLOT-12/CHAN-46 (is not EM) E= 443 t= -666 Q= 130 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-12/SLOT-12/CHAN-49 (is not EM) E= 250 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-12/SLOT-12/CHAN-98 (is not EM) E= 450 t= 6959 Q= 89 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-12/SLOT-14/CHAN-53 (is not EM) E= 598 t= -62331 Q= 4674 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-12/SLOT-12/CHAN-98 (is not EM) E= 450 t= 6959 Q= 89 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-12/SLOT-14/CHAN-53 (is not EM) E= 598 t= -62331 Q= 4674 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-13/SLOT-4/CHAN-127 (is not EM) E= 88 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-13/SLOT-7/CHAN-100 (is not EM) E= 75 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-13/SLOT-7/CHAN-108 (is not EM) E= 84 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-13/SLOT-9/CHAN-75 (is not EM) E= 105 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-13/SLOT-10/CHAN-50 (is not EM) E= 548 t= -2389 Q= 4 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-13/SLOT-10/CHAN-62 (is not EM) E= 2174 t= 991 Q= 118 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-13/SLOT-10/CHAN-63 (is not EM) E= 1311 t= -872 Q= 91 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-13/SLOT-10/CHAN-50 (is not EM) E= 548 t= -2389 Q= 4 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-13/SLOT-10/CHAN-62 (is not EM) E= 2174 t= 991 Q= 118 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-13/SLOT-10/CHAN-63 (is not EM) E= 1311 t= -872 Q= 91 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-13/SLOT-10/CHAN-119 (is not EM) E= 243 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-13/SLOT-11/CHAN-18 (is not EM) E= 236 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-13/SLOT-13/CHAN-43 (is not EM) E= -306 t= -5908 Q= 203 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-13/SLOT-14/CHAN-49 (is not EM) E= 441 t= -75823 Q= 4506 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-13/SLOT-13/CHAN-43 (is not EM) E= -306 t= -5908 Q= 203 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-13/SLOT-14/CHAN-49 (is not EM) E= 441 t= -75823 Q= 4506 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-14/SLOT-2/CHAN-63 (is not EM) E= 116 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-14/SLOT-3/CHAN-19 (is not EM) E= 87 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-14/SLOT-5/CHAN-77 (is not EM) E= 109 t= 0 Q= 0 P=0xa5 G=0 @@ -2045,9 +2045,9 @@ Channel: BARREL/C-SIDE/FT-15/SLOT-8/CHAN-32 (is not EM) E= 86 t= 0 Q= 0 P=0xa5 G Channel: BARREL/C-SIDE/FT-15/SLOT-8/CHAN-33 (is not EM) E= 124 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-15/SLOT-9/CHAN-29 (is not EM) E= 130 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-15/SLOT-10/CHAN-50 (is not EM) E= 163 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-15/SLOT-12/CHAN-37 (is not EM) E= -411 t= -4093 Q= 962 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-15/SLOT-13/CHAN-110 (is not EM) E= -299 t= 1377 Q= 4 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-16/SLOT-1/CHAN-22 (is not EM) E= 490 t= -2157 Q= 40 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-15/SLOT-12/CHAN-37 (is not EM) E= -411 t= -4093 Q= 962 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-15/SLOT-13/CHAN-110 (is not EM) E= -299 t= 1377 Q= 4 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-16/SLOT-1/CHAN-22 (is not EM) E= 490 t= -2157 Q= 40 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-16/SLOT-3/CHAN-62 (is not EM) E= -113 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-16/SLOT-5/CHAN-92 (is not EM) E= 89 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-16/SLOT-9/CHAN-59 (is not EM) E= -158 t= 0 Q= 0 P=0xa5 G=0 @@ -2062,22 +2062,22 @@ Channel: BARREL/C-SIDE/FT-18/SLOT-6/CHAN-72 (is not EM) E= 94 t= 0 Q= 0 P=0xa5 G Channel: BARREL/C-SIDE/FT-18/SLOT-6/CHAN-82 (is not EM) E= 65 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-18/SLOT-10/CHAN-68 (is not EM) E= 128 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-18/SLOT-10/CHAN-69 (is not EM) E= 201 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-18/SLOT-11/CHAN-114 (is not EM) E= 385 t= -18486 Q= 574 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-18/SLOT-11/CHAN-115 (is not EM) E= 398 t= -24975 Q= 649 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-19/SLOT-1/CHAN-78 (is not EM) E= -849 t= -2631 Q= 3366 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-18/SLOT-11/CHAN-114 (is not EM) E= 385 t= -18486 Q= 574 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-18/SLOT-11/CHAN-115 (is not EM) E= 398 t= -24975 Q= 649 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-19/SLOT-1/CHAN-78 (is not EM) E= -849 t= -2631 Q= 3366 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-19/SLOT-4/CHAN-5 (is not EM) E= -87 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-19/SLOT-4/CHAN-19 (is not EM) E= 99 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-19/SLOT-7/CHAN-81 (is not EM) E= 76 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-19/SLOT-9/CHAN-86 (is not EM) E= -85 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-19/SLOT-11/CHAN-53 (is not EM) E= 255 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-19/SLOT-13/CHAN-15 (is not EM) E= -335 t= -12371 Q= 6 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-19/SLOT-13/CHAN-15 (is not EM) E= -335 t= -12371 Q= 6 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-20/SLOT-2/CHAN-65 (is not EM) E= -88 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-20/SLOT-4/CHAN-62 (is not EM) E= 100 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-20/SLOT-5/CHAN-124 (is not EM) E= 188 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-20/SLOT-6/CHAN-10 (is not EM) E= 106 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-20/SLOT-6/CHAN-110 (is not EM) E= 89 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-20/SLOT-12/CHAN-13 (is not EM) E= -239 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-20/SLOT-13/CHAN-11 (is not EM) E= 322 t= -7242 Q= 11 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-20/SLOT-13/CHAN-11 (is not EM) E= 322 t= -7242 Q= 11 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-21/SLOT-2/CHAN-114 (is not EM) E= 197 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-21/SLOT-5/CHAN-22 (is not EM) E= 162 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-21/SLOT-5/CHAN-23 (is not EM) E= 124 t= 0 Q= 0 P=0xa5 G=0 @@ -2087,55 +2087,55 @@ Channel: BARREL/C-SIDE/FT-22/SLOT-2/CHAN-39 (is not EM) E= -88 t= 0 Q= 0 P=0xa5 Channel: BARREL/C-SIDE/FT-22/SLOT-7/CHAN-119 (is not EM) E= 111 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-22/SLOT-8/CHAN-54 (is not EM) E= 97 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-23/SLOT-4/CHAN-122 (is not EM) E= 98 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-23/SLOT-11/CHAN-31 (is not EM) E= 383 t= -2574 Q= 57 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-23/SLOT-12/CHAN-94 (is not EM) E= 295 t= 24295 Q= 128 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-23/SLOT-12/CHAN-124 (is not EM) E= 283 t= -1403 Q= 10 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-24/SLOT-1/CHAN-49 (is not EM) E= 536 t= 2965 Q= 966 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-23/SLOT-11/CHAN-31 (is not EM) E= 383 t= -2574 Q= 57 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-23/SLOT-12/CHAN-94 (is not EM) E= 295 t= 24295 Q= 128 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-23/SLOT-12/CHAN-124 (is not EM) E= 283 t= -1403 Q= 10 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-24/SLOT-1/CHAN-49 (is not EM) E= 536 t= 2965 Q= 966 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-24/SLOT-4/CHAN-107 (is not EM) E= 91 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-24/SLOT-7/CHAN-98 (is not EM) E= 112 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-24/SLOT-9/CHAN-99 (is not EM) E= 90 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-24/SLOT-13/CHAN-7 (is not EM) E= 286 t= -11689 Q= 65 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-24/SLOT-13/CHAN-7 (is not EM) E= 286 t= -11689 Q= 65 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-25/SLOT-6/CHAN-69 (is not EM) E= 76 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-25/SLOT-10/CHAN-28 (is not EM) E= 274 t= -4818 Q= 26 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-26/SLOT-1/CHAN-42 (is not EM) E= 426 t= 554 Q= 1 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-25/SLOT-10/CHAN-28 (is not EM) E= 274 t= -4818 Q= 26 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-26/SLOT-1/CHAN-42 (is not EM) E= 426 t= 554 Q= 1 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-26/SLOT-4/CHAN-121 (is not EM) E= 169 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-26/SLOT-4/CHAN-122 (is not EM) E= 168 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-26/SLOT-9/CHAN-9 (is not EM) E= 129 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-26/SLOT-9/CHAN-97 (is not EM) E= -233 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-26/SLOT-11/CHAN-76 (is not EM) E= 209 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-26/SLOT-14/CHAN-4 (is not EM) E= 348 t= 32 Q= 62 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-26/SLOT-14/CHAN-59 (is not EM) E= -348 t= 3314 Q= 39 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-26/SLOT-14/CHAN-4 (is not EM) E= 348 t= 32 Q= 62 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-26/SLOT-14/CHAN-59 (is not EM) E= -348 t= 3314 Q= 39 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-27/SLOT-8/CHAN-80 (is not EM) E= -87 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-27/SLOT-9/CHAN-38 (is not EM) E= 88 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-27/SLOT-9/CHAN-98 (is not EM) E= -95 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-27/SLOT-12/CHAN-62 (is not EM) E= 257 t= 5016 Q= 84 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-28/SLOT-1/CHAN-89 (is not EM) E= 516 t= 1033 Q= 285 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-27/SLOT-12/CHAN-62 (is not EM) E= 257 t= 5016 Q= 84 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-28/SLOT-1/CHAN-89 (is not EM) E= 516 t= 1033 Q= 285 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-28/SLOT-7/CHAN-42 (is not EM) E= 104 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-28/SLOT-7/CHAN-72 (is not EM) E= 101 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-28/SLOT-8/CHAN-70 (is not EM) E= 190 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-28/SLOT-8/CHAN-71 (is not EM) E= 282 t= -100 Q= 396 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-28/SLOT-8/CHAN-71 (is not EM) E= 282 t= -100 Q= 396 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-28/SLOT-9/CHAN-78 (is not EM) E= 119 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-28/SLOT-10/CHAN-31 (is not EM) E= 183 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-29/SLOT-3/CHAN-21 (is not EM) E= 85 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-29/SLOT-4/CHAN-83 (is not EM) E= -99 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-29/SLOT-7/CHAN-59 (is not EM) E= -89 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-29/SLOT-12/CHAN-78 (is not EM) E= 414 t= -10922 Q= 130 P=0x21a5 G=0 -Channel: BARREL/C-SIDE/FT-29/SLOT-13/CHAN-106 (is not EM) E= 455 t= -57350 Q= 3140 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-29/SLOT-12/CHAN-78 (is not EM) E= 414 t= -10922 Q= 130 P=0x20a5 G=0 +Channel: BARREL/C-SIDE/FT-29/SLOT-13/CHAN-106 (is not EM) E= 455 t= -57350 Q= 3140 P=0x20a5 G=0 Channel: BARREL/C-SIDE/FT-30/SLOT-7/CHAN-120 (is not EM) E= 86 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-30/SLOT-8/CHAN-89 (is not EM) E= 106 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-30/SLOT-8/CHAN-90 (is not EM) E= 104 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/C-SIDE/FT-30/SLOT-8/CHAN-91 (is not EM) E= 80 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/C-SIDE/FT-30/SLOT-14/CHAN-48 (is not EM) E= 534 t= -4010 Q= 13 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-0/SLOT-1/CHAN-30 (is not EM) E= 876 t= -17183 Q= 4398 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-0/SLOT-1/CHAN-108 (is not EM) E= 1681 t= -18483 Q= 24332 P=0x21a5 G=0 +Channel: BARREL/C-SIDE/FT-30/SLOT-14/CHAN-48 (is not EM) E= 534 t= -4010 Q= 13 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-0/SLOT-1/CHAN-30 (is not EM) E= 876 t= -17183 Q= 4398 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-0/SLOT-1/CHAN-108 (is not EM) E= 1681 t= -18483 Q= 24332 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-0/SLOT-2/CHAN-96 (is not EM) E= 136 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-0/SLOT-9/CHAN-50 (is not EM) E= 254 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-0/SLOT-11/CHAN-45 (is not EM) E= 244 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-0/SLOT-11/CHAN-80 (is not EM) E= 528 t= -22354 Q= 1949 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-0/SLOT-11/CHAN-80 (is not EM) E= 528 t= -22354 Q= 1949 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-0/SLOT-11/CHAN-124 (is not EM) E= 246 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-0/SLOT-12/CHAN-45 (is not EM) E= 240 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-1/SLOT-1/CHAN-49 (is not EM) E= 538 t= -873 Q= 72 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-1/SLOT-1/CHAN-62 (is not EM) E= -443 t= 2910 Q= 8379 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-1/SLOT-1/CHAN-49 (is not EM) E= 538 t= -873 Q= 72 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-1/SLOT-1/CHAN-62 (is not EM) E= -443 t= 2910 Q= 8379 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-1/SLOT-2/CHAN-48 (is not EM) E= 87 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-1/SLOT-4/CHAN-8 (is not EM) E= 158 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-1/SLOT-4/CHAN-46 (is not EM) E= -94 t= 0 Q= 0 P=0xa5 G=0 @@ -2145,15 +2145,15 @@ Channel: BARREL/A-SIDE/FT-1/SLOT-4/CHAN-106 (is not EM) E= 118 t= 0 Q= 0 P=0xa5 Channel: BARREL/A-SIDE/FT-1/SLOT-6/CHAN-86 (is not EM) E= -73 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-1/SLOT-10/CHAN-50 (is not EM) E= 170 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-1/SLOT-10/CHAN-51 (is not EM) E= 161 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-1/SLOT-12/CHAN-21 (is not EM) E= -287 t= 673 Q= 3 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-1/SLOT-12/CHAN-97 (is not EM) E= 303 t= -7884 Q= 147 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-1/SLOT-14/CHAN-12 (is not EM) E= 404 t= -13145 Q= 99 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-1/SLOT-12/CHAN-21 (is not EM) E= -287 t= 673 Q= 3 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-1/SLOT-12/CHAN-97 (is not EM) E= 303 t= -7884 Q= 147 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-1/SLOT-14/CHAN-12 (is not EM) E= 404 t= -13145 Q= 99 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-2/SLOT-7/CHAN-26 (is not EM) E= -75 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-2/SLOT-7/CHAN-93 (is not EM) E= 195 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-2/SLOT-8/CHAN-75 (is not EM) E= 76 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-2/SLOT-9/CHAN-124 (is not EM) E= 394 t= -5328 Q= 63 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-2/SLOT-9/CHAN-124 (is not EM) E= 394 t= -5328 Q= 63 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-2/SLOT-10/CHAN-23 (is not EM) E= 230 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-2/SLOT-13/CHAN-110 (is not EM) E= 343 t= -18814 Q= 107 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-2/SLOT-13/CHAN-110 (is not EM) E= 343 t= -18814 Q= 107 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-3/SLOT-3/CHAN-43 (is not EM) E= 218 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-3/SLOT-3/CHAN-44 (is not EM) E= 103 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-3/SLOT-5/CHAN-61 (is not EM) E= 107 t= 0 Q= 0 P=0xa5 G=0 @@ -2162,16 +2162,16 @@ Channel: BARREL/A-SIDE/FT-3/SLOT-6/CHAN-11 (is not EM) E= 67 t= 0 Q= 0 P=0xa5 G= Channel: BARREL/A-SIDE/FT-3/SLOT-9/CHAN-13 (is not EM) E= 82 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-3/SLOT-9/CHAN-22 (is not EM) E= 200 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-3/SLOT-9/CHAN-24 (is not EM) E= 89 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-3/SLOT-11/CHAN-55 (is not EM) E= 279 t= -17317 Q= 1186 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-3/SLOT-12/CHAN-60 (is not EM) E= 256 t= 26480 Q= 847 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-3/SLOT-11/CHAN-55 (is not EM) E= 279 t= -17317 Q= 1186 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-3/SLOT-12/CHAN-60 (is not EM) E= 256 t= 26480 Q= 847 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-4/SLOT-2/CHAN-1 (is not EM) E= 114 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-4/SLOT-2/CHAN-2 (is not EM) E= 445 t= -14864 Q= 21228 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-4/SLOT-2/CHAN-2 (is not EM) E= 445 t= -14864 Q= 21228 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-4/SLOT-5/CHAN-113 (is not EM) E= -108 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-4/SLOT-8/CHAN-30 (is not EM) E= -82 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-4/SLOT-9/CHAN-115 (is not EM) E= -163 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-4/SLOT-10/CHAN-100 (is not EM) E= 239 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-4/SLOT-11/CHAN-36 (is not EM) E= 253 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-4/SLOT-11/CHAN-112 (is not EM) E= 429 t= 9387 Q= 178 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-4/SLOT-11/CHAN-112 (is not EM) E= 429 t= 9387 Q= 178 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-5/SLOT-3/CHAN-37 (is not EM) E= 98 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-5/SLOT-3/CHAN-38 (is not EM) E= 88 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-5/SLOT-3/CHAN-88 (is not EM) E= -223 t= 0 Q= 0 P=0xa5 G=0 @@ -2181,15 +2181,15 @@ Channel: BARREL/A-SIDE/FT-5/SLOT-5/CHAN-109 (is not EM) E= 119 t= 0 Q= 0 P=0xa5 Channel: BARREL/A-SIDE/FT-5/SLOT-9/CHAN-111 (is not EM) E= -122 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-5/SLOT-9/CHAN-125 (is not EM) E= 164 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-5/SLOT-12/CHAN-84 (is not EM) E= 245 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-5/SLOT-12/CHAN-114 (is not EM) E= 264 t= -24978 Q= 627 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-5/SLOT-12/CHAN-117 (is not EM) E= 306 t= -35988 Q= 2135 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-5/SLOT-12/CHAN-118 (is not EM) E= 277 t= -25871 Q= 1684 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-5/SLOT-12/CHAN-121 (is not EM) E= 530 t= -21837 Q= 2488 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-5/SLOT-12/CHAN-114 (is not EM) E= 264 t= -24978 Q= 627 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-5/SLOT-12/CHAN-117 (is not EM) E= 306 t= -35988 Q= 2135 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-5/SLOT-12/CHAN-118 (is not EM) E= 277 t= -25871 Q= 1684 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-5/SLOT-12/CHAN-121 (is not EM) E= 530 t= -21837 Q= 2488 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-5/SLOT-12/CHAN-122 (is not EM) E= 242 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-5/SLOT-13/CHAN-49 (is not EM) E= 338 t= 3321 Q= 70 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-5/SLOT-14/CHAN-24 (is not EM) E= 355 t= -10080 Q= 13 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-6/SLOT-1/CHAN-43 (is not EM) E= 831 t= -22367 Q= 1975 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-6/SLOT-1/CHAN-101 (is not EM) E= 1334 t= -2284 Q= 241 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-5/SLOT-13/CHAN-49 (is not EM) E= 338 t= 3321 Q= 70 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-5/SLOT-14/CHAN-24 (is not EM) E= 355 t= -10080 Q= 13 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-6/SLOT-1/CHAN-43 (is not EM) E= 831 t= -22367 Q= 1975 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-6/SLOT-1/CHAN-101 (is not EM) E= 1334 t= -2284 Q= 241 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-6/SLOT-3/CHAN-26 (is not EM) E= 88 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-6/SLOT-4/CHAN-24 (is not EM) E= 89 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-6/SLOT-4/CHAN-25 (is not EM) E= 224 t= 0 Q= 0 P=0xa5 G=0 @@ -2198,21 +2198,21 @@ Channel: BARREL/A-SIDE/FT-6/SLOT-8/CHAN-1 (is not EM) E= 92 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-6/SLOT-8/CHAN-2 (is not EM) E= 86 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-6/SLOT-8/CHAN-73 (is not EM) E= 153 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-6/SLOT-8/CHAN-74 (is not EM) E= 118 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-6/SLOT-8/CHAN-75 (is not EM) E= 345 t= 219 Q= 280 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-6/SLOT-8/CHAN-76 (is not EM) E= 365 t= -501 Q= 315 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-6/SLOT-8/CHAN-75 (is not EM) E= 345 t= 219 Q= 280 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-6/SLOT-8/CHAN-76 (is not EM) E= 365 t= -501 Q= 315 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-6/SLOT-8/CHAN-77 (is not EM) E= 226 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-6/SLOT-8/CHAN-78 (is not EM) E= 115 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-6/SLOT-8/CHAN-79 (is not EM) E= 82 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-6/SLOT-8/CHAN-80 (is not EM) E= 84 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-6/SLOT-9/CHAN-43 (is not EM) E= -140 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-6/SLOT-11/CHAN-74 (is not EM) E= 239 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-6/SLOT-12/CHAN-77 (is not EM) E= 346 t= -11145 Q= 1044 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-6/SLOT-13/CHAN-50 (is not EM) E= -351 t= -4018 Q= 171 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-6/SLOT-13/CHAN-91 (is not EM) E= 387 t= -17483 Q= 86 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-6/SLOT-14/CHAN-1 (is not EM) E= 361 t= 10339 Q= 41 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-6/SLOT-14/CHAN-2 (is not EM) E= 527 t= 10441 Q= 150 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-6/SLOT-14/CHAN-4 (is not EM) E= 377 t= 4393 Q= 35 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-6/SLOT-14/CHAN-22 (is not EM) E= 381 t= -2798 Q= 60 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-6/SLOT-12/CHAN-77 (is not EM) E= 346 t= -11145 Q= 1044 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-6/SLOT-13/CHAN-50 (is not EM) E= -351 t= -4018 Q= 171 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-6/SLOT-13/CHAN-91 (is not EM) E= 387 t= -17483 Q= 86 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-6/SLOT-14/CHAN-1 (is not EM) E= 361 t= 10339 Q= 41 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-6/SLOT-14/CHAN-2 (is not EM) E= 527 t= 10441 Q= 150 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-6/SLOT-14/CHAN-4 (is not EM) E= 377 t= 4393 Q= 35 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-6/SLOT-14/CHAN-22 (is not EM) E= 381 t= -2798 Q= 60 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-7/SLOT-2/CHAN-118 (is not EM) E= 189 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-7/SLOT-2/CHAN-119 (is not EM) E= 112 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-7/SLOT-3/CHAN-69 (is not EM) E= 130 t= 0 Q= 0 P=0xa5 G=0 @@ -2220,13 +2220,13 @@ Channel: BARREL/A-SIDE/FT-7/SLOT-4/CHAN-27 (is not EM) E= 215 t= 0 Q= 0 P=0xa5 G Channel: BARREL/A-SIDE/FT-7/SLOT-4/CHAN-73 (is not EM) E= 92 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-7/SLOT-7/CHAN-89 (is not EM) E= 82 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-7/SLOT-9/CHAN-83 (is not EM) E= 91 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-7/SLOT-12/CHAN-14 (is not EM) E= 478 t= 24833 Q= 669 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-7/SLOT-14/CHAN-20 (is not EM) E= 316 t= 3054 Q= 19 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-7/SLOT-12/CHAN-14 (is not EM) E= 478 t= 24833 Q= 669 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-7/SLOT-14/CHAN-20 (is not EM) E= 316 t= 3054 Q= 19 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-8/SLOT-3/CHAN-4 (is not EM) E= 226 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-8/SLOT-3/CHAN-5 (is not EM) E= 314 t= -13706 Q= 13072 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-8/SLOT-3/CHAN-5 (is not EM) E= 314 t= -13706 Q= 13072 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-8/SLOT-9/CHAN-23 (is not EM) E= 90 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-8/SLOT-11/CHAN-32 (is not EM) E= 387 t= -24210 Q= 1285 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-8/SLOT-13/CHAN-95 (is not EM) E= 288 t= 1719 Q= 29 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-8/SLOT-11/CHAN-32 (is not EM) E= 387 t= -24210 Q= 1285 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-8/SLOT-13/CHAN-95 (is not EM) E= 288 t= 1719 Q= 29 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-9/SLOT-4/CHAN-72 (is not EM) E= 108 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-9/SLOT-4/CHAN-73 (is not EM) E= 131 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-9/SLOT-9/CHAN-82 (is not EM) E= -171 t= 0 Q= 0 P=0xa5 G=0 @@ -2241,29 +2241,29 @@ Channel: BARREL/A-SIDE/FT-10/SLOT-6/CHAN-65 (is not EM) E= 87 t= 0 Q= 0 P=0xa5 G Channel: BARREL/A-SIDE/FT-10/SLOT-6/CHAN-66 (is not EM) E= 75 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-10/SLOT-7/CHAN-101 (is not EM) E= 94 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-10/SLOT-11/CHAN-13 (is not EM) E= 248 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-10/SLOT-11/CHAN-69 (is not EM) E= 393 t= 4742 Q= 14 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-10/SLOT-11/CHAN-69 (is not EM) E= 393 t= 4742 Q= 14 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-11/SLOT-7/CHAN-11 (is not EM) E= 107 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-11/SLOT-8/CHAN-106 (is not EM) E= 107 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-11/SLOT-10/CHAN-120 (is not EM) E= -155 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-11/SLOT-11/CHAN-16 (is not EM) E= 236 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-11/SLOT-13/CHAN-82 (is not EM) E= 452 t= -6270 Q= 15 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-11/SLOT-13/CHAN-82 (is not EM) E= 452 t= -6270 Q= 15 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-12/SLOT-3/CHAN-84 (is not EM) E= 104 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-12/SLOT-4/CHAN-7 (is not EM) E= -85 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-12/SLOT-4/CHAN-100 (is not EM) E= 111 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-12/SLOT-6/CHAN-18 (is not EM) E= 91 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-12/SLOT-9/CHAN-36 (is not EM) E= 158 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-12/SLOT-9/CHAN-37 (is not EM) E= 105 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-12/SLOT-11/CHAN-116 (is not EM) E= 401 t= -3358 Q= 6 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-13/SLOT-1/CHAN-41 (is not EM) E= 566 t= 11828 Q= 4 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-13/SLOT-1/CHAN-42 (is not EM) E= 415 t= 8711 Q= 795 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-13/SLOT-12/CHAN-71 (is not EM) E= 278 t= -7046 Q= 42 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-13/SLOT-13/CHAN-18 (is not EM) E= -462 t= 19870 Q= 59 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-14/SLOT-1/CHAN-115 (is not EM) E= 971 t= 1707 Q= 408 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-12/SLOT-11/CHAN-116 (is not EM) E= 401 t= -3358 Q= 6 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-13/SLOT-1/CHAN-41 (is not EM) E= 566 t= 11828 Q= 4 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-13/SLOT-1/CHAN-42 (is not EM) E= 415 t= 8711 Q= 795 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-13/SLOT-12/CHAN-71 (is not EM) E= 278 t= -7046 Q= 42 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-13/SLOT-13/CHAN-18 (is not EM) E= -462 t= 19870 Q= 59 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-14/SLOT-1/CHAN-115 (is not EM) E= 971 t= 1707 Q= 408 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-14/SLOT-4/CHAN-89 (is not EM) E= 95 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-14/SLOT-4/CHAN-106 (is not EM) E= 110 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-14/SLOT-5/CHAN-45 (is not EM) E= 88 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-14/SLOT-6/CHAN-10 (is not EM) E= 72 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-14/SLOT-12/CHAN-54 (is not EM) E= 335 t= 4849 Q= 111 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-14/SLOT-12/CHAN-54 (is not EM) E= 335 t= 4849 Q= 111 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-14/SLOT-12/CHAN-121 (is not EM) E= -254 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-15/SLOT-6/CHAN-98 (is not EM) E= 86 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-16/SLOT-2/CHAN-98 (is not EM) E= -81 t= 0 Q= 0 P=0xa5 G=0 @@ -2271,9 +2271,9 @@ Channel: BARREL/A-SIDE/FT-16/SLOT-2/CHAN-99 (is not EM) E= -113 t= 0 Q= 0 P=0xa5 Channel: BARREL/A-SIDE/FT-16/SLOT-6/CHAN-80 (is not EM) E= 94 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-16/SLOT-8/CHAN-39 (is not EM) E= 197 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-16/SLOT-10/CHAN-98 (is not EM) E= 243 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-16/SLOT-14/CHAN-22 (is not EM) E= 317 t= -6039 Q= 9 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-16/SLOT-14/CHAN-22 (is not EM) E= 317 t= -6039 Q= 9 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-17/SLOT-5/CHAN-111 (is not EM) E= 165 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-17/SLOT-5/CHAN-112 (is not EM) E= 298 t= 1479 Q= 267 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-17/SLOT-5/CHAN-112 (is not EM) E= 298 t= 1479 Q= 267 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-17/SLOT-5/CHAN-113 (is not EM) E= 151 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-17/SLOT-5/CHAN-114 (is not EM) E= 93 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-17/SLOT-6/CHAN-50 (is not EM) E= 77 t= 0 Q= 0 P=0xa5 G=0 @@ -2283,28 +2283,28 @@ Channel: BARREL/A-SIDE/FT-18/SLOT-4/CHAN-62 (is not EM) E= 95 t= 0 Q= 0 P=0xa5 G Channel: BARREL/A-SIDE/FT-18/SLOT-5/CHAN-59 (is not EM) E= 102 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-18/SLOT-7/CHAN-8 (is not EM) E= 142 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-18/SLOT-10/CHAN-12 (is not EM) E= 166 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-18/SLOT-11/CHAN-91 (is not EM) E= 284 t= 21749 Q= 68 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-18/SLOT-12/CHAN-10 (is not EM) E= 292 t= 1240 Q= 135 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-19/SLOT-1/CHAN-16 (is not EM) E= 390 t= -4863 Q= 18454 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-19/SLOT-1/CHAN-57 (is not EM) E= 608 t= -18115 Q= 480 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-18/SLOT-11/CHAN-91 (is not EM) E= 284 t= 21749 Q= 68 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-18/SLOT-12/CHAN-10 (is not EM) E= 292 t= 1240 Q= 135 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-19/SLOT-1/CHAN-16 (is not EM) E= 390 t= -4863 Q= 18454 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-19/SLOT-1/CHAN-57 (is not EM) E= 608 t= -18115 Q= 480 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-19/SLOT-4/CHAN-85 (is not EM) E= -89 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-19/SLOT-7/CHAN-122 (is not EM) E= 122 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-19/SLOT-7/CHAN-125 (is not EM) E= 99 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-19/SLOT-8/CHAN-12 (is not EM) E= 107 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-19/SLOT-8/CHAN-107 (is not EM) E= 104 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-19/SLOT-9/CHAN-94 (is not EM) E= 81 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-19/SLOT-10/CHAN-37 (is not EM) E= 347 t= -10905 Q= 398 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-19/SLOT-10/CHAN-37 (is not EM) E= 347 t= -10905 Q= 398 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-20/SLOT-5/CHAN-46 (is not EM) E= 95 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-20/SLOT-5/CHAN-52 (is not EM) E= 97 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-20/SLOT-10/CHAN-51 (is not EM) E= -157 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-20/SLOT-10/CHAN-73 (is not EM) E= -103 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-20/SLOT-11/CHAN-63 (is not EM) E= 362 t= -12682 Q= 442 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-20/SLOT-11/CHAN-63 (is not EM) E= 362 t= -12682 Q= 442 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-21/SLOT-6/CHAN-73 (is not EM) E= -77 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-21/SLOT-7/CHAN-49 (is not EM) E= 87 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-21/SLOT-10/CHAN-15 (is not EM) E= 224 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-21/SLOT-10/CHAN-40 (is not EM) E= 111 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-21/SLOT-12/CHAN-126 (is not EM) E= 226 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-21/SLOT-13/CHAN-70 (is not EM) E= 373 t= 2912 Q= 34 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-21/SLOT-13/CHAN-70 (is not EM) E= 373 t= 2912 Q= 34 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-22/SLOT-2/CHAN-86 (is not EM) E= 120 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-22/SLOT-5/CHAN-6 (is not EM) E= 113 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-22/SLOT-6/CHAN-103 (is not EM) E= 124 t= 0 Q= 0 P=0xa5 G=0 @@ -2312,11 +2312,11 @@ Channel: BARREL/A-SIDE/FT-22/SLOT-7/CHAN-41 (is not EM) E= 144 t= 0 Q= 0 P=0xa5 Channel: BARREL/A-SIDE/FT-22/SLOT-7/CHAN-42 (is not EM) E= 205 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-22/SLOT-7/CHAN-43 (is not EM) E= 207 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-22/SLOT-7/CHAN-44 (is not EM) E= 94 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-22/SLOT-12/CHAN-124 (is not EM) E= 259 t= -26593 Q= 325 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-22/SLOT-13/CHAN-49 (is not EM) E= 345 t= -26112 Q= 385 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-22/SLOT-13/CHAN-50 (is not EM) E= 1045 t= -27853 Q= 1995 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-22/SLOT-13/CHAN-51 (is not EM) E= 298 t= -24790 Q= 81 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-23/SLOT-1/CHAN-49 (is not EM) E= 870 t= 2742 Q= 575 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-22/SLOT-12/CHAN-124 (is not EM) E= 259 t= -26593 Q= 325 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-22/SLOT-13/CHAN-49 (is not EM) E= 345 t= -26112 Q= 385 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-22/SLOT-13/CHAN-50 (is not EM) E= 1045 t= -27853 Q= 1995 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-22/SLOT-13/CHAN-51 (is not EM) E= 298 t= -24790 Q= 81 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-23/SLOT-1/CHAN-49 (is not EM) E= 870 t= 2742 Q= 575 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-23/SLOT-2/CHAN-45 (is not EM) E= 103 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-23/SLOT-2/CHAN-46 (is not EM) E= 165 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-23/SLOT-2/CHAN-47 (is not EM) E= 153 t= 0 Q= 0 P=0xa5 G=0 @@ -2324,24 +2324,24 @@ Channel: BARREL/A-SIDE/FT-23/SLOT-2/CHAN-119 (is not EM) E= 83 t= 0 Q= 0 P=0xa5 Channel: BARREL/A-SIDE/FT-23/SLOT-4/CHAN-43 (is not EM) E= 171 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-23/SLOT-4/CHAN-44 (is not EM) E= 131 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-23/SLOT-8/CHAN-49 (is not EM) E= 140 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-24/SLOT-1/CHAN-25 (is not EM) E= 361 t= -17591 Q= 1396 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-24/SLOT-1/CHAN-25 (is not EM) E= 361 t= -17591 Q= 1396 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-24/SLOT-7/CHAN-122 (is not EM) E= 87 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-24/SLOT-8/CHAN-49 (is not EM) E= 259 t= -19358 Q= 6253 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-24/SLOT-8/CHAN-50 (is not EM) E= 262 t= -19152 Q= 12446 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-24/SLOT-9/CHAN-124 (is not EM) E= 410 t= 3732 Q= 56 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-24/SLOT-8/CHAN-49 (is not EM) E= 259 t= -19358 Q= 6253 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-24/SLOT-8/CHAN-50 (is not EM) E= 262 t= -19152 Q= 12446 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-24/SLOT-9/CHAN-124 (is not EM) E= 410 t= 3732 Q= 56 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-24/SLOT-11/CHAN-3 (is not EM) E= 233 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-24/SLOT-14/CHAN-41 (is not EM) E= 478 t= -35036 Q= 493 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-24/SLOT-14/CHAN-42 (is not EM) E= 486 t= -31847 Q= 558 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-25/SLOT-1/CHAN-63 (is not EM) E= 906 t= -356 Q= 990 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-24/SLOT-14/CHAN-41 (is not EM) E= 478 t= -35036 Q= 493 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-24/SLOT-14/CHAN-42 (is not EM) E= 486 t= -31847 Q= 558 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-25/SLOT-1/CHAN-63 (is not EM) E= 906 t= -356 Q= 990 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-25/SLOT-6/CHAN-89 (is not EM) E= 71 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-25/SLOT-6/CHAN-90 (is not EM) E= 151 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-25/SLOT-6/CHAN-91 (is not EM) E= 179 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-25/SLOT-6/CHAN-92 (is not EM) E= 86 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-25/SLOT-6/CHAN-111 (is not EM) E= 85 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-25/SLOT-10/CHAN-39 (is not EM) E= 379 t= -22713 Q= 7267 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-25/SLOT-13/CHAN-9 (is not EM) E= 292 t= 37620 Q= 68 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-25/SLOT-13/CHAN-79 (is not EM) E= 843 t= -7359 Q= 24 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-26/SLOT-1/CHAN-42 (is not EM) E= 1386 t= 1019 Q= 565 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-25/SLOT-10/CHAN-39 (is not EM) E= 379 t= -22713 Q= 7267 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-25/SLOT-13/CHAN-9 (is not EM) E= 292 t= 37620 Q= 68 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-25/SLOT-13/CHAN-79 (is not EM) E= 843 t= -7359 Q= 24 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-26/SLOT-1/CHAN-42 (is not EM) E= 1386 t= 1019 Q= 565 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-26/SLOT-2/CHAN-42 (is not EM) E= 222 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-26/SLOT-2/CHAN-43 (is not EM) E= 158 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-26/SLOT-3/CHAN-50 (is not EM) E= 201 t= 0 Q= 0 P=0xa5 G=0 @@ -2349,8 +2349,8 @@ Channel: BARREL/A-SIDE/FT-26/SLOT-3/CHAN-51 (is not EM) E= 122 t= 0 Q= 0 P=0xa5 Channel: BARREL/A-SIDE/FT-26/SLOT-4/CHAN-111 (is not EM) E= 171 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-26/SLOT-7/CHAN-124 (is not EM) E= 167 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-26/SLOT-8/CHAN-100 (is not EM) E= 81 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-26/SLOT-11/CHAN-120 (is not EM) E= 262 t= -33920 Q= 673 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-26/SLOT-12/CHAN-61 (is not EM) E= 497 t= 24929 Q= 861 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-26/SLOT-11/CHAN-120 (is not EM) E= 262 t= -33920 Q= 673 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-26/SLOT-12/CHAN-61 (is not EM) E= 497 t= 24929 Q= 861 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-27/SLOT-2/CHAN-15 (is not EM) E= 87 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-27/SLOT-2/CHAN-35 (is not EM) E= 99 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-27/SLOT-3/CHAN-95 (is not EM) E= 111 t= 0 Q= 0 P=0xa5 G=0 @@ -2358,323 +2358,323 @@ Channel: BARREL/A-SIDE/FT-27/SLOT-4/CHAN-2 (is not EM) E= 176 t= 0 Q= 0 P=0xa5 G Channel: BARREL/A-SIDE/FT-27/SLOT-4/CHAN-4 (is not EM) E= 153 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-27/SLOT-4/CHAN-7 (is not EM) E= 114 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-27/SLOT-4/CHAN-9 (is not EM) E= 149 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-27/SLOT-4/CHAN-10 (is not EM) E= 280 t= -14913 Q= 6024 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-27/SLOT-4/CHAN-10 (is not EM) E= 280 t= -14913 Q= 6024 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-27/SLOT-4/CHAN-14 (is not EM) E= 109 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-27/SLOT-5/CHAN-65 (is not EM) E= 89 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-27/SLOT-5/CHAN-97 (is not EM) E= 108 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-27/SLOT-6/CHAN-109 (is not EM) E= -70 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-27/SLOT-8/CHAN-20 (is not EM) E= 154 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-27/SLOT-8/CHAN-21 (is not EM) E= 158 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-27/SLOT-11/CHAN-74 (is not EM) E= 260 t= 2563 Q= 132 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-27/SLOT-11/CHAN-85 (is not EM) E= 317 t= -12805 Q= 7 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-27/SLOT-14/CHAN-6 (is not EM) E= 394 t= -14633 Q= 91 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-27/SLOT-14/CHAN-9 (is not EM) E= 464 t= -25505 Q= 129 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-27/SLOT-14/CHAN-63 (is not EM) E= -448 t= 17516 Q= 601 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-28/SLOT-1/CHAN-14 (is not EM) E= 348 t= -2870 Q= 8 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-28/SLOT-1/CHAN-48 (is not EM) E= 415 t= -9050 Q= 45797 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-27/SLOT-11/CHAN-74 (is not EM) E= 260 t= 2563 Q= 132 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-27/SLOT-11/CHAN-85 (is not EM) E= 317 t= -12805 Q= 7 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-27/SLOT-14/CHAN-6 (is not EM) E= 394 t= -14633 Q= 91 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-27/SLOT-14/CHAN-9 (is not EM) E= 464 t= -25505 Q= 129 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-27/SLOT-14/CHAN-63 (is not EM) E= -448 t= 17516 Q= 601 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-28/SLOT-1/CHAN-14 (is not EM) E= 348 t= -2870 Q= 8 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-28/SLOT-1/CHAN-48 (is not EM) E= 415 t= -9050 Q= 45797 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-28/SLOT-8/CHAN-58 (is not EM) E= -102 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-28/SLOT-8/CHAN-59 (is not EM) E= -122 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-28/SLOT-14/CHAN-44 (is not EM) E= -715 t= 14925 Q= 1246 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-29/SLOT-12/CHAN-29 (is not EM) E= 287 t= -36245 Q= 4365 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-29/SLOT-13/CHAN-79 (is not EM) E= 312 t= -1171 Q= 4 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-28/SLOT-14/CHAN-44 (is not EM) E= -715 t= 14925 Q= 1246 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-29/SLOT-12/CHAN-29 (is not EM) E= 287 t= -36245 Q= 4365 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-29/SLOT-13/CHAN-79 (is not EM) E= 312 t= -1171 Q= 4 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-30/SLOT-2/CHAN-45 (is not EM) E= 123 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-30/SLOT-8/CHAN-94 (is not EM) E= 102 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-30/SLOT-8/CHAN-95 (is not EM) E= 154 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-30/SLOT-8/CHAN-96 (is not EM) E= 124 t= 0 Q= 0 P=0xa5 G=0 Channel: BARREL/A-SIDE/FT-30/SLOT-10/CHAN-42 (is not EM) E= 117 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-31/SLOT-1/CHAN-6 (is not EM) E= 721 t= 1905 Q= 178 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-31/SLOT-1/CHAN-6 (is not EM) E= 721 t= 1905 Q= 178 P=0x20a5 G=0 Channel: BARREL/A-SIDE/FT-31/SLOT-7/CHAN-102 (is not EM) E= 80 t= 0 Q= 0 P=0xa5 G=0 -Channel: BARREL/A-SIDE/FT-31/SLOT-11/CHAN-100 (is not EM) E= 296 t= 25849 Q= 274 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-31/SLOT-12/CHAN-50 (is not EM) E= 325 t= -4461 Q= 82 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-31/SLOT-12/CHAN-70 (is not EM) E= -436 t= -1350 Q= 901 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-31/SLOT-12/CHAN-84 (is not EM) E= 408 t= -12965 Q= 49 P=0x21a5 G=0 -Channel: BARREL/A-SIDE/FT-31/SLOT-12/CHAN-124 (is not EM) E= 312 t= 6027 Q= 1 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-0/SLOT-4/CHAN-119 (is not EM) E= 345 t= -766 Q= 270 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-0/SLOT-6/CHAN-13 (is not EM) E= 377 t= 720 Q= 2251 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-0/SLOT-7/CHAN-120 (is not EM) E= 345 t= -22633 Q= 49363 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-0/SLOT-11/CHAN-60 (is not EM) E= 581 t= -2187 Q= 198 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-1/SLOT-6/CHAN-57 (is not EM) E= 399 t= -481 Q= 5658 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-1/SLOT-6/CHAN-58 (is not EM) E= 421 t= -368 Q= 4022 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-1/SLOT-9/CHAN-43 (is not EM) E= 274 t= -18424 Q= 2318 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-1/SLOT-10/CHAN-9 (is not EM) E= 319 t= 13343 Q= 1114 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-1/SLOT-11/CHAN-75 (is not EM) E= 664 t= 1654 Q= 219 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-1/SLOT-11/CHAN-78 (is not EM) E= 520 t= 634 Q= 62 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-1/SLOT-11/CHAN-79 (is not EM) E= 1211 t= -2303 Q= 160 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-1/SLOT-12/CHAN-90 (is not EM) E= 756 t= -3778 Q= 607 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-1/SLOT-12/CHAN-95 (is not EM) E= 658 t= 2505 Q= 210 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-2/SLOT-2/CHAN-73 (is not EM) E= 288 t= -34187 Q= 153 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-2/SLOT-3/CHAN-45 (is not EM) E= 289 t= 27250 Q= 119 P=0x21a5 G=0 +Channel: BARREL/A-SIDE/FT-31/SLOT-11/CHAN-100 (is not EM) E= 296 t= 25849 Q= 274 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-31/SLOT-12/CHAN-50 (is not EM) E= 325 t= -4461 Q= 82 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-31/SLOT-12/CHAN-70 (is not EM) E= -436 t= -1350 Q= 901 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-31/SLOT-12/CHAN-84 (is not EM) E= 408 t= -12965 Q= 49 P=0x20a5 G=0 +Channel: BARREL/A-SIDE/FT-31/SLOT-12/CHAN-124 (is not EM) E= 312 t= 6027 Q= 1 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-0/SLOT-4/CHAN-119 (is not EM) E= 345 t= -766 Q= 270 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-0/SLOT-6/CHAN-13 (is not EM) E= 377 t= 720 Q= 2251 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-0/SLOT-7/CHAN-120 (is not EM) E= 345 t= -22633 Q= 49363 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-0/SLOT-11/CHAN-60 (is not EM) E= 581 t= -2187 Q= 198 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-1/SLOT-6/CHAN-57 (is not EM) E= 399 t= -481 Q= 5658 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-1/SLOT-6/CHAN-58 (is not EM) E= 421 t= -368 Q= 4022 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-1/SLOT-9/CHAN-43 (is not EM) E= 274 t= -18424 Q= 2318 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-1/SLOT-10/CHAN-9 (is not EM) E= 319 t= 13343 Q= 1114 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-1/SLOT-11/CHAN-75 (is not EM) E= 664 t= 1654 Q= 219 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-1/SLOT-11/CHAN-78 (is not EM) E= 520 t= 634 Q= 62 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-1/SLOT-11/CHAN-79 (is not EM) E= 1211 t= -2303 Q= 160 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-1/SLOT-12/CHAN-90 (is not EM) E= 756 t= -3778 Q= 607 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-1/SLOT-12/CHAN-95 (is not EM) E= 658 t= 2505 Q= 210 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-2/SLOT-2/CHAN-73 (is not EM) E= 288 t= -34187 Q= 153 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-2/SLOT-3/CHAN-45 (is not EM) E= 289 t= 27250 Q= 119 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-2/SLOT-4/CHAN-50 (is not EM) E= 195 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-2/SLOT-5/CHAN-35 (is not EM) E= 135 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-2/SLOT-6/CHAN-46 (is not EM) E= 123 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-2/SLOT-6/CHAN-47 (is not EM) E= 128 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-2/SLOT-6/CHAN-51 (is not EM) E= 181 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-2/SLOT-8/CHAN-87 (is not EM) E= 236 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-2/SLOT-15/CHAN-17 (is not EM) E= 903 t= -269 Q= 192 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-3/SLOT-8/CHAN-35 Barrel l/e/p= 0/184/0: E= 1379 t= 10570 Q= 327 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-3/SLOT-10/CHAN-8 Barrel l/e/p= 1/168/0: E= 6944 t= 1199 Q= 8 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-3/SLOT-10/CHAN-53 Barrel l/e/p= 2/80/0: E= 6528 t= 74 Q= 454 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-3/SLOT-10/CHAN-65 Barrel l/e/p= 1/152/0: E= 3552 t= -21409 Q= 76 P=0x21a5 G=1 +Channel: ENDCAP/C-SIDE/FT-2/SLOT-15/CHAN-17 (is not EM) E= 903 t= -269 Q= 192 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-3/SLOT-8/CHAN-35 Barrel l/e/p= 0/184/0: E= 1379 t= 10570 Q= 327 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-3/SLOT-10/CHAN-8 Barrel l/e/p= 1/168/0: E= 6944 t= 1199 Q= 8 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-3/SLOT-10/CHAN-53 Barrel l/e/p= 2/80/0: E= 6528 t= 74 Q= 454 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-3/SLOT-10/CHAN-65 Barrel l/e/p= 1/152/0: E= 3552 t= -21409 Q= 76 P=0x20a5 G=1 Channel: ENDCAP/C-SIDE/FT-4/SLOT-2/CHAN-60 (is not EM) E= 129 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-4/SLOT-2/CHAN-86 (is not EM) E= 132 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-4/SLOT-2/CHAN-118 (is not EM) E= 126 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-4/SLOT-2/CHAN-119 (is not EM) E= 176 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-4/SLOT-5/CHAN-39 (is not EM) E= 298 t= 2819 Q= 761 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-4/SLOT-5/CHAN-39 (is not EM) E= 298 t= 2819 Q= 761 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-4/SLOT-5/CHAN-79 (is not EM) E= 237 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-4/SLOT-5/CHAN-80 (is not EM) E= 317 t= -575 Q= 84 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-4/SLOT-6/CHAN-10 (is not EM) E= 336 t= 2289 Q= 662 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-4/SLOT-10/CHAN-34 (is not EM) E= 343 t= 10014 Q= 9 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-4/SLOT-10/CHAN-56 (is not EM) E= 322 t= 2809 Q= 111 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-4/SLOT-10/CHAN-60 (is not EM) E= 351 t= -1751 Q= 15 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-4/SLOT-12/CHAN-36 (is not EM) E= 495 t= 2809 Q= 20 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-5/SLOT-6/CHAN-1 (is not EM) E= 590 t= -979 Q= 3691 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-5/SLOT-8/CHAN-76 (is not EM) E= 282 t= -22046 Q= 905 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-5/SLOT-9/CHAN-70 (is not EM) E= 501 t= -1655 Q= 20 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-5/SLOT-9/CHAN-71 (is not EM) E= 408 t= -392 Q= 86 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-5/SLOT-9/CHAN-72 (is not EM) E= 291 t= -5161 Q= 106 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-5/SLOT-13/CHAN-13 (is not EM) E= 483 t= 6853 Q= 36 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-5/SLOT-13/CHAN-14 (is not EM) E= 652 t= 3104 Q= 6 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-6/SLOT-1/CHAN-103 Barrel l/e/p= 2/96/0: E= 21978 t= 1907 Q= 1062 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-6/SLOT-4/CHAN-126 Barrel l/e/p= 3/256/0: E= -31053 t= -9931 Q= 3049 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-6/SLOT-6/CHAN-81 Barrel l/e/p= 1/192/0: E= 10304 t= -11630 Q= 15 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-6/SLOT-9/CHAN-0 Barrel l/e/p= 0/400/0: E= -5640 t= -8077 Q= 94 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-6/SLOT-10/CHAN-22 Barrel l/e/p= 1/352/0: E= 31866 t= 139 Q= 88 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-6/SLOT-10/CHAN-92 Barrel l/e/p= 1/320/0: E= -14713 t= -4927 Q= 40 P=0x21a5 G=1 +Channel: ENDCAP/C-SIDE/FT-4/SLOT-5/CHAN-80 (is not EM) E= 317 t= -575 Q= 84 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-4/SLOT-6/CHAN-10 (is not EM) E= 336 t= 2289 Q= 662 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-4/SLOT-10/CHAN-34 (is not EM) E= 343 t= 10014 Q= 9 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-4/SLOT-10/CHAN-56 (is not EM) E= 322 t= 2809 Q= 111 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-4/SLOT-10/CHAN-60 (is not EM) E= 351 t= -1751 Q= 15 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-4/SLOT-12/CHAN-36 (is not EM) E= 495 t= 2809 Q= 20 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-5/SLOT-6/CHAN-1 (is not EM) E= 590 t= -979 Q= 3691 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-5/SLOT-8/CHAN-76 (is not EM) E= 282 t= -22046 Q= 905 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-5/SLOT-9/CHAN-70 (is not EM) E= 501 t= -1655 Q= 20 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-5/SLOT-9/CHAN-71 (is not EM) E= 408 t= -392 Q= 86 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-5/SLOT-9/CHAN-72 (is not EM) E= 291 t= -5161 Q= 106 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-5/SLOT-13/CHAN-13 (is not EM) E= 483 t= 6853 Q= 36 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-5/SLOT-13/CHAN-14 (is not EM) E= 652 t= 3104 Q= 6 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-6/SLOT-1/CHAN-103 Barrel l/e/p= 2/96/0: E= 21978 t= 1907 Q= 1062 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-6/SLOT-4/CHAN-126 Barrel l/e/p= 3/256/0: E= -31053 t= -9931 Q= 3049 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-6/SLOT-6/CHAN-81 Barrel l/e/p= 1/192/0: E= 10304 t= -11630 Q= 15 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-6/SLOT-9/CHAN-0 Barrel l/e/p= 0/400/0: E= -5640 t= -8077 Q= 94 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-6/SLOT-10/CHAN-22 Barrel l/e/p= 1/352/0: E= 31866 t= 139 Q= 88 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-6/SLOT-10/CHAN-92 Barrel l/e/p= 1/320/0: E= -14713 t= -4927 Q= 40 P=0x20a5 G=1 Channel: ENDCAP/C-SIDE/FT-7/SLOT-2/CHAN-82 (is not EM) E= 121 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-7/SLOT-3/CHAN-19 (is not EM) E= 184 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-7/SLOT-3/CHAN-20 (is not EM) E= 167 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-7/SLOT-4/CHAN-44 (is not EM) E= 471 t= -22652 Q= 49597 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-7/SLOT-11/CHAN-27 (is not EM) E= 530 t= -35858 Q= 6922 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-7/SLOT-11/CHAN-75 (is not EM) E= 504 t= -24187 Q= 3629 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-7/SLOT-12/CHAN-43 (is not EM) E= 497 t= 1647 Q= 341 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-7/SLOT-4/CHAN-44 (is not EM) E= 471 t= -22652 Q= 49597 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-7/SLOT-11/CHAN-27 (is not EM) E= 530 t= -35858 Q= 6922 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-7/SLOT-11/CHAN-75 (is not EM) E= 504 t= -24187 Q= 3629 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-7/SLOT-12/CHAN-43 (is not EM) E= 497 t= 1647 Q= 341 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-8/SLOT-4/CHAN-86 (is not EM) E= 237 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-8/SLOT-5/CHAN-81 (is not EM) E= 238 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-8/SLOT-8/CHAN-11 (is not EM) E= 157 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-8/SLOT-11/CHAN-26 (is not EM) E= 438 t= 4752 Q= 2 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-9/SLOT-2/CHAN-68 (is not EM) E= 525 t= 7228 Q= 123 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-9/SLOT-2/CHAN-72 (is not EM) E= 488 t= 4220 Q= 24 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-8/SLOT-11/CHAN-26 (is not EM) E= 438 t= 4752 Q= 2 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-9/SLOT-2/CHAN-68 (is not EM) E= 525 t= 7228 Q= 123 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-9/SLOT-2/CHAN-72 (is not EM) E= 488 t= 4220 Q= 24 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-9/SLOT-7/CHAN-14 (is not EM) E= 145 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-9/SLOT-10/CHAN-126 (is not EM) E= 430 t= -1380 Q= 223 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-9/SLOT-11/CHAN-1 (is not EM) E= 344 t= -14554 Q= 281 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-9/SLOT-11/CHAN-2 (is not EM) E= 327 t= -17377 Q= 1481 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-9/SLOT-11/CHAN-28 (is not EM) E= -349 t= 15966 Q= 2002 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-10/SLOT-2/CHAN-32 (is not EM) E= -585 t= 10764 Q= 32 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-10/SLOT-8/CHAN-23 Barrel l/e/p= 0/48/0: E= 1555 t= 19164 Q= 2 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-10/SLOT-8/CHAN-28 Barrel l/e/p= 0/32/0: E= 6879 t= -1748 Q= 7 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-10/SLOT-9/CHAN-49 Barrel l/e/p= 2/56/0: E= -5816 t= -4875 Q= 532 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-10/SLOT-10/CHAN-83 Barrel l/e/p= 1/24/0: E= 1177 t= -470 Q= 171 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-10/SLOT-10/CHAN-104 Barrel l/e/p= 2/8/0: E= 7343 t= -28482 Q= 223 P=0x21a5 G=1 +Channel: ENDCAP/C-SIDE/FT-9/SLOT-10/CHAN-126 (is not EM) E= 430 t= -1380 Q= 223 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-9/SLOT-11/CHAN-1 (is not EM) E= 344 t= -14554 Q= 281 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-9/SLOT-11/CHAN-2 (is not EM) E= 327 t= -17377 Q= 1481 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-9/SLOT-11/CHAN-28 (is not EM) E= -349 t= 15966 Q= 2002 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-10/SLOT-2/CHAN-32 (is not EM) E= -585 t= 10764 Q= 32 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-10/SLOT-8/CHAN-23 Barrel l/e/p= 0/48/0: E= 1555 t= 19164 Q= 2 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-10/SLOT-8/CHAN-28 Barrel l/e/p= 0/32/0: E= 6879 t= -1748 Q= 7 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-10/SLOT-9/CHAN-49 Barrel l/e/p= 2/56/0: E= -5816 t= -4875 Q= 532 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-10/SLOT-10/CHAN-83 Barrel l/e/p= 1/24/0: E= 1177 t= -470 Q= 171 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-10/SLOT-10/CHAN-104 Barrel l/e/p= 2/8/0: E= 7343 t= -28482 Q= 223 P=0x20a5 G=1 Channel: ENDCAP/C-SIDE/FT-11/SLOT-3/CHAN-45 (is not EM) E= 176 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-11/SLOT-3/CHAN-77 (is not EM) E= 187 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-11/SLOT-5/CHAN-14 (is not EM) E= 222 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-11/SLOT-5/CHAN-64 (is not EM) E= 210 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-11/SLOT-5/CHAN-65 (is not EM) E= 538 t= 1969 Q= 9905 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-11/SLOT-5/CHAN-65 (is not EM) E= 538 t= 1969 Q= 9905 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-11/SLOT-5/CHAN-66 (is not EM) E= 223 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-11/SLOT-6/CHAN-15 (is not EM) E= 824 t= 651 Q= 595 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-11/SLOT-6/CHAN-31 (is not EM) E= 665 t= 756 Q= 2912 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-11/SLOT-6/CHAN-32 (is not EM) E= 440 t= 1402 Q= 1270 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-11/SLOT-9/CHAN-94 (is not EM) E= 438 t= 219 Q= 253 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-11/SLOT-9/CHAN-115 (is not EM) E= 378 t= -6685 Q= 134 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-11/SLOT-9/CHAN-122 (is not EM) E= 615 t= -143 Q= 316 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-11/SLOT-10/CHAN-100 (is not EM) E= 434 t= -674 Q= 58 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-11/SLOT-11/CHAN-75 (is not EM) E= 561 t= 2141 Q= 155 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-11/SLOT-11/CHAN-98 (is not EM) E= 585 t= 539 Q= 36 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-11/SLOT-13/CHAN-58 (is not EM) E= 464 t= 1858 Q= 21 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-12/SLOT-8/CHAN-104 (is not EM) E= 405 t= -27150 Q= 4268 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-11/SLOT-6/CHAN-15 (is not EM) E= 824 t= 651 Q= 595 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-11/SLOT-6/CHAN-31 (is not EM) E= 665 t= 756 Q= 2912 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-11/SLOT-6/CHAN-32 (is not EM) E= 440 t= 1402 Q= 1270 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-11/SLOT-9/CHAN-94 (is not EM) E= 438 t= 219 Q= 253 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-11/SLOT-9/CHAN-115 (is not EM) E= 378 t= -6685 Q= 134 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-11/SLOT-9/CHAN-122 (is not EM) E= 615 t= -143 Q= 316 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-11/SLOT-10/CHAN-100 (is not EM) E= 434 t= -674 Q= 58 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-11/SLOT-11/CHAN-75 (is not EM) E= 561 t= 2141 Q= 155 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-11/SLOT-11/CHAN-98 (is not EM) E= 585 t= 539 Q= 36 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-11/SLOT-13/CHAN-58 (is not EM) E= 464 t= 1858 Q= 21 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-12/SLOT-8/CHAN-104 (is not EM) E= 405 t= -27150 Q= 4268 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-12/SLOT-8/CHAN-105 (is not EM) E= 227 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-12/SLOT-12/CHAN-39 (is not EM) E= 623 t= 2463 Q= 34 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-12/SLOT-12/CHAN-127 (is not EM) E= 485 t= 5587 Q= 172 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-12/SLOT-12/CHAN-39 (is not EM) E= 623 t= 2463 Q= 34 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-12/SLOT-12/CHAN-127 (is not EM) E= 485 t= 5587 Q= 172 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-13/SLOT-2/CHAN-76 (is not EM) E= 130 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-13/SLOT-5/CHAN-49 (is not EM) E= 552 t= 1150 Q= 4421 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-13/SLOT-5/CHAN-49 (is not EM) E= 552 t= 1150 Q= 4421 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-13/SLOT-5/CHAN-50 (is not EM) E= 252 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-13/SLOT-8/CHAN-57 (is not EM) E= 172 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-13/SLOT-9/CHAN-91 (is not EM) E= 344 t= 8536 Q= 236 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-13/SLOT-9/CHAN-91 (is not EM) E= 344 t= 8536 Q= 236 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-14/SLOT-2/CHAN-101 (is not EM) E= 120 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-14/SLOT-2/CHAN-103 (is not EM) E= 134 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-14/SLOT-9/CHAN-53 (is not EM) E= 279 t= -26351 Q= 2241 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-14/SLOT-10/CHAN-33 (is not EM) E= -515 t= -3815 Q= 121 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-14/SLOT-11/CHAN-5 (is not EM) E= 625 t= -1497 Q= 134 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-14/SLOT-12/CHAN-69 (is not EM) E= 623 t= -2570 Q= 50 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-14/SLOT-12/CHAN-104 (is not EM) E= 521 t= -26264 Q= 2217 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-14/SLOT-9/CHAN-53 (is not EM) E= 279 t= -26351 Q= 2241 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-14/SLOT-10/CHAN-33 (is not EM) E= -515 t= -3815 Q= 121 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-14/SLOT-11/CHAN-5 (is not EM) E= 625 t= -1497 Q= 134 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-14/SLOT-12/CHAN-69 (is not EM) E= 623 t= -2570 Q= 50 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-14/SLOT-12/CHAN-104 (is not EM) E= 521 t= -26264 Q= 2217 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-15/SLOT-3/CHAN-21 (is not EM) E= 199 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-15/SLOT-4/CHAN-124 (is not EM) E= 306 t= -830 Q= 67 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-15/SLOT-4/CHAN-124 (is not EM) E= 306 t= -830 Q= 67 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-15/SLOT-5/CHAN-95 (is not EM) E= -132 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-15/SLOT-8/CHAN-35 (is not EM) E= 135 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-15/SLOT-9/CHAN-109 (is not EM) E= 229 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-15/SLOT-9/CHAN-113 (is not EM) E= 153 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-15/SLOT-12/CHAN-87 (is not EM) E= -1080 t= -21439 Q= 65535 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-16/SLOT-7/CHAN-39 Barrel l/e/p= 0/496/0: E= 1309 t= -6642 Q= 59 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-16/SLOT-10/CHAN-101 Barrel l/e/p= 2/192/0: E= 5466 t= 4013 Q= 470 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-17/SLOT-1/CHAN-28 (is not EM) E= 1217 t= 10481 Q= 2111 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-15/SLOT-12/CHAN-87 (is not EM) E= -1080 t= -21439 Q= 65535 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-16/SLOT-7/CHAN-39 Barrel l/e/p= 0/496/0: E= 1309 t= -6642 Q= 59 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-16/SLOT-10/CHAN-101 Barrel l/e/p= 2/192/0: E= 5466 t= 4013 Q= 470 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-17/SLOT-1/CHAN-28 (is not EM) E= 1217 t= 10481 Q= 2111 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-17/SLOT-8/CHAN-112 (is not EM) E= 201 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-17/SLOT-9/CHAN-47 (is not EM) E= 261 t= -7009 Q= 22 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-17/SLOT-9/CHAN-73 (is not EM) E= 353 t= -13353 Q= 1497 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-17/SLOT-9/CHAN-75 (is not EM) E= 622 t= 981 Q= 61 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-17/SLOT-9/CHAN-124 (is not EM) E= 408 t= 5107 Q= 122 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-18/SLOT-4/CHAN-12 (is not EM) E= 275 t= -18776 Q= 15347 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-18/SLOT-7/CHAN-47 (is not EM) E= 445 t= 1501 Q= 799 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-17/SLOT-9/CHAN-47 (is not EM) E= 261 t= -7009 Q= 22 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-17/SLOT-9/CHAN-73 (is not EM) E= 353 t= -13353 Q= 1497 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-17/SLOT-9/CHAN-75 (is not EM) E= 622 t= 981 Q= 61 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-17/SLOT-9/CHAN-124 (is not EM) E= 408 t= 5107 Q= 122 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-18/SLOT-4/CHAN-12 (is not EM) E= 275 t= -18776 Q= 15347 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-18/SLOT-7/CHAN-47 (is not EM) E= 445 t= 1501 Q= 799 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-19/SLOT-2/CHAN-38 (is not EM) E= 125 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-19/SLOT-4/CHAN-75 (is not EM) E= 200 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-19/SLOT-5/CHAN-77 (is not EM) E= 264 t= -526 Q= 1467 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-19/SLOT-5/CHAN-77 (is not EM) E= 264 t= -526 Q= 1467 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-20/SLOT-2/CHAN-115 (is not EM) E= 145 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-20/SLOT-9/CHAN-29 (is not EM) E= -282 t= -440 Q= 3003 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-20/SLOT-9/CHAN-29 (is not EM) E= -282 t= -440 Q= 3003 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-21/SLOT-7/CHAN-51 (is not EM) E= 200 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-21/SLOT-7/CHAN-52 (is not EM) E= 139 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-21/SLOT-11/CHAN-114 (is not EM) E= 533 t= -2478 Q= 121 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-21/SLOT-13/CHAN-0 (is not EM) E= -678 t= -5114 Q= 606 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-21/SLOT-14/CHAN-116 (is not EM) E= -1042 t= 593 Q= 65535 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-21/SLOT-15/CHAN-79 (is not EM) E= 700 t= -1282 Q= 116 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-22/SLOT-2/CHAN-116 (is not EM) E= -1228 t= 8110 Q= 1090 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-22/SLOT-7/CHAN-125 Barrel l/e/p= 0/320/0: E= 2711 t= -432 Q= 38 P=0x21a5 G=1 -Channel: ENDCAP/C-SIDE/FT-23/SLOT-5/CHAN-15 (is not EM) E= 394 t= -806 Q= 70 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-23/SLOT-5/CHAN-16 (is not EM) E= 737 t= 1586 Q= 8111 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-23/SLOT-5/CHAN-17 (is not EM) E= 284 t= -338 Q= 330 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-23/SLOT-11/CHAN-73 (is not EM) E= 563 t= -2933 Q= 403 P=0x21a5 G=0 -Channel: ENDCAP/C-SIDE/FT-23/SLOT-11/CHAN-74 (is not EM) E= 433 t= 4491 Q= 427 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-21/SLOT-11/CHAN-114 (is not EM) E= 533 t= -2478 Q= 121 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-21/SLOT-13/CHAN-0 (is not EM) E= -678 t= -5114 Q= 606 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-21/SLOT-14/CHAN-116 (is not EM) E= -1042 t= 593 Q= 65535 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-21/SLOT-15/CHAN-79 (is not EM) E= 700 t= -1282 Q= 116 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-22/SLOT-2/CHAN-116 (is not EM) E= -1228 t= 8110 Q= 1090 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-22/SLOT-7/CHAN-125 Barrel l/e/p= 0/320/0: E= 2711 t= -432 Q= 38 P=0x20a5 G=1 +Channel: ENDCAP/C-SIDE/FT-23/SLOT-5/CHAN-15 (is not EM) E= 394 t= -806 Q= 70 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-23/SLOT-5/CHAN-16 (is not EM) E= 737 t= 1586 Q= 8111 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-23/SLOT-5/CHAN-17 (is not EM) E= 284 t= -338 Q= 330 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-23/SLOT-11/CHAN-73 (is not EM) E= 563 t= -2933 Q= 403 P=0x20a5 G=0 +Channel: ENDCAP/C-SIDE/FT-23/SLOT-11/CHAN-74 (is not EM) E= 433 t= 4491 Q= 427 P=0x20a5 G=0 Channel: ENDCAP/C-SIDE/FT-24/SLOT-8/CHAN-22 (is not EM) E= 222 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/C-SIDE/FT-24/SLOT-8/CHAN-30 (is not EM) E= 163 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/C-SIDE/FT-24/SLOT-12/CHAN-108 (is not EM) E= 1085 t= -581 Q= 119 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-0/SLOT-6/CHAN-39 (is not EM) E= 460 t= 1680 Q= 1166 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-0/SLOT-10/CHAN-15 (is not EM) E= 339 t= 5152 Q= 34 P=0x21a5 G=0 +Channel: ENDCAP/C-SIDE/FT-24/SLOT-12/CHAN-108 (is not EM) E= 1085 t= -581 Q= 119 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-0/SLOT-6/CHAN-39 (is not EM) E= 460 t= 1680 Q= 1166 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-0/SLOT-10/CHAN-15 (is not EM) E= 339 t= 5152 Q= 34 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-1/SLOT-3/CHAN-32 (is not EM) E= 162 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-1/SLOT-3/CHAN-33 (is not EM) E= 326 t= -723 Q= 691 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-1/SLOT-3/CHAN-33 (is not EM) E= 326 t= -723 Q= 691 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-1/SLOT-3/CHAN-34 (is not EM) E= 168 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-1/SLOT-3/CHAN-50 (is not EM) E= 310 t= 2578 Q= 138 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-1/SLOT-3/CHAN-50 (is not EM) E= 310 t= 2578 Q= 138 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-1/SLOT-3/CHAN-51 (is not EM) E= 149 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-1/SLOT-7/CHAN-74 (is not EM) E= -458 t= -4476 Q= 65535 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-1/SLOT-7/CHAN-75 (is not EM) E= -1316 t= -4097 Q= 65535 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-1/SLOT-8/CHAN-73 (is not EM) E= 395 t= 3977 Q= 16 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-1/SLOT-8/CHAN-74 (is not EM) E= 873 t= 2458 Q= 57 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-1/SLOT-10/CHAN-90 (is not EM) E= 439 t= 657 Q= 51 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-1/SLOT-13/CHAN-43 (is not EM) E= -742 t= -18504 Q= 65149 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-1/SLOT-7/CHAN-74 (is not EM) E= -458 t= -4476 Q= 65535 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-1/SLOT-7/CHAN-75 (is not EM) E= -1316 t= -4097 Q= 65535 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-1/SLOT-8/CHAN-73 (is not EM) E= 395 t= 3977 Q= 16 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-1/SLOT-8/CHAN-74 (is not EM) E= 873 t= 2458 Q= 57 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-1/SLOT-10/CHAN-90 (is not EM) E= 439 t= 657 Q= 51 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-1/SLOT-13/CHAN-43 (is not EM) E= -742 t= -18504 Q= 65149 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-2/SLOT-3/CHAN-66 (is not EM) E= 186 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-2/SLOT-4/CHAN-35 (is not EM) E= 221 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-3/SLOT-8/CHAN-2 Barrel l/e/p= 0/64/0: E= -2349 t= 1825 Q= 311 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-3/SLOT-8/CHAN-26 Barrel l/e/p= 0/80/0: E= 2658 t= -7453 Q= 17 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-4/SLOT-1/CHAN-24 (is not EM) E= -921 t= 3232 Q= 783 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-3/SLOT-8/CHAN-2 Barrel l/e/p= 0/64/0: E= -2349 t= 1825 Q= 311 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-3/SLOT-8/CHAN-26 Barrel l/e/p= 0/80/0: E= 2658 t= -7453 Q= 17 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-4/SLOT-1/CHAN-24 (is not EM) E= -921 t= 3232 Q= 783 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-4/SLOT-3/CHAN-101 (is not EM) E= 132 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-4/SLOT-3/CHAN-102 (is not EM) E= 460 t= -14229 Q= 14336 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-4/SLOT-3/CHAN-103 (is not EM) E= 269 t= -19829 Q= 7964 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-4/SLOT-3/CHAN-102 (is not EM) E= 460 t= -14229 Q= 14336 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-4/SLOT-3/CHAN-103 (is not EM) E= 269 t= -19829 Q= 7964 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-4/SLOT-3/CHAN-105 (is not EM) E= 157 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-4/SLOT-6/CHAN-78 (is not EM) E= 396 t= 2369 Q= 2278 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-4/SLOT-6/CHAN-78 (is not EM) E= 396 t= 2369 Q= 2278 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-4/SLOT-8/CHAN-106 (is not EM) E= 239 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-4/SLOT-9/CHAN-67 (is not EM) E= 370 t= 3736 Q= 322 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-4/SLOT-10/CHAN-114 (is not EM) E= 599 t= -16317 Q= 741 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-4/SLOT-12/CHAN-46 (is not EM) E= 922 t= 44 Q= 27 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-4/SLOT-12/CHAN-111 (is not EM) E= 580 t= -2324 Q= 69 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-5/SLOT-1/CHAN-29 (is not EM) E= 1675 t= 2852 Q= 193 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-6/SLOT-4/CHAN-15 Barrel l/e/p= 0/96/0: E= -1189 t= -237 Q= 1 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-6/SLOT-5/CHAN-106 Barrel l/e/p= 2/400/0: E= 20986 t= 1170 Q= 278 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-6/SLOT-6/CHAN-29 Barrel l/e/p= 1/160/0: E= -8445 t= -13501 Q= 433 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-6/SLOT-6/CHAN-95 Barrel l/e/p= 1/176/0: E= -4197 t= -6519 Q= 46 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-6/SLOT-10/CHAN-119 Barrel l/e/p= 1/32/0: E= 21271 t= -878 Q= 77 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-6/SLOT-11/CHAN-29 Barrel l/e/p= 1/80/0: E= 23771 t= -668 Q= 38 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-6/SLOT-12/CHAN-103 Barrel l/e/p= 0/160/0: E= -6120 t= -3384 Q= 1 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-6/SLOT-15/CHAN-64 Barrel l/e/p= 0/496/0: E= -24503 t= -1570 Q= 214 P=0x21a5 G=1 +Channel: ENDCAP/A-SIDE/FT-4/SLOT-9/CHAN-67 (is not EM) E= 370 t= 3736 Q= 322 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-4/SLOT-10/CHAN-114 (is not EM) E= 599 t= -16317 Q= 741 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-4/SLOT-12/CHAN-46 (is not EM) E= 922 t= 44 Q= 27 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-4/SLOT-12/CHAN-111 (is not EM) E= 580 t= -2324 Q= 69 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-5/SLOT-1/CHAN-29 (is not EM) E= 1675 t= 2852 Q= 193 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-6/SLOT-4/CHAN-15 Barrel l/e/p= 0/96/0: E= -1189 t= -237 Q= 1 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-6/SLOT-5/CHAN-106 Barrel l/e/p= 2/400/0: E= 20986 t= 1170 Q= 278 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-6/SLOT-6/CHAN-29 Barrel l/e/p= 1/160/0: E= -8445 t= -13501 Q= 433 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-6/SLOT-6/CHAN-95 Barrel l/e/p= 1/176/0: E= -4197 t= -6519 Q= 46 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-6/SLOT-10/CHAN-119 Barrel l/e/p= 1/32/0: E= 21271 t= -878 Q= 77 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-6/SLOT-11/CHAN-29 Barrel l/e/p= 1/80/0: E= 23771 t= -668 Q= 38 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-6/SLOT-12/CHAN-103 Barrel l/e/p= 0/160/0: E= -6120 t= -3384 Q= 1 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-6/SLOT-15/CHAN-64 Barrel l/e/p= 0/496/0: E= -24503 t= -1570 Q= 214 P=0x20a5 G=1 Channel: ENDCAP/A-SIDE/FT-7/SLOT-3/CHAN-37 (is not EM) E= 174 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-7/SLOT-11/CHAN-66 (is not EM) E= 696 t= 212 Q= 773 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-7/SLOT-11/CHAN-67 (is not EM) E= 647 t= -2725 Q= 435 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-7/SLOT-12/CHAN-13 (is not EM) E= 460 t= 1632 Q= 15 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-7/SLOT-13/CHAN-44 (is not EM) E= 468 t= -3307 Q= 310 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-7/SLOT-11/CHAN-66 (is not EM) E= 696 t= 212 Q= 773 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-7/SLOT-11/CHAN-67 (is not EM) E= 647 t= -2725 Q= 435 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-7/SLOT-12/CHAN-13 (is not EM) E= 460 t= 1632 Q= 15 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-7/SLOT-13/CHAN-44 (is not EM) E= 468 t= -3307 Q= 310 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-8/SLOT-3/CHAN-23 (is not EM) E= 210 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-8/SLOT-3/CHAN-24 (is not EM) E= 167 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-8/SLOT-6/CHAN-64 (is not EM) E= 603 t= 2265 Q= 91 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-8/SLOT-7/CHAN-69 (is not EM) E= 699 t= -32183 Q= 65535 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-8/SLOT-7/CHAN-70 (is not EM) E= 416 t= -34978 Q= 65535 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-8/SLOT-7/CHAN-86 (is not EM) E= 1029 t= -25970 Q= 65535 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-8/SLOT-10/CHAN-85 (is not EM) E= 411 t= -3243 Q= 48 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-8/SLOT-11/CHAN-67 (is not EM) E= 438 t= 5084 Q= 21 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-8/SLOT-11/CHAN-80 (is not EM) E= 606 t= -4255 Q= 54 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-8/SLOT-12/CHAN-34 (is not EM) E= 447 t= 570 Q= 16 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-8/SLOT-13/CHAN-29 (is not EM) E= -615 t= -8137 Q= 2115 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-8/SLOT-13/CHAN-39 (is not EM) E= 1046 t= -29765 Q= 11862 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-8/SLOT-13/CHAN-52 (is not EM) E= 669 t= -34674 Q= 6685 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-8/SLOT-13/CHAN-81 (is not EM) E= -593 t= -12676 Q= 3924 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-9/SLOT-4/CHAN-110 (is not EM) E= 690 t= -8540 Q= 490 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-8/SLOT-6/CHAN-64 (is not EM) E= 603 t= 2265 Q= 91 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-8/SLOT-7/CHAN-69 (is not EM) E= 699 t= -32183 Q= 65535 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-8/SLOT-7/CHAN-70 (is not EM) E= 416 t= -34978 Q= 65535 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-8/SLOT-7/CHAN-86 (is not EM) E= 1029 t= -25970 Q= 65535 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-8/SLOT-10/CHAN-85 (is not EM) E= 411 t= -3243 Q= 48 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-8/SLOT-11/CHAN-67 (is not EM) E= 438 t= 5084 Q= 21 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-8/SLOT-11/CHAN-80 (is not EM) E= 606 t= -4255 Q= 54 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-8/SLOT-12/CHAN-34 (is not EM) E= 447 t= 570 Q= 16 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-8/SLOT-13/CHAN-29 (is not EM) E= -615 t= -8137 Q= 2115 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-8/SLOT-13/CHAN-39 (is not EM) E= 1046 t= -29765 Q= 11862 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-8/SLOT-13/CHAN-52 (is not EM) E= 669 t= -34674 Q= 6685 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-8/SLOT-13/CHAN-81 (is not EM) E= -593 t= -12676 Q= 3924 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-9/SLOT-4/CHAN-110 (is not EM) E= 690 t= -8540 Q= 490 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-9/SLOT-8/CHAN-84 (is not EM) E= 139 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-9/SLOT-8/CHAN-85 (is not EM) E= 174 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-9/SLOT-9/CHAN-94 (is not EM) E= 447 t= -668 Q= 45 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-9/SLOT-11/CHAN-54 (is not EM) E= 428 t= 4215 Q= 22 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-9/SLOT-15/CHAN-16 (is not EM) E= 936 t= -39729 Q= 28013 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-10/SLOT-1/CHAN-38 (is not EM) E= 7828 t= 6554 Q= 733 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-10/SLOT-1/CHAN-46 (is not EM) E= 8638 t= -3715 Q= 508 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-10/SLOT-6/CHAN-12 Barrel l/e/p= 0/216/0: E= 1709 t= -8559 Q= 27 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-10/SLOT-6/CHAN-98 Barrel l/e/p= 0/224/0: E= 1587 t= -4647 Q= 129 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-10/SLOT-7/CHAN-77 Barrel l/e/p= 0/184/0: E= 2435 t= 16330 Q= 2144 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-10/SLOT-9/CHAN-77 Barrel l/e/p= 1/184/0: E= 2474 t= -21581 Q= 2 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-10/SLOT-10/CHAN-0 Barrel l/e/p= 1/192/0: E= 13264 t= -21834 Q= 30 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-10/SLOT-10/CHAN-43 Barrel l/e/p= 2/96/0: E= 3589 t= -443 Q= 484 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-11/SLOT-3/CHAN-6 (is not EM) E= 295 t= 11053 Q= 2906 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-9/SLOT-9/CHAN-94 (is not EM) E= 447 t= -668 Q= 45 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-9/SLOT-11/CHAN-54 (is not EM) E= 428 t= 4215 Q= 22 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-9/SLOT-15/CHAN-16 (is not EM) E= 936 t= -39729 Q= 28013 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-10/SLOT-1/CHAN-38 (is not EM) E= 7828 t= 6554 Q= 733 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-10/SLOT-1/CHAN-46 (is not EM) E= 8638 t= -3715 Q= 508 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-10/SLOT-6/CHAN-12 Barrel l/e/p= 0/216/0: E= 1709 t= -8559 Q= 27 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-10/SLOT-6/CHAN-98 Barrel l/e/p= 0/224/0: E= 1587 t= -4647 Q= 129 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-10/SLOT-7/CHAN-77 Barrel l/e/p= 0/184/0: E= 2435 t= 16330 Q= 2144 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-10/SLOT-9/CHAN-77 Barrel l/e/p= 1/184/0: E= 2474 t= -21581 Q= 2 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-10/SLOT-10/CHAN-0 Barrel l/e/p= 1/192/0: E= 13264 t= -21834 Q= 30 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-10/SLOT-10/CHAN-43 Barrel l/e/p= 2/96/0: E= 3589 t= -443 Q= 484 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-11/SLOT-3/CHAN-6 (is not EM) E= 295 t= 11053 Q= 2906 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-11/SLOT-3/CHAN-7 (is not EM) E= 188 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-11/SLOT-6/CHAN-47 (is not EM) E= 402 t= -20472 Q= 26046 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-11/SLOT-6/CHAN-113 (is not EM) E= 570 t= -17894 Q= 65117 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-11/SLOT-6/CHAN-114 (is not EM) E= 361 t= -1792 Q= 10384 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-11/SLOT-6/CHAN-47 (is not EM) E= 402 t= -20472 Q= 26046 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-11/SLOT-6/CHAN-113 (is not EM) E= 570 t= -17894 Q= 65117 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-11/SLOT-6/CHAN-114 (is not EM) E= 361 t= -1792 Q= 10384 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-11/SLOT-8/CHAN-115 (is not EM) E= 204 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-11/SLOT-9/CHAN-87 (is not EM) E= 291 t= -19100 Q= 550 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-12/SLOT-5/CHAN-38 (is not EM) E= 476 t= -10517 Q= 11817 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-12/SLOT-5/CHAN-39 (is not EM) E= 479 t= -420 Q= 1210 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-12/SLOT-7/CHAN-90 (is not EM) E= 937 t= -28417 Q= 65535 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-12/SLOT-7/CHAN-91 (is not EM) E= 493 t= -33093 Q= 65535 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-11/SLOT-9/CHAN-87 (is not EM) E= 291 t= -19100 Q= 550 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-12/SLOT-5/CHAN-38 (is not EM) E= 476 t= -10517 Q= 11817 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-12/SLOT-5/CHAN-39 (is not EM) E= 479 t= -420 Q= 1210 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-12/SLOT-7/CHAN-90 (is not EM) E= 937 t= -28417 Q= 65535 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-12/SLOT-7/CHAN-91 (is not EM) E= 493 t= -33093 Q= 65535 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-12/SLOT-8/CHAN-35 (is not EM) E= 176 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-12/SLOT-8/CHAN-117 (is not EM) E= 255 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-12/SLOT-9/CHAN-15 (is not EM) E= 335 t= -6723 Q= 17 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-12/SLOT-9/CHAN-15 (is not EM) E= 335 t= -6723 Q= 17 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-13/SLOT-4/CHAN-38 (is not EM) E= 207 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-13/SLOT-8/CHAN-47 (is not EM) E= 565 t= 697 Q= 80 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-13/SLOT-13/CHAN-88 (is not EM) E= 586 t= 1309 Q= 150 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-13/SLOT-8/CHAN-47 (is not EM) E= 565 t= 697 Q= 80 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-13/SLOT-13/CHAN-88 (is not EM) E= 586 t= 1309 Q= 150 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-14/SLOT-4/CHAN-15 (is not EM) E= 192 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-14/SLOT-6/CHAN-19 (is not EM) E= -527 t= -9009 Q= 65535 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-14/SLOT-6/CHAN-20 (is not EM) E= -958 t= 24129 Q= 65535 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-14/SLOT-6/CHAN-21 (is not EM) E= -676 t= -5004 Q= 65535 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-14/SLOT-6/CHAN-24 (is not EM) E= -423 t= 3155 Q= 65535 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-14/SLOT-10/CHAN-88 (is not EM) E= 671 t= 1234 Q= 5 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-14/SLOT-12/CHAN-21 (is not EM) E= -779 t= -1722 Q= 65535 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-14/SLOT-12/CHAN-24 (is not EM) E= -732 t= -1499 Q= 65535 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-14/SLOT-13/CHAN-12 (is not EM) E= 614 t= 141 Q= 83 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-15/SLOT-4/CHAN-110 (is not EM) E= 283 t= -24987 Q= 550 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-14/SLOT-6/CHAN-19 (is not EM) E= -527 t= -9009 Q= 65535 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-14/SLOT-6/CHAN-20 (is not EM) E= -958 t= 24129 Q= 65535 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-14/SLOT-6/CHAN-21 (is not EM) E= -676 t= -5004 Q= 65535 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-14/SLOT-6/CHAN-24 (is not EM) E= -423 t= 3155 Q= 65535 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-14/SLOT-10/CHAN-88 (is not EM) E= 671 t= 1234 Q= 5 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-14/SLOT-12/CHAN-21 (is not EM) E= -779 t= -1722 Q= 65535 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-14/SLOT-12/CHAN-24 (is not EM) E= -732 t= -1499 Q= 65535 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-14/SLOT-13/CHAN-12 (is not EM) E= 614 t= 141 Q= 83 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-15/SLOT-4/CHAN-110 (is not EM) E= 283 t= -24987 Q= 550 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-15/SLOT-7/CHAN-68 (is not EM) E= 134 t= 0 Q= 0 P=0xa5 G=0 Channel: ENDCAP/A-SIDE/FT-15/SLOT-9/CHAN-24 (is not EM) E= 165 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-16/SLOT-2/CHAN-25 (is not EM) E= 1974 t= 3993 Q= 9 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-16/SLOT-8/CHAN-15 Barrel l/e/p= 0/344/0: E= 1769 t= -3612 Q= 1 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-16/SLOT-9/CHAN-107 Barrel l/e/p= 2/144/0: E= -2486 t= 6717 Q= 141 P=0x21a5 G=1 +Channel: ENDCAP/A-SIDE/FT-16/SLOT-2/CHAN-25 (is not EM) E= 1974 t= 3993 Q= 9 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-16/SLOT-8/CHAN-15 Barrel l/e/p= 0/344/0: E= 1769 t= -3612 Q= 1 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-16/SLOT-9/CHAN-107 Barrel l/e/p= 2/144/0: E= -2486 t= 6717 Q= 141 P=0x20a5 G=1 Channel: ENDCAP/A-SIDE/FT-17/SLOT-3/CHAN-114 (is not EM) E= 192 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-17/SLOT-6/CHAN-26 (is not EM) E= 447 t= -2898 Q= 568 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-17/SLOT-6/CHAN-27 (is not EM) E= 1487 t= -33 Q= 3464 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-17/SLOT-6/CHAN-28 (is not EM) E= 319 t= -2643 Q= 1598 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-17/SLOT-6/CHAN-125 (is not EM) E= 463 t= 988 Q= 455 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-17/SLOT-8/CHAN-72 (is not EM) E= 262 t= -14958 Q= 641 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-17/SLOT-6/CHAN-26 (is not EM) E= 447 t= -2898 Q= 568 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-17/SLOT-6/CHAN-27 (is not EM) E= 1487 t= -33 Q= 3464 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-17/SLOT-6/CHAN-28 (is not EM) E= 319 t= -2643 Q= 1598 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-17/SLOT-6/CHAN-125 (is not EM) E= 463 t= 988 Q= 455 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-17/SLOT-8/CHAN-72 (is not EM) E= 262 t= -14958 Q= 641 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-17/SLOT-8/CHAN-78 (is not EM) E= 254 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-17/SLOT-9/CHAN-91 (is not EM) E= 333 t= 224 Q= 169 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-17/SLOT-12/CHAN-6 (is not EM) E= 495 t= 34 Q= 59 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-17/SLOT-12/CHAN-28 (is not EM) E= 588 t= 357 Q= 165 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-18/SLOT-5/CHAN-36 (is not EM) E= 279 t= -88 Q= 315 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-18/SLOT-6/CHAN-50 (is not EM) E= 427 t= 2726 Q= 470 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-18/SLOT-6/CHAN-51 (is not EM) E= 407 t= 2532 Q= 29 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-18/SLOT-9/CHAN-41 (is not EM) E= 310 t= 1672 Q= 25 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-18/SLOT-9/CHAN-42 (is not EM) E= 1354 t= -579 Q= 83 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-18/SLOT-9/CHAN-43 (is not EM) E= 457 t= 2187 Q= 77 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-18/SLOT-9/CHAN-93 (is not EM) E= 322 t= 1626 Q= 263 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-18/SLOT-9/CHAN-121 (is not EM) E= 314 t= -1860 Q= 16 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-18/SLOT-12/CHAN-85 (is not EM) E= 579 t= -3323 Q= 68 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-18/SLOT-13/CHAN-15 (is not EM) E= 523 t= 280 Q= 5 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-17/SLOT-9/CHAN-91 (is not EM) E= 333 t= 224 Q= 169 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-17/SLOT-12/CHAN-6 (is not EM) E= 495 t= 34 Q= 59 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-17/SLOT-12/CHAN-28 (is not EM) E= 588 t= 357 Q= 165 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-18/SLOT-5/CHAN-36 (is not EM) E= 279 t= -88 Q= 315 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-18/SLOT-6/CHAN-50 (is not EM) E= 427 t= 2726 Q= 470 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-18/SLOT-6/CHAN-51 (is not EM) E= 407 t= 2532 Q= 29 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-18/SLOT-9/CHAN-41 (is not EM) E= 310 t= 1672 Q= 25 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-18/SLOT-9/CHAN-42 (is not EM) E= 1354 t= -579 Q= 83 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-18/SLOT-9/CHAN-43 (is not EM) E= 457 t= 2187 Q= 77 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-18/SLOT-9/CHAN-93 (is not EM) E= 322 t= 1626 Q= 263 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-18/SLOT-9/CHAN-121 (is not EM) E= 314 t= -1860 Q= 16 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-18/SLOT-12/CHAN-85 (is not EM) E= 579 t= -3323 Q= 68 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-18/SLOT-13/CHAN-15 (is not EM) E= 523 t= 280 Q= 5 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-19/SLOT-9/CHAN-27 (is not EM) E= 214 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-19/SLOT-10/CHAN-27 (is not EM) E= 318 t= -3795 Q= 157 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-19/SLOT-12/CHAN-33 (is not EM) E= 500 t= 2209 Q= 1544 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-20/SLOT-12/CHAN-9 (is not EM) E= 610 t= 3745 Q= 302 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-21/SLOT-3/CHAN-37 (is not EM) E= 394 t= -9152 Q= 425 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-19/SLOT-10/CHAN-27 (is not EM) E= 318 t= -3795 Q= 157 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-19/SLOT-12/CHAN-33 (is not EM) E= 500 t= 2209 Q= 1544 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-20/SLOT-12/CHAN-9 (is not EM) E= 610 t= 3745 Q= 302 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-21/SLOT-3/CHAN-37 (is not EM) E= 394 t= -9152 Q= 425 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-21/SLOT-9/CHAN-27 (is not EM) E= 145 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-21/SLOT-10/CHAN-3 (is not EM) E= 292 t= 2754 Q= 6 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-22/SLOT-2/CHAN-9 (is not EM) E= -858 t= -623 Q= 527 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-22/SLOT-5/CHAN-44 Barrel l/e/p= 0/408/0: E= -2069 t= 10491 Q= 0 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-22/SLOT-5/CHAN-68 Barrel l/e/p= 0/424/0: E= 1860 t= -15199 Q= 9 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-22/SLOT-7/CHAN-35 Barrel l/e/p= 0/384/0: E= 2245 t= -24304 Q= 0 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-22/SLOT-8/CHAN-127 Barrel l/e/p= 0/504/0: E= 1274 t= 1114 Q= 50 P=0x21a5 G=1 -Channel: ENDCAP/A-SIDE/FT-23/SLOT-1/CHAN-22 (is not EM) E= 1501 t= -18696 Q= 770 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-21/SLOT-10/CHAN-3 (is not EM) E= 292 t= 2754 Q= 6 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-22/SLOT-2/CHAN-9 (is not EM) E= -858 t= -623 Q= 527 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-22/SLOT-5/CHAN-44 Barrel l/e/p= 0/408/0: E= -2069 t= 10491 Q= 0 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-22/SLOT-5/CHAN-68 Barrel l/e/p= 0/424/0: E= 1860 t= -15199 Q= 9 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-22/SLOT-7/CHAN-35 Barrel l/e/p= 0/384/0: E= 2245 t= -24304 Q= 0 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-22/SLOT-8/CHAN-127 Barrel l/e/p= 0/504/0: E= 1274 t= 1114 Q= 50 P=0x20a5 G=1 +Channel: ENDCAP/A-SIDE/FT-23/SLOT-1/CHAN-22 (is not EM) E= 1501 t= -18696 Q= 770 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-23/SLOT-2/CHAN-123 (is not EM) E= 183 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-23/SLOT-5/CHAN-116 (is not EM) E= 311 t= -261 Q= 240 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-24/SLOT-1/CHAN-13 (is not EM) E= 944 t= 1294 Q= 49 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-24/SLOT-4/CHAN-68 (is not EM) E= 291 t= 26637 Q= 65535 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-24/SLOT-6/CHAN-2 (is not EM) E= 465 t= -1523 Q= 893 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-23/SLOT-5/CHAN-116 (is not EM) E= 311 t= -261 Q= 240 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-24/SLOT-1/CHAN-13 (is not EM) E= 944 t= 1294 Q= 49 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-24/SLOT-4/CHAN-68 (is not EM) E= 291 t= 26637 Q= 65535 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-24/SLOT-6/CHAN-2 (is not EM) E= 465 t= -1523 Q= 893 P=0x20a5 G=0 Channel: ENDCAP/A-SIDE/FT-24/SLOT-8/CHAN-57 (is not EM) E= 220 t= 0 Q= 0 P=0xa5 G=0 -Channel: ENDCAP/A-SIDE/FT-24/SLOT-10/CHAN-53 (is not EM) E= 362 t= -6210 Q= 121 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-24/SLOT-10/CHAN-57 (is not EM) E= 440 t= -6287 Q= 125 P=0x21a5 G=0 -Channel: ENDCAP/A-SIDE/FT-24/SLOT-10/CHAN-121 (is not EM) E= 409 t= 411 Q= 4 P=0x21a5 G=0 +Channel: ENDCAP/A-SIDE/FT-24/SLOT-10/CHAN-53 (is not EM) E= 362 t= -6210 Q= 121 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-24/SLOT-10/CHAN-57 (is not EM) E= 440 t= -6287 Q= 125 P=0x20a5 G=0 +Channel: ENDCAP/A-SIDE/FT-24/SLOT-10/CHAN-121 (is not EM) E= 409 t= 411 Q= 4 P=0x20a5 G=0 diff --git a/LArCalorimeter/LArROD/src/LArRawChannelBuilderAlg.cxx b/LArCalorimeter/LArROD/src/LArRawChannelBuilderAlg.cxx index 4d7ec9cc1f48cbadea61f535d18197b042329b10..7a0ddb9b0a630bd9a4882b8e804703eb4df804d8 100644 --- a/LArCalorimeter/LArROD/src/LArRawChannelBuilderAlg.cxx +++ b/LArCalorimeter/LArROD/src/LArRawChannelBuilderAlg.cxx @@ -119,7 +119,7 @@ StatusCode LArRawChannelBuilderAlg::execute(const EventContext& ctx) const { const float E1=m_absECutFortQ.value() ? std::fabs(E) : E; if (E1>m_eCutFortQ.value()) { ATH_MSG_VERBOSE("Channel " << m_onlineId->channel_name(id) << " gain " << gain << " above threshold for tQ computation"); - prov|=0x2100; // above cut + iteration converged (by definition, if no iteration done) + prov|=0x2000; // fill bit in provenance that time+quality information are available //Get time by applying OFC-b coefficients: const auto& ofcb=ofcs->OFC_b(id,gain); diff --git a/LumiBlock/LumiBlockComps/CMakeLists.txt b/LumiBlock/LumiBlockComps/CMakeLists.txt index d954796bd1b9878d8ca2d342a4fbf814b37f550c..b9701ec08cc7c31d8ed9c9d5605efd13451ed16b 100644 --- a/LumiBlock/LumiBlockComps/CMakeLists.txt +++ b/LumiBlock/LumiBlockComps/CMakeLists.txt @@ -20,7 +20,7 @@ if( NOT XAOD_ANALYSIS ) endif() atlas_add_library( LumiBlockCompsLib LumiBlockComps/*.h src/*.h Root/*.cxx - src/CreateLumiBlockCollectionFromFile.cxx src/xAOD2NtupLumiSvc.cxx + src/CreateLumiBlockCollectionFromFile.cxx ${extra_srcs} PUBLIC_HEADERS LumiBlockComps INCLUDE_DIRS ${CORAL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} diff --git a/MagneticField/MagFieldElements/MagFieldElements/AtlasFieldCache.h b/MagneticField/MagFieldElements/MagFieldElements/AtlasFieldCache.h index 9a04eee74f3f9a97682100b2288a88810ac32f87..2871b66ea6abd587aa7134c48cd468befeec4b56 100644 --- a/MagneticField/MagFieldElements/MagFieldElements/AtlasFieldCache.h +++ b/MagneticField/MagFieldElements/MagFieldElements/AtlasFieldCache.h @@ -43,7 +43,12 @@ public: AtlasFieldCache(double solFieldScale, double torFieldScale, const AtlasFieldMap* fieldMap); + + /** + * Move-able but not copy-able + */ AtlasFieldCache& operator=(AtlasFieldCache&& other) = default; + AtlasFieldCache(AtlasFieldCache&& other) = default; ~AtlasFieldCache() = default; /// Temporary flag for switching between 'old' and 'new' magField usage @@ -55,46 +60,47 @@ public: inline void getField(const double* ATH_RESTRICT xyz, double* ATH_RESTRICT bxyz, double* ATH_RESTRICT deriv = nullptr); + inline void getFieldZR(const double* ATH_RESTRICT xyz, double* ATH_RESTRICT bxyz, double* ATH_RESTRICT deriv = nullptr); /** status of the magnets */ bool solenoidOn() const; - bool toroidOn() const; + bool toroidOn() const; private: AtlasFieldCache(const AtlasFieldCache& other) = delete; AtlasFieldCache& operator=(const AtlasFieldCache& other) = delete; - AtlasFieldCache(AtlasFieldCache&& other) = delete; bool fillFieldCache(double z, double r, double phi); bool fillFieldCacheZR(double z, double r); + /// Full 3d field + BFieldCache m_cache3d; + + /// Fast 2d field + BFieldCacheZR m_cacheZR; + /// magnetic field scales from currents double m_solScale{ 1 }; double m_torScale{ 1 }; double m_scaleToUse{ 1 }; - // Solenoid zone ID number - needed to set solScale. Assumes only one Solenoid - // zone! - int m_solZoneId{ -1 }; /// handle to the magnetic field service - not owner - const AtlasFieldMap* m_fieldMap; + const AtlasFieldMap* m_fieldMap{ nullptr }; /// Pointer to the conductors in the current field zone (to compute /// Biot-Savart component) Owned by AtlasFieldMap. const std::vector<BFieldCond>* m_cond{ nullptr }; - /// Full 3d field - BFieldCache m_cache3d; - - /// Fast 2d field - BFieldCacheZR m_cacheZR; - // fast 2d map (made of one zone) /// Owned by AtlasFieldMap. const BFieldMeshZR* m_meshZR{ nullptr }; + + // Solenoid zone ID number - needed to set solScale. Assumes only one Solenoid + // zone! + int m_solZoneId{ -1 }; }; } // namespace MagField diff --git a/MagneticField/MagFieldElements/MagFieldElements/AtlasFieldCache.icc b/MagneticField/MagFieldElements/MagFieldElements/AtlasFieldCache.icc index 1ee7397d5c8ebd297fda5e7778ca81bc54b0ac71..ed6d347de9db80fce9b6edb3347ac8db9f2f9951 100644 --- a/MagneticField/MagFieldElements/MagFieldElements/AtlasFieldCache.icc +++ b/MagneticField/MagFieldElements/MagFieldElements/AtlasFieldCache.icc @@ -2,7 +2,6 @@ Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ - /** fill given magnetic field zone */ inline bool MagField::AtlasFieldCache::fillFieldCache(double z, double r, double phi) @@ -10,17 +9,14 @@ MagField::AtlasFieldCache::fillFieldCache(double z, double r, double phi) // search for the zone const BFieldZone* zone = m_fieldMap ? m_fieldMap->findBFieldZone(z, r, phi) : nullptr; - if (zone == nullptr) { + + if (!zone) { // outsize all zones return false; } // set scale for field - if (zone->id() == m_solZoneId) { - m_scaleToUse = m_solScale; - } else { - m_scaleToUse = m_torScale; - } + m_scaleToUse = (zone->id() == m_solZoneId) ? m_solScale : m_torScale; // fill the cache, pass in current scale factor zone->getCache(z, r, phi, m_cache3d, m_scaleToUse); @@ -35,16 +31,16 @@ MagField::AtlasFieldCache::fillFieldCache(double z, double r, double phi) inline bool MagField::AtlasFieldCache::fillFieldCacheZR(double z, double r) { - // is it inside the solenoid zone? - if (m_meshZR && m_meshZR->inside(z, r)) { - - // fill the cache, pass in current scale factor - m_meshZR->getCache(z, r, m_cacheZR, m_solScale); - - } else { - // outside solenoid + // No mesh available + if (!m_meshZR) { + return false; + } + // Not inside the solenoid zone? + if (!m_meshZR->inside(z, r)) { return false; } + // fill the cache, pass in current scale factor + m_meshZR->getCache(z, r, m_cacheZR, m_solScale); return true; } @@ -53,21 +49,25 @@ MagField::AtlasFieldCache::getField(const double* ATH_RESTRICT xyz, double* ATH_RESTRICT bxyz, double* ATH_RESTRICT deriv) { - // Allow for the case of no map for testing - if ( m_fieldMap == nullptr ) { - // constant ATLAS magnetic field if no map has been set - for testing - constexpr double TEST_BFIELD = 1.997; - bxyz[0] = bxyz[1] = 0; - bxyz[2] = TEST_BFIELD; - if (deriv) for (int i = 0; i < 9; i++) deriv[i] = 0.; - return; + // Allow for the case of no map for testing + if (m_fieldMap == nullptr) { + // constant ATLAS magnetic field if no map has been set - for testing + constexpr double TEST_BFIELD = 1.997; + bxyz[0] = bxyz[1] = 0; + bxyz[2] = TEST_BFIELD; + if (deriv) { + for (int i = 0; i < 9; i++) { + deriv[i] = 0.; + } + } + return; } - - const double& x(xyz[0]); - const double& y(xyz[1]); - const double& z(xyz[2]); - double r = std::sqrt(x * x + y * y); - double phi = std::atan2(y, x); + + const double x = xyz[0]; + const double y = xyz[1]; + const double z = xyz[2]; + const double r = std::sqrt(x * x + y * y); + const double phi = std::atan2(y, x); // test if initialised and the cache is valid if (!m_cache3d.inside(z, r, phi)) { @@ -89,13 +89,15 @@ MagField::AtlasFieldCache::getField(const double* ATH_RESTRICT xyz, // do interpolation (cache3d has correct scale factor) m_cache3d.getB(xyz, r, phi, bxyz, deriv); + + if (!m_cond) { + return; + } // add biot savart component - must add in scale factor to avoid changing // conductor SF since the conductor is part of the static magnetic field model - if (m_cond) { - const size_t condSize = m_cond->size(); - for (size_t i = 0; i < condSize; i++) { - (*m_cond)[i].addBiotSavart(m_scaleToUse, xyz, bxyz, deriv); - } + const size_t condSize = m_cond->size(); + for (size_t i = 0; i < condSize; i++) { + (*m_cond)[i].addBiotSavart(m_scaleToUse, xyz, bxyz, deriv); } } @@ -106,19 +108,23 @@ MagField::AtlasFieldCache::getFieldZR(const double* ATH_RESTRICT xyz, { // Allow for the case of no map for testing - if ( m_fieldMap == nullptr ) { - // constant ATLAS magnetic field if no map has been set - for testing - constexpr double TEST_BFIELD = 1.997; - bxyz[0] = bxyz[1] = 0; - bxyz[2] = TEST_BFIELD; - if (deriv) for (int i = 0; i < 9; i++) deriv[i] = 0.; - return; + if (m_fieldMap == nullptr) { + // constant ATLAS magnetic field if no map has been set - for testing + constexpr double TEST_BFIELD = 1.997; + bxyz[0] = bxyz[1] = 0; + bxyz[2] = TEST_BFIELD; + if (deriv) { + for (int i = 0; i < 9; i++) { + deriv[i] = 0.; + } + } + return; } - - const double& x(xyz[0]); - const double& y(xyz[1]); - const double& z(xyz[2]); - double r = sqrt(x * x + y * y); + + const double x = xyz[0]; + const double y = xyz[1]; + const double z = xyz[2]; + const double r = sqrt(x * x + y * y); // test if the cache was initialized and the ZR cache is valid for current // position @@ -137,13 +143,14 @@ MagField::AtlasFieldCache::getFieldZR(const double* ATH_RESTRICT xyz, m_cacheZR.getB(xyz, r, bxyz, deriv); } - inline bool -MagField::AtlasFieldCache::solenoidOn() const { - return m_fieldMap ? m_fieldMap->solenoidOn() : false; +MagField::AtlasFieldCache::solenoidOn() const +{ + return m_fieldMap ? m_fieldMap->solenoidOn() : false; } inline bool -MagField::AtlasFieldCache::toroidOn() const { - return m_fieldMap ? m_fieldMap->toroidOn() : false; +MagField::AtlasFieldCache::toroidOn() const +{ + return m_fieldMap ? m_fieldMap->toroidOn() : false; } diff --git a/MagneticField/MagFieldElements/MagFieldElements/BFieldCache.h b/MagneticField/MagFieldElements/MagFieldElements/BFieldCache.h index d474cbec13a6430627f4cfce73697df53266d1f7..98bf7f2ed75a75db780e7ebe030c004e8c6af313 100644 --- a/MagneticField/MagFieldElements/MagFieldElements/BFieldCache.h +++ b/MagneticField/MagFieldElements/MagFieldElements/BFieldCache.h @@ -15,8 +15,8 @@ #define BFIELDCACHE_H #include "MagFieldElements/BFieldVector.h" +#include "CxxUtils/restrict.h" #include <cmath> -#include <iostream> class BFieldCache { @@ -57,20 +57,27 @@ public: m_invphi = 1.0 / (phimax - phimin); } // set the field values at each corner (rescale for current scale factor) - void setField(int i, - const BFieldVector<double>& field, + void setField(const std::array<BFieldVector<double>,8>& field, double scaleFactor = 1.0) { - for (int j = 0; j < 3; j++) { - m_field[j][i] = scaleFactor * field[j]; + // We pass array of 8 elements with 3 entries + // Which go to 3x8 matrix + for (int i = 0; i < 8; ++i) { + for (int j = 0; j < 3; ++j) { + m_field[j][i] = scaleFactor * field[i][j]; + } } } - void setField(int i, - const BFieldVector<short>& field, + + void setField(const std::array<BFieldVector<short>,8>& field, double scaleFactor = 1.0) { - for (int j = 0; j < 3; j++) { - m_field[j][i] = scaleFactor * field[j]; + // We pass array of 8 elements with 3 entries + // Which go to 3x8 matrix + for (int i = 0; i < 8; ++i) { + for (int j = 0; j < 3; ++j) { + m_field[j][i] = scaleFactor * field[i][j]; + } } } // set the multiplicative factor for the field vectors @@ -87,11 +94,11 @@ public: } // interpolate the field and return B[3]. // also compute field derivatives if deriv[9] is given. - void getB(const double* xyz, + void getB(const double* ATH_RESTRICT xyz, double r, double phi, - double* B, - double* deriv = nullptr) const; + double* ATH_RESTRICT B, + double* ATH_RESTRICT deriv = nullptr) const; private: double m_zmin, m_zmax; // bin range in z diff --git a/MagneticField/MagFieldElements/MagFieldElements/BFieldCache.icc b/MagneticField/MagFieldElements/MagFieldElements/BFieldCache.icc index 8b6e11310e00d373f6cdc0c1d31a79b58358646b..0fadd5381bf1fb8b653d9a4a96bb0ddc7dcccbd3 100644 --- a/MagneticField/MagFieldElements/MagFieldElements/BFieldCache.icc +++ b/MagneticField/MagFieldElements/MagFieldElements/BFieldCache.icc @@ -3,42 +3,41 @@ */ inline void -BFieldCache::getB(const double* xyz, +BFieldCache::getB(const double* ATH_RESTRICT xyz, double r, double phi, - double* B, - double* deriv) const + double* ATH_RESTRICT B, + double* ATH_RESTRICT deriv) const { - const double& x(xyz[0]); - const double& y(xyz[1]); - const double& z(xyz[2]); + const double x = xyz[0]; + const double y = xyz[1]; + const double z = xyz[2]; // make sure phi is inside [m_phimin,m_phimax] if (phi < m_phimin) { phi += 2 * M_PI; } // fractional position inside this bin - float fz = (z - m_zmin) * m_invz; - float gz = 1.0 - fz; - float fr = (r - m_rmin) * m_invr; - float gr = 1.0 - fr; - float fphi = (phi - m_phimin) * m_invphi; - float gphi = 1.0 - fphi; + const float fz = (z - m_zmin) * m_invz; + const float gz = 1.0 - fz; + const float fr = (r - m_rmin) * m_invr; + const float gr = 1.0 - fr; + const float fphi = (phi - m_phimin) * m_invphi; + const float gphi = 1.0 - fphi; // interpolate field values in z, r, phi + const float scale = m_scale; float Bzrphi[3]; for (int i = 0; i < 3; i++) { // z, r, phi components const float* field = m_field[i]; - Bzrphi[i] = m_scale * (gz * (gr * (gphi * field[0] + fphi * field[1]) + - fr * (gphi * field[2] + fphi * field[3])) + - fz * (gr * (gphi * field[4] + fphi * field[5]) + - fr * (gphi * field[6] + fphi * field[7]))); + Bzrphi[i] = scale * (gz * (gr * (gphi * field[0] + fphi * field[1]) + + fr * (gphi * field[2] + fphi * field[3])) + + fz * (gr * (gphi * field[4] + fphi * field[5]) + + fr * (gphi * field[6] + fphi * field[7]))); } // convert (Bz,Br,Bphi) to (Bx,By,Bz) float invr; - float c; - float s; if (r > 0.0) { invr = 1.0 / r; @@ -55,14 +54,14 @@ BFieldCache::getB(const double* xyz, // compute field derivatives if requested if (deriv) { - float sz = m_scale * m_invz; - float sr = m_scale * m_invr; - float sphi = m_scale * m_invphi; + const float sz = m_scale * m_invz; + const float sr = m_scale * m_invr; + const float sphi = m_scale * m_invphi; + float dBdz[3]; - float dBdr[3]; - float dBdphi[3]; + for (int j = 0; j < 3; j++) { // Bz, Br, Bphi components const float* field = m_field[j]; dBdz[j] = @@ -78,14 +77,14 @@ BFieldCache::getB(const double* xyz, fz * (gr * (field[5] - field[4]) + fr * (field[7] - field[6]))); } // convert to cartesian coordinates - float cc = c * c; - float cs = c * s; - float ss = s * s; - float ccinvr = cc * invr; - float csinvr = cs * invr; - float ssinvr = ss * invr; - float sinvr = s * invr; - float cinvr = c * invr; + const float cc = c * c; + const float cs = c * s; + const float ss = s * s; + const float ccinvr = cc * invr; + const float csinvr = cs * invr; + const float ssinvr = ss * invr; + const float sinvr = s * invr; + const float cinvr = c * invr; deriv[0] = cc * dBdr[1] - cs * dBdr[2] - csinvr * dBdphi[1] + ssinvr * dBdphi[2] + sinvr * B[1]; deriv[1] = cs * dBdr[1] - ss * dBdr[2] + ccinvr * dBdphi[1] - diff --git a/MagneticField/MagFieldElements/MagFieldElements/BFieldMesh.h b/MagneticField/MagFieldElements/MagFieldElements/BFieldMesh.h index deab3cd9eeb57dd43f0b3c8a59271d0a235bfce3..585fc31b05ea08f25da6b8b94ca9deda9eb85ecd 100644 --- a/MagneticField/MagFieldElements/MagFieldElements/BFieldMesh.h +++ b/MagneticField/MagFieldElements/MagFieldElements/BFieldMesh.h @@ -16,8 +16,8 @@ #include "MagFieldElements/BFieldCache.h" #include "MagFieldElements/BFieldVector.h" +#include <array> #include <cmath> -#include <iostream> #include <vector> template<class T> @@ -25,11 +25,7 @@ class BFieldMesh { public: // constructor - BFieldMesh() - : m_scale(1.0) - { - ; - } + BFieldMesh() = default; BFieldMesh(double zmin, double zmax, double rmin, @@ -40,12 +36,8 @@ public: : m_scale(bscale) , m_nomScale(bscale) { - m_min[0] = zmin; - m_max[0] = zmax; - m_min[1] = rmin; - m_max[1] = rmax; - m_min[2] = phimin; - m_max[2] = phimax; + m_min = { zmin, rmin, phimin }; + m_max = { zmax, rmax, phimax }; } // set ranges void setRange(double zmin, @@ -55,12 +47,8 @@ public: double phimin, double phimax) { - m_min[0] = zmin; - m_max[0] = zmax; - m_min[1] = rmin; - m_max[1] = rmax; - m_min[2] = phimin; - m_max[2] = phimax; + m_min = { zmin, rmin, phimin }; + m_max = { zmax, rmax, phimax }; } // set bscale void setBscale(double bscale) { m_scale = m_nomScale = bscale; } @@ -75,7 +63,7 @@ public: // add elements to vectors void appendMesh(int i, double mesh) { m_mesh[i].push_back(mesh); } void appendField(const BFieldVector<T>& field) { m_field.push_back(field); } - // build LUT + // build Look Up Table void buildLUT(); // test if a point is inside this zone bool inside(double z, double r, double phi) const; @@ -86,34 +74,38 @@ public: BFieldCache& cache, double scaleFactor = 1.0) const; // get the B field - void getB(const double* xyz, double* B, double* deriv = nullptr) const; + void getB(const double* ATH_RESTRICT xyz, + double* ATH_RESTRICT B, + double* ATH_RESTRICT deriv = nullptr) const; // accessors - double min(int i) const { return m_min[i]; } - double max(int i) const { return m_max[i]; } + double min(size_t i) const { return m_min[i]; } + double max(size_t i) const { return m_max[i]; } double zmin() const { return m_min[0]; } double zmax() const { return m_max[0]; } double rmin() const { return m_min[1]; } double rmax() const { return m_max[1]; } double phimin() const { return m_min[2]; } double phimax() const { return m_max[2]; } - unsigned nmesh(int i) const { return m_mesh[i].size(); } - double mesh(int i, int j) const { return m_mesh[i][j]; } + unsigned nmesh(size_t i) const { return m_mesh[i].size(); } + double mesh(size_t i, size_t j) const { return m_mesh[i][j]; } unsigned nfield() const { return m_field.size(); } - const BFieldVector<T>& field(int i) const { return m_field[i]; } + const BFieldVector<T>& field(size_t i) const { return m_field[i]; } double bscale() const { return m_scale; } int memSize() const; protected: - double m_min[3], m_max[3]; + std::array<double, 3> m_min; + std::array<double, 3> m_max; std::vector<double> m_mesh[3]; private: std::vector<BFieldVector<T>> m_field; - double m_scale; + double m_scale = 1.0; double m_nomScale; // nominal m_scale from the map + // look-up table and related variables std::vector<int> m_LUT[3]; - double m_invUnit[3]; // inverse unit size in the LUT + std::array<double,3> m_invUnit; // inverse unit size in the LUT int m_roff, m_zoff; }; #include "BFieldMesh.icc" diff --git a/MagneticField/MagFieldElements/MagFieldElements/BFieldMesh.icc b/MagneticField/MagFieldElements/MagFieldElements/BFieldMesh.icc index 18adc27d1e280273cf11bca122edfa1f381ac0f6..b85e2bb1aa1348cad08f318ec1d7a5f4fe15f148 100644 --- a/MagneticField/MagFieldElements/MagFieldElements/BFieldMesh.icc +++ b/MagneticField/MagFieldElements/MagFieldElements/BFieldMesh.icc @@ -73,15 +73,18 @@ BFieldMesh<T>::getCache(double z, cache.setRange( mz[iz], mz[iz + 1], mr[ir], mr[ir + 1], mphi[iphi], mphi[iphi + 1]); // store the B field at the 8 corners - int im0 = iz * m_zoff + ir * m_roff + iphi; // index of the first corner - cache.setField(0, m_field[im0], scaleFactor); - cache.setField(1, m_field[im0 + 1], scaleFactor); - cache.setField(2, m_field[im0 + m_roff], scaleFactor); - cache.setField(3, m_field[im0 + m_roff + 1], scaleFactor); - cache.setField(4, m_field[im0 + m_zoff], scaleFactor); - cache.setField(5, m_field[im0 + m_zoff + 1], scaleFactor); - cache.setField(6, m_field[im0 + m_zoff + m_roff], scaleFactor); - cache.setField(7, m_field[im0 + m_zoff + m_roff + 1], scaleFactor); + const int im0 = iz * m_zoff + ir * m_roff + iphi; // index of the first corner + std::array<BFieldVector<T>, 8> field = { + m_field[im0], + m_field[im0 + 1], + m_field[im0 + m_roff], + m_field[im0 + m_roff + 1], + m_field[im0 + m_zoff], + m_field[im0 + m_zoff + 1], + m_field[im0 + m_zoff + m_roff], + m_field[im0 + m_zoff + m_roff + 1] + }; + cache.setField(field, scaleFactor); // store the B scale cache.setBscale(m_scale); } @@ -91,7 +94,9 @@ BFieldMesh<T>::getCache(double z, // template<class T> void -BFieldMesh<T>::getB(const double* xyz, double* B, double* deriv) const +BFieldMesh<T>::getB(const double* ATH_RESTRICT xyz, + double* ATH_RESTRICT B, + double* ATH_RESTRICT deriv) const { // cylindrical coordinates double x = xyz[0]; @@ -136,34 +141,33 @@ BFieldMesh<T>::getB(const double* xyz, double* B, double* deriv) const } // get the B field at the 8 corners int im0 = iz * m_zoff + ir * m_roff + iphi; // index of the first corner - BFieldVector<T> field[8]; - field[0] = m_field[im0]; - field[1] = m_field[im0 + 1]; - field[2] = m_field[im0 + m_roff]; - field[3] = m_field[im0 + m_roff + 1]; - field[4] = m_field[im0 + m_zoff]; - field[5] = m_field[im0 + m_zoff + 1]; - field[6] = m_field[im0 + m_zoff + m_roff]; - field[7] = m_field[im0 + m_zoff + m_roff + 1]; + const std::array<BFieldVector<T>, 8> field = { m_field[im0], + m_field[im0 + 1], + m_field[im0 + m_roff], + m_field[im0 + m_roff + 1], + m_field[im0 + m_zoff], + m_field[im0 + m_zoff + 1], + m_field[im0 + m_zoff + m_roff], + m_field[im0 + m_zoff + m_roff + 1] }; // fractional position inside this mesh - double fz = (z - mz[iz]) / (mz[iz + 1] - mz[iz]); - double gz = 1.0 - fz; - double fr = (r - mr[ir]) / (mr[ir + 1] - mr[ir]); - double gr = 1.0 - fr; - double fphi = (phi - mphi[iphi]) / (mphi[iphi + 1] - mphi[iphi]); - double gphi = 1.0 - fphi; + const double fz = (z - mz[iz]) / (mz[iz + 1] - mz[iz]); + const double gz = 1.0 - fz; + const double fr = (r - mr[ir]) / (mr[ir + 1] - mr[ir]); + const double gr = 1.0 - fr; + const double fphi = (phi - mphi[iphi]) / (mphi[iphi + 1] - mphi[iphi]); + const double gphi = 1.0 - fphi; + const double scale = m_scale; // interpolate field values in z, r, phi double Bzrphi[3]; for (int i = 0; i < 3; i++) { // z, r, phi - Bzrphi[i] = - m_scale * (gz * (gr * (gphi * field[0][i] + fphi * field[1][i]) + - fr * (gphi * field[2][i] + fphi * field[3][i])) + - fz * (gr * (gphi * field[4][i] + fphi * field[5][i]) + - fr * (gphi * field[6][i] + fphi * field[7][i]))); + Bzrphi[i] = scale * (gz * (gr * (gphi * field[0][i] + fphi * field[1][i]) + + fr * (gphi * field[2][i] + fphi * field[3][i])) + + fz * (gr * (gphi * field[4][i] + fphi * field[5][i]) + + fr * (gphi * field[6][i] + fphi * field[7][i]))); } // convert (Bz,Br,Bphi) to (Bx,By,Bz) - double c = (r > 0.0) ? x / r : cos(mphi[iphi]); - double s = (r > 0.0) ? y / r : sin(mphi[iphi]); + const double c = (r > 0.0) ? x / r : cos(mphi[iphi]); + const double s = (r > 0.0) ? y / r : sin(mphi[iphi]); B[0] = Bzrphi[1] * c - Bzrphi[2] * s; B[1] = Bzrphi[1] * s + Bzrphi[2] * c; B[2] = Bzrphi[0]; diff --git a/MagneticField/MagFieldElements/MagFieldElements/BFieldVector.h b/MagneticField/MagFieldElements/MagFieldElements/BFieldVector.h index e54fe41d244d41b5c2349dd1078945a2dd8da823..2d1a79e57b11cabe0e6eb9b2acaa457f3c75e133 100644 --- a/MagneticField/MagFieldElements/MagFieldElements/BFieldVector.h +++ b/MagneticField/MagFieldElements/MagFieldElements/BFieldVector.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // @@ -10,37 +10,40 @@ // // Masahiro Morii, Harvard University // +// Athena MT RD Schaffer , C Anastopoulos +// #ifndef BFIELDVECTOR_H #define BFIELDVECTOR_H +#include <array> + template<class T> class BFieldVector { public: - // constructor - BFieldVector() { ; } + // Default + BFieldVector() = default; + BFieldVector(const BFieldVector&) = default; + BFieldVector(BFieldVector&&) = default; + BFieldVector& operator=(const BFieldVector&) = default; + BFieldVector& operator=(BFieldVector&&) = default; + ~BFieldVector() = default; + BFieldVector(T Bz, T Br, T Bphi) - { - m_B[0] = Bz; - m_B[1] = Br; - m_B[2] = Bphi; - } + : m_B{ Bz, Br, Bphi } + {} // setter - void set(T Bz, T Br, T Bphi) - { - m_B[0] = Bz; - m_B[1] = Br; - m_B[2] = Bphi; - } + void set(T Bz, T Br, T Bphi) { m_B = { Bz, Br, Bphi }; } + // accessors T z() const { return m_B[0]; } T r() const { return m_B[1]; } T phi() const { return m_B[2]; } // array-like accessor - T operator[](int i) const { return m_B[i]; } + T operator[](size_t i) const { return m_B[i]; } private: - T m_B[3]; + std::array<T, 3> m_B; }; #endif diff --git a/MagneticField/MagFieldElements/MagFieldElements/BFieldVectorZR.h b/MagneticField/MagFieldElements/MagFieldElements/BFieldVectorZR.h index 874c231b0bed04693d1996b19e91984e1e50d1fe..e5061dab58f1453e3395fd2073bbdb4c4fd7d7fd 100644 --- a/MagneticField/MagFieldElements/MagFieldElements/BFieldVectorZR.h +++ b/MagneticField/MagFieldElements/MagFieldElements/BFieldVectorZR.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // @@ -9,33 +9,36 @@ // // Masahiro Morii, Harvard University // +// Athena MT RD Schaffer , C Anastopoulos +// #ifndef BFIELDVECTORZR_H #define BFIELDVECTORZR_H - +#include <array> class BFieldVectorZR { public: - // constructor - BFieldVectorZR() { ; } + // default + BFieldVectorZR() = default; + BFieldVectorZR(const BFieldVectorZR&) = default; + BFieldVectorZR(BFieldVectorZR&&) = default; + BFieldVectorZR& operator=(const BFieldVectorZR&) = default; + BFieldVectorZR& operator=(BFieldVectorZR&&) = default; + ~BFieldVectorZR() = default; + + //constructor BFieldVectorZR(float Bz, float Br) - { - m_B[0] = Bz; - m_B[1] = Br; - } + : m_B{ Bz, Br } + {} // setter - void set(float Bz, float Br) - { - m_B[0] = Bz; - m_B[1] = Br; - } + void set(float Bz, float Br) { m_B = { Bz, Br }; } // accessors float z() const { return m_B[0]; } float r() const { return m_B[1]; } // array-like accessor - float operator[](int i) const { return m_B[i]; } + float operator[](size_t i) const { return m_B[i]; } private: - float m_B[2]; + std::array<float, 2> m_B; }; #endif diff --git a/MagneticField/MagFieldElements/src/AtlasFieldCache.cxx b/MagneticField/MagFieldElements/src/AtlasFieldCache.cxx index d21ffee4b7fe0920c77fb48e4e92d80f979f0d4d..89ace3a1077790360d7a78b18627f882f6001f82 100644 --- a/MagneticField/MagFieldElements/src/AtlasFieldCache.cxx +++ b/MagneticField/MagFieldElements/src/AtlasFieldCache.cxx @@ -12,7 +12,7 @@ #include "MagFieldElements/AtlasFieldCache.h" /// Constructor -MagField::AtlasFieldCache::AtlasFieldCache() {} +MagField::AtlasFieldCache::AtlasFieldCache() = default; MagField::AtlasFieldCache::AtlasFieldCache(double solFieldScale, double torFieldScale, diff --git a/MagneticField/MagFieldElements/src/AtlasFieldMap.cxx b/MagneticField/MagFieldElements/src/AtlasFieldMap.cxx index fa16bc0f0489609ecd0a094b7f74691ad61e9cf9..43192dd4523adb52a12c5b6f06d4fea2496b8d19 100644 --- a/MagneticField/MagFieldElements/src/AtlasFieldMap.cxx +++ b/MagneticField/MagFieldElements/src/AtlasFieldMap.cxx @@ -20,7 +20,7 @@ #include "TTree.h" /** Constructor **/ -MagField::AtlasFieldMap::AtlasFieldMap() {} +MagField::AtlasFieldMap::AtlasFieldMap() = default; MagField::AtlasFieldMap::~AtlasFieldMap() { diff --git a/MagneticField/MagFieldServices/src/AtlasFieldCacheCondAlg.cxx b/MagneticField/MagFieldServices/src/AtlasFieldCacheCondAlg.cxx index c14001187c99a9552b5e1fd08e464a4eef97d3b9..932fd88b12a263c7fadba9c93578ef280b0e840a 100644 --- a/MagneticField/MagFieldServices/src/AtlasFieldCacheCondAlg.cxx +++ b/MagneticField/MagFieldServices/src/AtlasFieldCacheCondAlg.cxx @@ -30,7 +30,7 @@ MagField::AtlasFieldCacheCondAlg::AtlasFieldCacheCondAlg(const std::string& name :AthReentrantAlgorithm(name, pSvcLocator){ } -MagField::AtlasFieldCacheCondAlg::~AtlasFieldCacheCondAlg(){ } +MagField::AtlasFieldCacheCondAlg::~AtlasFieldCacheCondAlg()= default; StatusCode MagField::AtlasFieldCacheCondAlg::initialize() { diff --git a/MagneticField/MagFieldServices/src/AtlasFieldMapCondAlg.cxx b/MagneticField/MagFieldServices/src/AtlasFieldMapCondAlg.cxx index 56fc691ae50152e10706f55c765506774594b913..4d15b83660bb8916d3b974b0f050b84291818fe6 100644 --- a/MagneticField/MagFieldServices/src/AtlasFieldMapCondAlg.cxx +++ b/MagneticField/MagFieldServices/src/AtlasFieldMapCondAlg.cxx @@ -33,7 +33,7 @@ MagField::AtlasFieldMapCondAlg::AtlasFieldMapCondAlg(const std::string& name, :AthReentrantAlgorithm(name, pSvcLocator){ } -MagField::AtlasFieldMapCondAlg::~AtlasFieldMapCondAlg(){ } +MagField::AtlasFieldMapCondAlg::~AtlasFieldMapCondAlg()= default; StatusCode MagField::AtlasFieldMapCondAlg::initialize() { @@ -213,7 +213,7 @@ MagField::AtlasFieldMapCondAlg::updateFieldMap(const EventContext& ctx, Cache& c ATH_MSG_INFO("updateFieldMap: tagInfoH " << tagInfoH.fullKey() << " is valid. "); int i = 0; bool resetCurrentsFromTagInfo = false; - for ( auto tag : tagInfoH->getTags() ) { + for ( const auto& tag : tagInfoH->getTags() ) { ATH_MSG_DEBUG("updateFieldMap: i, tags: " << i << " " << tag.first << " " << tag.second); ++i; if (tag.first == "MapSoleCurrent") { diff --git a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataTool.cxx b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataTool.cxx index fa8349ee7ce46f45eab48d33bbe033b98ce0f48f..863cf9d74ad8a1ad987039cb9a204d4db0cd70d5 100755 --- a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataTool.cxx +++ b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataTool.cxx @@ -86,12 +86,11 @@ StatusCode Muon::RpcRdoToPrepDataTool::decode( std::vector<IdentifierHash>& idVe return StatusCode::FAILURE; } ATH_MSG_DEBUG("Core decode processed in Legacy decode (hash vector)"); - - auto prd_hashes = m_rpcPrepDataContainer->GetAllCurrentHashes(); - for (auto hash : prd_hashes){ - ATH_MSG_DEBUG("Contents of CONTAINER in this view : " << hash); + if (msgLvl(MSG::DEBUG)){ + for (const auto &[hash, ptr] : m_rpcPrepDataContainer->GetAllHashPtrPair()){ + ATH_MSG_DEBUG("Contents of CONTAINER in this view : " << hash); + } } - // For additional information on container contents, this function can be used // Muon::RpcRdoToPrepDataToolCore::printPrepData(); @@ -106,12 +105,11 @@ StatusCode Muon::RpcRdoToPrepDataTool::decode( const std::vector<uint32_t>& robI return StatusCode::FAILURE; } ATH_MSG_DEBUG("Core decode processed in Legacy decode (ROB vector)"); - - auto prd_hashes = m_rpcPrepDataContainer->GetAllCurrentHashes(); - for (auto hash : prd_hashes){ - ATH_MSG_DEBUG("Contents of CONTAINER in this view : " << hash); + if (msgLvl(MSG::DEBUG)){ + for (const auto &[hash, ptr] : m_rpcPrepDataContainer->GetAllHashPtrPair()){ + ATH_MSG_DEBUG("Contents of CONTAINER in this view : " << hash); + } } - // For additional information on container contents, this function can be used // Muon::RpcRdoToPrepDataToolCore::printPrepData(); diff --git a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataToolMT.cxx b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataToolMT.cxx index f2787b9b84e3002e1b3ff67f7af06dff9cf4ca20..56c363ab1da9a0502ab85f79bda09b042a1f7625 100755 --- a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataToolMT.cxx +++ b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataToolMT.cxx @@ -179,7 +179,7 @@ StatusCode Muon::RpcRdoToPrepDataToolMT::transferOutputToCache(){ ATH_MSG_DEBUG("Transferring local decoding from Core to cache container inside MT"); // Take m_rpcPrepDataContainer and transfer contents to m_rpcPrepDataContainerFromCache - auto prd_hashes = m_rpcPrepDataContainer->GetAllCurrentHashes(); + auto prd_hashes = m_rpcPrepDataContainer->GetAllCurrentHashes(); //deliberately GetAllCurrentHashes for (auto hash : prd_hashes) { // Remove collection from local-thread container and place into unique_ptr to move to cache std::unique_ptr<Muon::RpcPrepDataCollection> coll ( m_rpcPrepDataContainer->removeCollection(hash) ); @@ -200,7 +200,7 @@ StatusCode Muon::RpcRdoToPrepDataToolMT::transferOutputToCache(){ } // Take m_rpcCoinDataContainer and transfer contents to m_rpcCoinDataContainerFromCache - auto coin_hashes = m_rpcCoinDataContainer->GetAllCurrentHashes(); + auto coin_hashes = m_rpcCoinDataContainer->GetAllCurrentHashes(); //deliberately GetAllCurrentHashes for (auto hash : coin_hashes) { // Remove collection from local-thread container and place into unique_ptr to move to cache std::unique_ptr<Muon::RpcCoinDataCollection> coll ( m_rpcCoinDataContainer->removeCollection(hash) ); @@ -220,17 +220,14 @@ StatusCode Muon::RpcRdoToPrepDataToolMT::transferOutputToCache(){ ATH_MSG_DEBUG("Coin hash " << hash << " has been moved to cache container"); } - - auto prd_hashes_cache_check = m_rpcPrepDataContainerFromCache->GetAllCurrentHashes(); - for (auto hash : prd_hashes_cache_check){ - ATH_MSG_DEBUG("Contents of CONTAINER in this view : " << hash); - } - - auto prd_hashes_local_check = m_rpcPrepDataContainer->GetAllCurrentHashes(); - for (auto hash : prd_hashes_local_check){ - ATH_MSG_DEBUG("Contents of LOCAL in this view : " << hash); + if (msgLvl(MSG::DEBUG)){ + for (const auto &[hash, ptr] : m_rpcPrepDataContainerFromCache->GetAllHashPtrPair()){ + ATH_MSG_DEBUG("Contents of CONTAINER in this view : " << hash); + } + for (const auto &[hash, ptr] : m_rpcPrepDataContainer->GetAllHashPtrPair()){ + ATH_MSG_DEBUG("Contents of LOCAL in this view : " << hash); + } } - // For additional information on the contents of the cache-based container, this function can be used //printMT(); diff --git a/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/CMakeLists.txt b/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/CMakeLists.txt index dc23846f25f384693a1886b5f270052b4875e153..64e2934e9db591fdfa95c86ce25771ef723880e8 100644 --- a/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/CMakeLists.txt +++ b/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/CMakeLists.txt @@ -23,7 +23,7 @@ atlas_depends_on_subdirs( PUBLIC atlas_add_component( MuonRdoToPrepData src/*.cxx src/components/*.cxx - LINK_LIBRARIES AthenaBaseComps GaudiKernel StoreGateLib SGtests Identifier TrigSteeringEvent IRegionSelector MuonPrepRawData MuonTrigCoinData AthViews) + LINK_LIBRARIES AthenaBaseComps GaudiKernel StoreGateLib SGtests Identifier TrigSteeringEvent IRegionSelector MuonPrepRawData MuonTrigCoinData AthViews MuonCnvToolInterfacesLib ) # Install files from the package: atlas_install_headers( MuonRdoToPrepData ) diff --git a/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/CMakeLists.txt b/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/CMakeLists.txt index 06e2e03dc6fa3055aa5a2aa15fb13ea1f38417bf..ba336aad3115bff4595d51d59c0804285e2deb47 100644 --- a/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/CMakeLists.txt +++ b/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/CMakeLists.txt @@ -30,9 +30,6 @@ atlas_add_library( RPC_CondCablingLib LINK_LIBRARIES ${CORAL_LIBRARIES} AthenaBaseComps GaudiKernel MuonCondInterface MuonCablingTools SGTools StoreGateLib SGtests AthenaPoolUtilities Identifier MuonIdHelpersLib PathResolver ) atlas_add_component( RPC_CondCabling - src/RPCCablingDbTool.cxx - src/RPCTriggerDbTool.cxx - src/RpcCablingCondAlg.cxx src/components/*.cxx INCLUDE_DIRS ${CORAL_INCLUDE_DIRS} LINK_LIBRARIES ${CORAL_LIBRARIES} RPC_CondCablingLib) diff --git a/MuonSpectrometer/MuonConfig/python/MuonRdoDecodeConfig.py b/MuonSpectrometer/MuonConfig/python/MuonRdoDecodeConfig.py index 7d5dca30640f6ccb106e064327f36a393a30e701..0932823f79f26b3be6ddd1113bebc8ca8e263511 100644 --- a/MuonSpectrometer/MuonConfig/python/MuonRdoDecodeConfig.py +++ b/MuonSpectrometer/MuonConfig/python/MuonRdoDecodeConfig.py @@ -137,9 +137,8 @@ def MdtRDODecodeCfg(flags, forTrigger=False): DecodingTool = MdtRdoToMdtPrepDataTool, PrintPrepData = False ) # add RegSelTool - # Comented out since this needs to be replaced by new config for region selector - #from RegionSelector.RegSelToolConfig import makeRegSelTool_MDT - #MdtRdoToMdtPrepData.RegSel_MDT = makeRegSelTool_MDT() + from RegionSelector.RegSelToolConfig import regSelToolMDTCfg + MdtRdoToMdtPrepData.RegSel_MDT = acc.popToolsAndMerge( regSelToolMDTCfg( flags ) ) if forTrigger: # Set the algorithm to RoI mode diff --git a/MuonSpectrometer/MuonConfig/share/MuonDataDecodeTest.ref b/MuonSpectrometer/MuonConfig/share/MuonDataDecodeTest.ref index 63e58724484de115a7faaab557f8398346d03cde..19870c902df591399e53249e88245277decfadbc 100644 --- a/MuonSpectrometer/MuonConfig/share/MuonDataDecodeTest.ref +++ b/MuonSpectrometer/MuonConfig/share/MuonDataDecodeTest.ref @@ -1,548 +1,21 @@ -Flag Name : Value -Beam.BunchSpacing : 25 -Beam.Energy : [function] -Beam.NumberOfCollisions : [function] -Beam.Type : [function] -Beam.estimatedLuminosity : [function] -Common.Project : 'Athena' -Common.bunchCrossingSource : [function] -Common.doExpressProcessing : False -Common.isOnline : False -Common.useOnlineLumi : [function] -Concurrency.NumConcurrentEvents : 0 -Concurrency.NumProcs : 0 -Concurrency.NumThreads : 0 -Exec.DebugStage : '' -Exec.MaxEvents : -1 -Exec.OutputLevel : 3 -Exec.SkipEvents : 0 -GeoModel.Align.Dynamic : [function] -GeoModel.AtlasVersion : 'ATLAS-R2-2016-01-00-01' -GeoModel.IBLLayout : [function] -GeoModel.Layout : 'atlas' -GeoModel.Run : [function] -GeoModel.StripGeoType : [function] -GeoModel.Type : [function] -IOVDb.DatabaseInstance : [function] -IOVDb.GlobalTag : 'CONDBR2-BLKPA-2018-13' -Input.Collections : [function] -Input.Files : ['/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1'] -Input.Format : [function] -Input.ProjectName : [function] -Input.RunNumber : [function] -Input.SecondaryCollections : [function] -Input.SecondaryFiles : [] -Input.isMC : [function] -Output.AODFileName : '' -Output.ESDFileName : '' -Output.EVNTFileName : '' -Output.HISTFileName : '' -Output.HITSFileName : '' -Output.RDOFileName : '' -Output.RDO_SGNLFileName : '' -Output.doESD : [function] -Output.doWriteAOD : [function] -Output.doWriteBS : False -Output.doWriteESD : [function] -Output.doWriteRDO : [function] -Output.doWriteRDO_SGNL : [function] -Random.Engine : 'dSFMT' -Scheduler.CheckDependencies : True -Scheduler.ShowControlFlow : True -Scheduler.ShowDataDeps : True -Scheduler.ShowDataFlow : True -TrackingGeometry.MagneticFileMode : 6 -TrackingGeometry.MaterialSource : 'COOL' -Flag categories that can be loaded dynamically -Category : Generator name : Defined in -BField : __bfield : AthenaConfiguration/AllConfigFlags.py -BTagging : __btagging : AthenaConfiguration/AllConfigFlags.py -Calo : __calo : AthenaConfiguration/AllConfigFlags.py -DQ : __dq : AthenaConfiguration/AllConfigFlags.py -Detector : __detector : AthenaConfiguration/AllConfigFlags.py -Digitization : __digitization : AthenaConfiguration/AllConfigFlags.py -Egamma : __egamma : AthenaConfiguration/AllConfigFlags.py -InDet : __indet : AthenaConfiguration/AllConfigFlags.py -LAr : __lar : AthenaConfiguration/AllConfigFlags.py -Muon : __muon : AthenaConfiguration/AllConfigFlags.py -MuonCombined : __muoncombined : AthenaConfiguration/AllConfigFlags.py -Overlay : __overlay : AthenaConfiguration/AllConfigFlags.py -PF : __pflow : AthenaConfiguration/AllConfigFlags.py -Sim : __simulation : AthenaConfiguration/AllConfigFlags.py -Tile : __tile : AthenaConfiguration/AllConfigFlags.py -Trigger : __trigger : AthenaConfiguration/AllConfigFlags.py -Py:Athena INFO About to setup Raw data decoding -Py:Athena INFO using release [WorkDir-22.0.15] [x86_64-centos7-gcc8-opt] [muonconfig/5f5ea9b] -- built on [2020-06-03T1254] -Py:AutoConfigFlags INFO Obtaining metadata of auto-configuration by peeking into /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1 -Py:MetaReader INFO Current mode used: peeker -Py:MetaReader INFO Current filenames: ['/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1'] -Py:ConfigurableDb INFO Read module info for 5533 configurables from 5 genConfDb files -Py:ConfigurableDb INFO No duplicates have been found: that's good ! -EventInfoMgtInit: Got release version Athena-22.0.15 -Py:IOVDbSvc.CondDB INFO Setting up conditions DB access to instance OFLP200 -Py:Athena INFO Print Config -Py:ComponentAccumulator INFO Event Inputs -Py:ComponentAccumulator INFO Event Algorithm Sequences -Py:ComponentAccumulator INFO Top sequence 0 -Py:ComponentAccumulator INFO \__ AthAlgSeq (seq: SEQ AND) -Py:ComponentAccumulator INFO \__ RpcRawDataProvider (alg) -Py:ComponentAccumulator INFO \__ TgcRawDataProvider (alg) -Py:ComponentAccumulator INFO \__ MdtRawDataProvider (alg) -Py:ComponentAccumulator INFO \__ CscRawDataProvider (alg) -Py:ComponentAccumulator INFO \__ RpcRdoToRpcPrepData (alg) -Py:ComponentAccumulator INFO \__ TgcRdoToTgcPrepData (alg) -Py:ComponentAccumulator INFO \__ MdtRdoToMdtPrepData (alg) -Py:ComponentAccumulator INFO \__ CscRdoToCscPrepData (alg) -Py:ComponentAccumulator INFO \__ CscThresholdClusterBuilder (alg) -Py:ComponentAccumulator INFO Condition Algorithms -Py:ComponentAccumulator INFO \__ CondInputLoader (cond alg) -Py:ComponentAccumulator INFO \__ MuonAlignmentCondAlg (cond alg) -Py:ComponentAccumulator INFO \__ MuonDetectorCondAlg (cond alg) -Py:ComponentAccumulator INFO \__ RpcCablingCondAlg (cond alg) -Py:ComponentAccumulator INFO \__ MuonMDT_CablingAlg (cond alg) -Py:ComponentAccumulator INFO \__ AtlasFieldMapCondAlg (cond alg) -Py:ComponentAccumulator INFO \__ AtlasFieldCacheCondAlg (cond alg) -Py:ComponentAccumulator INFO \__ RpcCondDbAlg (cond alg) -Py:ComponentAccumulator INFO \__ MdtCalibDbAlg (cond alg) -Py:ComponentAccumulator INFO \__ CscCondDbAlg (cond alg) -Py:ComponentAccumulator INFO Services -Py:ComponentAccumulator INFO ['EventSelector', 'ByteStreamInputSvc', 'EventPersistencySvc', 'ByteStreamCnvSvc', 'ROBDataProviderSvc', 'ByteStreamAddressProviderSvc', 'MetaDataStore', 'InputMetaDataStore', 'MetaDataSvc', 'ProxyProviderSvc', 'GeoModelSvc', 'DetDescrCnvSvc', 'TagInfoMgr', 'IOVDbSvc', 'PoolSvc', 'CondSvc', 'DBReplicaSvc', 'AthenaPoolCnvSvc', 'MuonIdHelperSvc', 'RPCcablingServerSvc', 'MuonRPC_CablingSvc', 'LVL1TGC::TGCRecRoiSvc', 'TGCcablingServerSvc', 'MuonMDT_CablingSvc', 'AtlasFieldSvc', 'CSCcablingSvc'] -Py:ComponentAccumulator INFO Public Tools -Py:ComponentAccumulator INFO [ -Py:ComponentAccumulator INFO IOVDbMetaDataTool/IOVDbMetaDataTool, -Py:ComponentAccumulator INFO ByteStreamMetadataTool/ByteStreamMetadataTool, -Py:ComponentAccumulator INFO RPCCablingDbTool/RPCCablingDbTool, -Py:ComponentAccumulator INFO Muon::RPC_RawDataProviderToolMT/RPC_RawDataProviderToolMT, -Py:ComponentAccumulator INFO Muon::TGC_RawDataProviderToolMT/TGC_RawDataProviderToolMT, -Py:ComponentAccumulator INFO MDTCablingDbTool/MDTCablingDbTool, -Py:ComponentAccumulator INFO Muon::MDT_RawDataProviderToolMT/MDT_RawDataProviderToolMT, -Py:ComponentAccumulator INFO Muon::CSC_RawDataProviderToolMT/CSC_RawDataProviderToolMT, -Py:ComponentAccumulator INFO ] -Py:ComponentAccumulator INFO Private Tools -Py:ComponentAccumulator INFO [ -Py:ComponentAccumulator INFO ] -Py:ComponentAccumulator INFO TheApp properties -Py:ComponentAccumulator INFO EvtSel : EventSelector -Py:Athena INFO Save Config - -JOs reading stage finished, launching CARunner from pickle file - -ApplicationMgr SUCCESS -==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v33r1) - running on lxplus703.cern.ch on Wed Jun 3 15:26:14 2020 -==================================================================================================================================== -ApplicationMgr INFO Application Manager Configured successfully -PublicTool IOVDbMetaDataTool -PublicTool ByteStreamMetadataTool -PublicTool RPCCablingDbTool -PublicTool RPC_RawDataProviderToolMT -PublicTool TGC_RawDataProviderToolMT -PublicTool MDTCablingDbTool -PublicTool MDT_RawDataProviderToolMT -PublicTool CSC_RawDataProviderToolMT -CoreDumpSvc INFO install f-a-t-a-l handler... (flag = 438) -CoreDumpSvc INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) -ClassIDSvc INFO getRegistryEntries: read 3838 CLIDRegistry entries for module ALL -MetaDataSvc INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00 -AthenaPoolCnvSvc INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00 -PoolSvc INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.xml) [ok] -PoolSvc INFO Set connectionsvc retry/timeout/IDLE timeout to 'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled -PoolSvc INFO Frontier compression level set to 5 -DBReplicaSvc INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy-atlas.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-06-02T2139/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus703.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] -DBReplicaSvc INFO COOL SQLite replicas will be excluded if matching pattern /DBRelease/ -PoolSvc INFO Successfully setup replica sorting algorithm -PoolSvc INFO Setting up APR FileCatalog and Streams -PoolSvc INFO Resolved path (via ATLAS_POOLCOND_PATH) is /cvmfs/atlas-condb.cern.ch/repo/conditions/poolcond/PoolFileCatalog.xml -PoolSvc WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables -PoolSvc WARNING Unable to locate catalog for apcfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables -PoolSvc WARNING Unable to locate catalog for prfile:poolcond/PoolCat_comcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables -PoolSvc WARNING Unable to locate catalog for apcfile:poolcond/PoolCat_comcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables -PoolSvc INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.xml -DbSession INFO Open DbSession -Domain[ROOT_All] INFO > Access DbDomain READ [ROOT_All] -ToolSvc.ByteStr... INFO Initializing ToolSvc.ByteStreamMetadataTool - package version ByteStreamCnvSvc-00-00-00 -MetaDataSvc INFO Found MetaDataTools = PublicToolHandleArray(['IOVDbMetaDataTool/IOVDbMetaDataTool','ByteStreamMetadataTool/ByteStreamMetadataTool']) -ByteStreamAddre... INFO Initializing ByteStreamAddressProviderSvc - package version ByteStreamCnvSvcBase-00-00-00 -ByteStreamAddre... INFO initialized -ByteStreamAddre... INFO -- Will fill Store with id = 0 -IOVDbSvc INFO Opened read transaction for POOL PersistencySvc -IOVDbSvc INFO Only 5 POOL conditions files will be open at once -IOVDbSvc INFO Cache alignment will be done in 3 slices -IOVDbSvc INFO Global tag: CONDBR2-BLKPA-2018-13 set from joboptions -IOVDbFolder INFO Inputfile tag override disabled for /GLOBAL/BField/Maps -IOVDbSvc INFO Initialised with 10 connections and 29 folders -IOVDbSvc INFO Service IOVDbSvc initialised successfully -ClassIDSvc INFO getRegistryEntries: read 2674 CLIDRegistry entries for module ALL -IOVDbSvc INFO Opening COOL connection for COOLOFL_MUONALIGN/CONDBR2 -IOVSvc INFO No IOVSvcTool associated with store "StoreGateSvc" -IOVSvc.IOVSvcTool INFO IOVRanges will be checked at every Event -IOVDbSvc INFO Opening COOL connection for COOLONL_RPC/CONDBR2 -IOVDbSvc INFO Disconnecting from COOLOFL_MUONALIGN/CONDBR2 -IOVDbSvc INFO Opening COOL connection for COOLONL_TGC/CONDBR2 -IOVDbSvc INFO Disconnecting from COOLONL_RPC/CONDBR2 -IOVDbSvc INFO Opening COOL connection for COOLONL_MDT/CONDBR2 -IOVDbSvc INFO Disconnecting from COOLONL_TGC/CONDBR2 -IOVDbSvc INFO Opening COOL connection for COOLONL_GLOBAL/CONDBR2 -IOVDbSvc INFO Disconnecting from COOLONL_MDT/CONDBR2 -IOVDbSvc INFO Opening COOL connection for COOLOFL_DCS/CONDBR2 -IOVDbSvc INFO Disconnecting from COOLONL_GLOBAL/CONDBR2 -IOVDbSvc INFO Opening COOL connection for COOLOFL_RPC/CONDBR2 -IOVDbSvc INFO Disconnecting from COOLOFL_DCS/CONDBR2 -IOVDbSvc INFO Opening COOL connection for COOLOFL_MDT/CONDBR2 -IOVDbSvc INFO Disconnecting from COOLOFL_RPC/CONDBR2 -IOVDbSvc INFO Opening COOL connection for COOLOFL_CSC/CONDBR2 -IOVDbSvc INFO Disconnecting from COOLOFL_MDT/CONDBR2 -IOVDbSvc INFO Disconnecting from COOLOFL_CSC/CONDBR2 -IOVDbSvc INFO Added taginfo remove for /CSC/FTHOLD -IOVDbSvc INFO Added taginfo remove for /CSC/NOISE -IOVDbSvc INFO Added taginfo remove for /CSC/PED -IOVDbSvc INFO Added taginfo remove for /CSC/PSLOPE -IOVDbSvc INFO Added taginfo remove for /CSC/RMS -IOVDbSvc INFO Added taginfo remove for /CSC/STAT -IOVDbSvc INFO Added taginfo remove for /CSC/T0BASE -IOVDbSvc INFO Added taginfo remove for /CSC/T0PHASE -IOVDbSvc INFO Added taginfo remove for /EXT/DCS/MAGNETS/SENSORDATA -IOVDbSvc INFO Added taginfo remove for /GLOBAL/BField/Maps -IOVDbSvc INFO Added taginfo remove for /MDT/CABLING/MAP_SCHEMA -IOVDbSvc INFO Added taginfo remove for /MDT/CABLING/MEZZANINE_SCHEMA -IOVDbSvc INFO Added taginfo remove for /MDT/RTBLOB -IOVDbSvc INFO Added taginfo remove for /MDT/T0BLOB -IOVDbSvc INFO Added taginfo remove for /MUONALIGN/CSC/ILINES -IOVDbSvc INFO Added taginfo remove for /MUONALIGN/MDT/ASBUILTPARAMS -IOVDbSvc INFO Added taginfo remove for /MUONALIGN/MDT/BARREL -IOVDbSvc INFO Added taginfo remove for /MUONALIGN/MDT/ENDCAP/SIDEA -IOVDbSvc INFO Added taginfo remove for /MUONALIGN/MDT/ENDCAP/SIDEC -IOVDbSvc INFO Added taginfo remove for /MUONALIGN/TGC/SIDEA -IOVDbSvc INFO Added taginfo remove for /MUONALIGN/TGC/SIDEC -IOVDbSvc INFO Added taginfo remove for /RPC/CABLING/MAP_SCHEMA -IOVDbSvc INFO Added taginfo remove for /RPC/CABLING/MAP_SCHEMA_CORR -IOVDbSvc INFO Added taginfo remove for /RPC/DCS/DeadRopanels -IOVDbSvc INFO Added taginfo remove for /RPC/DCS/OffRopanels -IOVDbSvc INFO Added taginfo remove for /RPC/DQMF/ELEMENT_STATUS -IOVDbSvc INFO Added taginfo remove for /RPC/TRIGGER/CM_THR_ETA -IOVDbSvc INFO Added taginfo remove for /RPC/TRIGGER/CM_THR_PHI -IOVDbSvc INFO Added taginfo remove for /TGC/CABLING/MAP_SCHEMA -GeoModelSvc INFO Explicitly initializing DetDescrCnvSvc -DetDescrCnvSvc INFO initializing -DetDescrCnvSvc INFO Found DetectorStore service -DetDescrCnvSvc INFO filling proxies for detector managers -DetDescrCnvSvc INFO filling address for CaloTTMgr with CLID 117659265 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloMgr with CLID 4548337 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloSuperCellMgr with CLID 241807251 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloIdManager with CLID 125856940 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArIdManager with CLID 79554919 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for IdDict with CLID 2411 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for AtlasID with CLID 164875623 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for PixelID with CLID 2516 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for SCT_ID with CLID 2517 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TRT_ID with CLID 2518 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for SiliconID with CLID 129452393 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArEM_ID with CLID 163583365 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArEM_SuperCell_ID with CLID 99488227 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHEC_ID with CLID 3870484 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHEC_SuperCell_ID with CLID 254277678 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArFCAL_ID with CLID 45738051 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArFCAL_SuperCell_ID with CLID 12829437 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArMiniFCAL_ID with CLID 79264204 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArOnlineID with CLID 158698068 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TTOnlineID with CLID 38321944 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArOnline_SuperCellID with CLID 115600394 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHVLineID with CLID 27863673 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArElectrodeID with CLID 80757351 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileID with CLID 2901 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for Tile_SuperCell_ID with CLID 49557789 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileHWID with CLID 2902 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileTBID with CLID 2903 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for MDTIDHELPER with CLID 4170 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CSCIDHELPER with CLID 4171 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for RPCIDHELPER with CLID 4172 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TGCIDHELPER with CLID 4173 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloLVL1_ID with CLID 108133391 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloCell_ID with CLID 123500438 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloCell_SuperCell_ID with CLID 128365736 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloDM_ID with CLID 167756483 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for ZdcID with CLID 190591643 and storage type 68 to detector store -GeoModelSvc.Muo... INFO Initializing ... -GeoModelSvc::RD...WARNING Getting PixTBMatComponents with default tag -GeoModelSvc::RD...WARNING Getting PixTBMaterials with default tag -GeoModelSvc::RD...WARNING Getting InDetMatComponents with default tag -GeoModelSvc::RD...WARNING Getting InDetMaterials with default tag -MuonGeoModel INFO MuonDetectorFactory - constructor MuonSystem OuterRadius 13000 Length 22030 -GeoModelSvc.Muo... INFO create MuonDetectorTool - package version = MuonGeoModel-00-00-00 -GeoModelSvc.Muo... INFO (from GeoModelSvc) AtlasVersion = <ATLAS-R2-2016-01-00-01> MuonVersion = <> -GeoModelSvc.Muo... INFO Keys for Muon Switches are (key) ATLAS-R2-2016-01-00-01 (node) ATLAS -GeoModelSvc.Muo... INFO (from GeoModelSvc) in AtlasVersion = <ATLAS-R2-2016-01-00-01> default MuonVersion is <MuonSpectrometer-R.08.01> -GeoModelSvc.Muo... INFO Properties have been set as follows: -GeoModelSvc.Muo... INFO LayoutName R -GeoModelSvc.Muo... INFO IncludeCutouts 0 -GeoModelSvc.Muo... INFO IncludeCutoutsBog 0 -GeoModelSvc.Muo... INFO IncludeCtbBis 0 -GeoModelSvc.Muo... INFO ControlAlines 111111 -GeoModelSvc.Muo... INFO MinimalGeoFlag 0 -GeoModelSvc.Muo... INFO EnableCscIntAlignment 1 -GeoModelSvc.Muo... INFO EnableCscIntAlignmentFromGM 0 -GeoModelSvc.Muo... INFO ControlCscIntAlines 111111 -GeoModelSvc.Muo... INFO EnableMdtDeformations 1 -GeoModelSvc.Muo... INFO EnableMdtAsBuiltParameters 1 -MuGM:MuonFactory INFO MuonLayout set to <R.08.01> = Development version for DC3 - infrastructures -MuGM:MuonFactory INFO BOG cutouts are activated 1 , all other cutouts are disabled 1 -MuGM:MuonFactory INFO Manager created for geometry version R.08.01 from DB MuonVersion <MuonSpectrometer-R.08.01> -MuonGeoModel.MYSQL INFO GeometryVersion set to <R.08.01> -MuGM:MuonFactory INFO Mysql helper class created here for geometry version R.08.01 from DB MuonVersion <MuonSpectrometer-R.08.01> -MuGM:MuonFactory INFO MDTIDHELPER retrieved from DetStore -EventPersistenc... INFO Added successfully Conversion service:ByteStreamCnvSvc -EventPersistenc... INFO Added successfully Conversion service:DetDescrCnvSvc -MDT_IDDetDescrCnv INFO in createObj: creating a MdtIdHelper object in the detector store -IdDictDetDescrCnv INFO in initialize -IdDictDetDescrCnv INFO in createObj: creating a IdDictManager object in the detector store -IdDictDetDescrCnv INFO IdDictName: IdDictParser/ATLAS_IDS.xml -IdDictDetDescrCnv INFO Reading InnerDetector IdDict file InDetIdDictFiles/IdDictInnerDetector_IBL3D25-03.xml -IdDictDetDescrCnv INFO Reading LArCalorimeter IdDict file IdDictParser/IdDictLArCalorimeter_DC3-05-Comm-01.xml -IdDictDetDescrCnv INFO Reading TileCalorimeter IdDict file IdDictParser/IdDictTileCalorimeter.xml -IdDictDetDescrCnv INFO Reading Calorimeter IdDict file IdDictParser/IdDictCalorimeter_L1Onl.xml -IdDictDetDescrCnv INFO Reading MuonSpectrometer IdDict file IdDictParser/IdDictMuonSpectrometer_R.03.xml -IdDictDetDescrCnv INFO Reading ForwardDetectors IdDict file IdDictParser/IdDictForwardDetectors_2010.xml -IdDictDetDescrCnv INFO Found id dicts: -IdDictDetDescrCnv INFO Using dictionary tag: null -IdDictDetDescrCnv INFO Dictionary ATLAS version default DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary Calorimeter version default DetDescr tag CaloIdentifier-LVL1-02 file IdDictParser/IdDictCalorimeter_L1Onl.xml -IdDictDetDescrCnv INFO Dictionary ForwardDetectors version default DetDescr tag ForDetIdentifier-01 file IdDictParser/IdDictForwardDetectors_2010.xml -IdDictDetDescrCnv INFO Dictionary InnerDetector version IBL-DBM DetDescr tag InDetIdentifier-IBL3D25-02 file InDetIdDictFiles/IdDictInnerDetector_IBL3D25-03.xml -IdDictDetDescrCnv INFO Dictionary LArCalorimeter version fullAtlas DetDescr tag LArIdentifier-DC3-05-Comm file IdDictParser/IdDictLArCalorimeter_DC3-05-Comm-01.xml -IdDictDetDescrCnv INFO Dictionary LArElectrode version fullAtlas DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary LArHighVoltage version fullAtlas DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary MuonSpectrometer version R.03 DetDescr tag MuonIdentifier-08 file IdDictParser/IdDictMuonSpectrometer_R.03.xml -IdDictDetDescrCnv INFO Dictionary TileCalorimeter version fullAtlasAndTestBeam DetDescr tag TileIdentifier-00 file IdDictParser/IdDictTileCalorimeter.xml -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MdtIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 210 -MdtIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 241 -MdtIdHelper INFO MultiRange built successfully to tube: MultiRange size is 241 -MdtIdHelper INFO Initializing MDT hash indices ... -MdtIdHelper INFO The element hash max is 1188 -MdtIdHelper INFO The detector element hash max is 2328 -MdtIdHelper INFO Initializing MDT hash indices for finding neighbors ... -MuGM:MuonFactory INFO RPCIDHELPER retrieved from DetStore -RPC_IDDetDescrCnv INFO in createObj: creating a RpcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -RpcIdHelper INFO MultiRange built successfully to doubletR: MultiRange size is 241 -RpcIdHelper INFO MultiRange built successfully to detectorElement: DetectorElement MultiRange size is 241 -RpcIdHelper INFO MultiRange built successfully to rpcStrip: MultiRange size is 241 -RpcIdHelper INFO Initializing RPC hash indices ... -RpcIdHelper INFO The element hash max is 600 -RpcIdHelper INFO The detector element hash max is 1122 -RpcIdHelper INFO Initializing RPC hash indices for finding neighbors ... -MuGM:MuonFactory INFO TGCIDHELPER retrieved from DetStore -TGC_IDDetDescrCnv INFO in createObj: creating a TgcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -TgcIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 210 -TgcIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 210 -TgcIdHelper INFO MultiRange built successfully to channel: MultiRange size is 241 -TgcIdHelper INFO Initializing TGC hash indices ... -TgcIdHelper INFO The element hash max is 1578 -TgcIdHelper INFO The detector element hash max is 1578 -TgcIdHelper INFO Initializing TGC hash indices for finding neighbors ... -MuGM:MuonFactory INFO CSCIDHELPER retrieved from DetStore -CSC_IDDetDescrCnv INFO in createObj: creating a CcscIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -CscIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 210 -CscIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 237 -CscIdHelper INFO MultiRange built successfully to cscStrip: MultiRange size is 241 -CscIdHelper INFO Initializing CSC hash indices ... -CscIdHelper INFO The element hash max is 32 -CscIdHelper INFO The detector element hash max is 64 -CscIdHelper INFO The channel hash max is 61440 -CscIdHelper INFO Initializing CSC hash indices for finding neighbors ... -MuGM:MuonFactory INFO **************** MuonDetectorFactory001 ************************ -MuGM:MuonFactory INFO *** Start building the Muon Geometry Tree ********************** -MuGM:RDBReadAtlas INFO Start retriving dbObjects with tag = <ATLAS-R2-2016-01-00-01> node <ATLAS> -RDBAccessSvc WARNING Could not get the tag for XtomoData node. Returning 0 pointer to IRDBQuery -MuGM:RDBReadAtlas INFO After getQuery XtomoData -In DblQ00Xtomo(data) -No XtomoData table in the MuonDD Database -MuGM:RDBReadAtlas INFO After new DblQ00Xtomo -MuGM:RDBReadAtlas INFO After m_dhxtomo.data() -MuGM:RDBReadAtlas INFO No Ascii aszt input found: looking for A-lines in ORACLE -MuGM:RDBReadAtlas INFO ASZT table found in Oracle -MuGM:RDBReadAtlas INFO ASZT size is 32 -MuGM:RDBReadAtlas INFO No Ascii iacsc input found: looking for A-lines in ORACLE -RDBAccessSvc WARNING Could not get the tag for ISZT node. Returning 0 pointer to IRDBQuery -MuGM:RDBReadAtlas INFO No ISZT table in Oracle -MuGM:RDBReadAtlas INFO Access granted for all dbObjects needed by muon detectors -MuonGeoModel.MYSQL INFO LayoutName (from DBAM) set to <R.08> -- relevant for CTB2004 -MuGM:ProcStations INFO Processing Stations and Components -MuGM:ProcStations INFO Processing Stations and Components DONE -MuGM:ProcTechnol.s INFO nMDT 13 nCSC 2 nTGC 22 nRPC 25 -MuGM:ProcTechnol.s INFO nDED 2 nSUP 4 nSPA 2 -MuGM:ProcTechnol.s INFO nCHV 7 nCRO 7 nCMI 6 nLBI 6 -MuGM:ProcPosition INFO *** N. of stations positioned in the setup 234 -MuGM:ProcPosition INFO *** N. of stations described in mysql 234 -MuGM:ProcPosition INFO *** N. of types 32 size of jtypvec 32 -MuGM:ProcPosition INFO *** : 234 kinds of stations (type*sub_type) -MuGM:ProcPosition INFO *** : 1758 physical stations in space - according to the MuonDD DataBase -MuGM:ProcCutouts INFO Processing Cutouts for geometry layout R.08 -MuGM:ProcCutouts INFO Processing Cutouts DONE -MuGM:RDBReadAtlas INFO ProcessTGCreadout - version 7 wirespacing 1.8 -MuGM:RDBReadAtlas INFO Intermediate Objects built from primary numbers -MuGM:MuonFactory INFO theMaterialManager retrieven successfully from the DetStore -MuGM:MuonFactory INFO MuonSystem description from OracleTag=<ATLAS-R2-2016-01-00-01> and node=<ATLAS> -MuGM:MuonFactory INFO TreeTop added to the Manager -MuGM:MuonFactory INFO Muon Layout R.08.01 -MuGM:MuonFactory INFO Fine Clash Fixing disabled: (should be ON/OFF for Simulation/Reconstruction) -MuGM:MuonFactory INFO **************** MuonDetectorFactory001 **************************** -MuGM:MuonFactory INFO *** The Muon Chamber Geometry Tree is built with -MuGM:MuonFactory INFO *** 1758 child volumes -MuGM:MuonFactory INFO *** 1839 independent elements and -MuGM:MuonFactory INFO *** 11473 elements cloned or shared -MuGM:MuonFactory INFO *** 234 kinds of stations -MuGM:MuonFactory INFO *** 1758 stations with alignable transforms -MuGM:MuonFactory INFO *** 148 stations are described as Assemblies -MuGM:MuonFactory INFO *** 1758 MuonStations -MuGM:MuonFactory INFO *** 2324 MDT Readout Elements 1186 MDT Detector Elements -MuGM:MuonFactory INFO *** 32 CSC Readout Elements 32 CSC Detector Elements -MuGM:MuonFactory INFO *** 1122 RPC Readout Elements 600 RPC Detector Elements -MuGM:MuonFactory INFO *** 1578 TGC Readout Elements 1578 TGC Detector Elements -MuGM:MuonFactory INFO ******************************************************************** -MuGM:MuonFactory INFO *** Inert Material built according to DB switches and config. ****** -MuGM:MuonFactory INFO *** The Muon Geometry Tree has 1758 child vol.s in total ******** -MuGM:MuonFactory INFO ******************************************************************** - -MGM::MuonDetect... INFO Init A/B Line Containers - done - size is respectively 1758/0 -MGM::MuonDetect... INFO Init of CSC I-Lines will be done via Conditions DB -MGM::MuonDetect... INFO Init I-Line Container - done - size is respectively 128 -MGM::MuonDetect... INFO I-Line for CSC wire layers loaded (Csc Internal Alignment) -MGM::MuonDetect... INFO According to configuration they WILL be used -MGM::MuonDetect... INFO Filling cache -GeoModelSvc INFO GeoModelSvc.MuonDetectorTool SZ= 228572Kb Time = 1.66S -ClassIDSvc INFO getRegistryEntries: read 3099 CLIDRegistry entries for module ALL -AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 -ClassIDSvc INFO getRegistryEntries: read 839 CLIDRegistry entries for module ALL -ClassIDSvc INFO getRegistryEntries: read 422 CLIDRegistry entries for module ALL -ClassIDSvc INFO getRegistryEntries: read 305 CLIDRegistry entries for module ALL -ClassIDSvc INFO getRegistryEntries: read 291 CLIDRegistry entries for module ALL -CondInputLoader INFO Initializing CondInputLoader... -CondInputLoader INFO Adding base classes: - + ( 'CondAttrListCollection' , 'ConditionStore+/CSC/FTHOLD' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/CSC/NOISE' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/CSC/PED' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/CSC/PSLOPE' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/CSC/RMS' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/CSC/STAT' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/CSC/T0BASE' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/CSC/T0PHASE' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/EXT/DCS/MAGNETS/SENSORDATA' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/GLOBAL/BField/Maps' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/MDT/CABLING/MAP_SCHEMA' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/MDT/CABLING/MEZZANINE_SCHEMA' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/MDT/RTBLOB' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/MDT/T0BLOB' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/CSC/ILINES' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/ASBUILTPARAMS' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/BARREL' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/ENDCAP/SIDEA' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/ENDCAP/SIDEC' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/TGC/SIDEA' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/TGC/SIDEC' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/RPC/CABLING/MAP_SCHEMA' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/RPC/CABLING/MAP_SCHEMA_CORR' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/RPC/DCS/DeadRopanels' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/RPC/DCS/OffRopanels' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/RPC/DQMF/ELEMENT_STATUS' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/RPC/TRIGGER/CM_THR_ETA' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/RPC/TRIGGER/CM_THR_PHI' ) -> -CondInputLoader INFO Will create WriteCondHandle dependencies for the following DataObjects: - + ( 'CondAttrListCollection' , 'ConditionStore+/CSC/FTHOLD' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/CSC/NOISE' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/CSC/PED' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/CSC/PSLOPE' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/CSC/RMS' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/CSC/STAT' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/CSC/T0BASE' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/CSC/T0PHASE' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/EXT/DCS/MAGNETS/SENSORDATA' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/GLOBAL/BField/Maps' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/MDT/CABLING/MAP_SCHEMA' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/MDT/CABLING/MEZZANINE_SCHEMA' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/MDT/RTBLOB' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/MDT/T0BLOB' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/CSC/ILINES' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/ASBUILTPARAMS' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/BARREL' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/ENDCAP/SIDEA' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/ENDCAP/SIDEC' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/TGC/SIDEA' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/TGC/SIDEC' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/RPC/CABLING/MAP_SCHEMA' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/RPC/CABLING/MAP_SCHEMA_CORR' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/RPC/DCS/DeadRopanels' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/RPC/DCS/OffRopanels' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/RPC/DQMF/ELEMENT_STATUS' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/RPC/TRIGGER/CM_THR_ETA' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/RPC/TRIGGER/CM_THR_PHI' ) -MuonAlignmentCo... INFO Initilalizing -MuonAlignmentCo... INFO In initialize ---- # of folders registered is 7 -MuonAlignmentCo... INFO geometry version from the MuonDetectorManager = R.08.01 -MuonDetectorCon... INFO Initializing ... -AtlasFieldMapCo... INFO Initialize -AtlasFieldMapCo... INFO Initialize: Key ( 'AtlasFieldMapCondObj' , 'ConditionStore+fieldMapCondObj' ) has been succesfully registered -AtlasFieldMapCo... INFO Initialize: Will update the field map from conditions -AtlasFieldCache... INFO Initialize -AtlasFieldCache... INFO Initialize: Key ( 'AtlasFieldCacheCondObj' , 'ConditionStore+fieldCondObj' ) has been succesfully registered -AtlasFieldCache... INFO Initialize: Will update current from conditions -AtlasFieldCache... INFO Initialize: useDCS, useSoleCurrent, useToroCurrent. 1, 'UseSoleCurrent':7730.0000, 'UseToroCurrent':20400.000 LockMapCurrents 0 -ClassIDSvc INFO getRegistryEntries: read 7927 CLIDRegistry entries for module ALL -ClassIDSvc INFO getRegistryEntries: read 1043 CLIDRegistry entries for module ALL RpcRawDataProvider INFO RpcRawDataProvider::initialize RpcRawDataProvider INFO 'DoSeededDecoding':False -ClassIDSvc INFO getRegistryEntries: read 2156 CLIDRegistry entries for module ALL -ROBDataProviderSvc INFO Initializing ROBDataProviderSvc - package version ByteStreamCnvSvcBase-00-00-00 -ROBDataProviderSvc INFO ---> Filter out empty ROB fragments = 'filterEmptyROB':False -ROBDataProviderSvc INFO ---> Filter out specific ROBs by Status Code: # ROBs = 0 -ROBDataProviderSvc INFO ---> Filter out Sub Detector ROBs by Status Code: # Sub Detectors = 0 RpcRawDataProvi... INFO initialize() successful in RpcRawDataProvider.RPC_RawDataProviderToolMT TgcRawDataProvider INFO TgcRawDataProvider::initialize TgcRawDataProvider INFO 'DoSeededDecoding':False -ClassIDSvc INFO getRegistryEntries: read 1223 CLIDRegistry entries for module ALL TgcRawDataProvi... INFO initialize() successful in TgcRawDataProvider.TGC_RawDataProviderToolMT.TgcROD_Decoder -MuonTGC_CablingSvc INFO for 1/12 sector initialize -ToolSvc.TGCCabl... INFO initialize -ToolSvc.TGCCabl... INFO readTGCMap from text -ToolSvc.TGCCabl... INFO readTGCMap found file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-06-02T2139/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/ASD2PP_diff_12_ONL.db -ToolSvc.TGCCabl... INFO giveASD2PP_DIFF_12 (m_ASD2PP_DIFF_12 is not NULL) TgcRawDataProvi... INFO initialize() successful in TgcRawDataProvider.TGC_RawDataProviderToolMT MdtRawDataProvider INFO MdtRawDataProvider::initialize MdtRawDataProvider INFO 'DoSeededDecoding':False -ClassIDSvc INFO getRegistryEntries: read 1376 CLIDRegistry entries for module ALL MdtRawDataProvi... INFO Retrieved service ServiceHandle('ROBDataProviderSvc') MdtRawDataProvi... INFO Processing configuration for layouts with BME chambers. MdtRawDataProvi... INFO Processing configuration for layouts with BMG chambers. MdtRawDataProvi... INFO Retrieved tool Decoder = PrivateToolHandle('MdtROD_Decoder/MdtROD_Decoder') MdtRawDataProvi... INFO initialize() successful in MdtRawDataProvider.MDT_RawDataProviderToolMT -ClassIDSvc INFO getRegistryEntries: read 1048 CLIDRegistry entries for module ALL CscRawDataProvi... INFO Retrieved service ServiceHandle('ROBDataProviderSvc') CscRawDataProvi... INFO Retrieved tool Decoder = PrivateToolHandle('Muon::CscROD_Decoder/CscROD_Decoder') CscRawDataProvi... INFO The Muon Geometry version is R.08.01 CscRawDataProvi... INFO initialize() successful in CscRawDataProvider.CSC_RawDataProviderToolMT -ClassIDSvc INFO getRegistryEntries: read 53 CLIDRegistry entries for module ALL -RpcRdoToRpcPrep... INFO package version = MuonRPC_CnvTools-00-00-00 RpcRdoToRpcPrep... INFO properties are RpcRdoToRpcPrep... INFO produceRpcCoinDatafromTriggerWords 1 RpcRdoToRpcPrep... INFO reduceCablingOverlap 1 @@ -551,21 +24,6 @@ RpcRdoToRpcPrep... INFO timeShift -12.5 RpcRdoToRpcPrep... INFO etaphi_coincidenceTime 20 RpcRdoToRpcPrep... INFO overlap_timeTolerance 10 RpcRdoToRpcPrep... INFO Correct prd time from cool db 0 -MuonRPC_CablingSvc INFO Initializing MuonRPC_CablingSvc - package version MuonRPC_Cabling-00-00-00 -ToolSvc.RPCCabl... INFO Initializing - folders names are: conf /RPC/CABLING/MAP_SCHEMA / corr /RPC/CABLING/MAP_SCHEMA_CORR -MuonRPC_CablingSvc INFO RPCCablingDbTool retrieved with handle TheRpcCablingDbTool = PublicToolHandle('RPCCablingDbTool/RPCCablingDbTool') -MuonRPC_CablingSvc INFO Register call-back against 2 folders listed below -MuonRPC_CablingSvc INFO Folder n. 1 </RPC/CABLING/MAP_SCHEMA> found in the DetStore -ClassIDSvc INFO getRegistryEntries: read 239 CLIDRegistry entries for module ALL -MuonRPC_CablingSvc INFO initMappingModel registered for call-back against folder </RPC/CABLING/MAP_SCHEMA> -MuonRPC_CablingSvc INFO Folder n. 2 </RPC/CABLING/MAP_SCHEMA_CORR> found in the DetStore -MuonRPC_CablingSvc INFO initMappingModel registered for call-back against folder </RPC/CABLING/MAP_SCHEMA_CORR> -MuonRPC_CablingSvc INFO RPCTriggerDbTool retrieved with statusCode = SUCCESS pointer = TheRpcTriggerDbTool = PublicToolHandle('RPCTriggerDbTool') -MuonRPC_CablingSvc INFO Register call-back against 2 folders listed below -MuonRPC_CablingSvc INFO Folder n. 1 </RPC/TRIGGER/CM_THR_ETA> found in the DetStore -MuonRPC_CablingSvc INFO initTrigRoadsModel registered for call-back against folder </RPC/TRIGGER/CM_THR_ETA> -MuonRPC_CablingSvc INFO Folder n. 2 </RPC/TRIGGER/CM_THR_PHI> found in the DetStore -MuonRPC_CablingSvc INFO initTrigRoadsModel registered for call-back against folder </RPC/TRIGGER/CM_THR_PHI> RpcRdoToRpcPrep... INFO Retrieved DecodingTool = PrivateToolHandle('Muon::RpcRdoToPrepDataToolMT/RpcRdoToRpcPrepDataTool') TgcRdoToTgcPrep... INFO initialize() successful in TgcRdoToTgcPrepData.TgcRdoToTgcPrepDataTool TgcRdoToTgcPrep... INFO Retrieved DecodingTool = PrivateToolHandle('Muon::TgcRdoToPrepDataToolMT/TgcRdoToTgcPrepDataTool') @@ -573,482 +31,8 @@ MdtRdoToMdtPrep... INFO Processing configuration for layouts with BMG chambers MdtRdoToMdtPrep... INFO Processing configuration for layouts with BME chambers. MdtRdoToMdtPrep... INFO Processing configuration for layouts with BMG chambers. MdtRdoToMdtPrep... INFO Retrieved DecodingTool = PrivateToolHandle('Muon::MdtRdoToPrepDataToolMT/MdtRdoToMdtPrepDataTool') -ClassIDSvc INFO getRegistryEntries: read 166 CLIDRegistry entries for module ALL -MdtRdoToMdtPrep...WARNING Lookup table will not be initialised MdtRdoToMdtPrepData.RegSelTool_MDT key 'ConditionStore+Tool_Not_Initalised' CscRdoToCscPrep... INFO The Geometry version is MuonSpectrometer-R.08.01 -ClassIDSvc INFO getRegistryEntries: read 114 CLIDRegistry entries for module ALL CscRdoToCscPrep... INFO Retrieved CscRdoToCscPrepDataTool = PrivateToolHandle('Muon::CscRdoToCscPrepDataToolMT/CscRdoToCscPrepDataTool') -EventSelector WARNING InputCollections not properly set, checking EventStorageInputSvc properties -EventSelector INFO reinitialization... -ClassIDSvc INFO getRegistryEntries: read 440 CLIDRegistry entries for module ALL -EventSelector INFO Retrieved InputCollections from InputSvc -ByteStreamInputSvc INFO Initializing ByteStreamInputSvc - package version ByteStreamCnvSvc-00-00-00 -EventSelector INFO reinitialization... -AthenaEventLoopMgr INFO Setup EventSelector service EventSelector -ApplicationMgr INFO Application Manager Initialized successfully -ApplicationMgr SUCCESS ****************************** Algorithm Sequence **************************** -ApplicationMgr SUCCESS AthSequencer/AthMasterSeq -ApplicationMgr SUCCESS AthSequencer/AthAlgEvtSeq -ApplicationMgr SUCCESS AthSequencer/AthBeginSeq -ApplicationMgr SUCCESS AthIncFirerAlg/BeginIncFiringAlg -ApplicationMgr SUCCESS IncidentProcAlg/IncidentProcAlg1 -ApplicationMgr SUCCESS AthSequencer/AthAllAlgSeq -ApplicationMgr SUCCESS AthSequencer/AthCondSeq -ApplicationMgr SUCCESS CondInputLoader/CondInputLoader -ApplicationMgr SUCCESS MuonAlignmentCondAlg/MuonAlignmentCondAlg -ApplicationMgr SUCCESS MuonDetectorCondAlg/MuonDetectorCondAlg -ApplicationMgr SUCCESS RpcCablingCondAlg/RpcCablingCondAlg -ApplicationMgr SUCCESS MuonMDT_CablingAlg/MuonMDT_CablingAlg -ApplicationMgr SUCCESS MagField::AtlasFieldMapCondAlg/AtlasFieldMapCondAlg -ApplicationMgr SUCCESS MagField::AtlasFieldCacheCondAlg/AtlasFieldCacheCondAlg -ApplicationMgr SUCCESS RpcCondDbAlg/RpcCondDbAlg -ApplicationMgr SUCCESS MdtCalibDbAlg/MdtCalibDbAlg -ApplicationMgr SUCCESS CscCondDbAlg/CscCondDbAlg -ApplicationMgr SUCCESS AthSequencer/AthAlgSeq -ApplicationMgr SUCCESS Muon::RpcRawDataProvider/RpcRawDataProvider -ApplicationMgr SUCCESS Muon::TgcRawDataProvider/TgcRawDataProvider -ApplicationMgr SUCCESS Muon::MdtRawDataProvider/MdtRawDataProvider -ApplicationMgr SUCCESS Muon::CscRawDataProvider/CscRawDataProvider -ApplicationMgr SUCCESS RpcRdoToRpcPrepData/RpcRdoToRpcPrepData -ApplicationMgr SUCCESS TgcRdoToTgcPrepData/TgcRdoToTgcPrepData -ApplicationMgr SUCCESS MdtRdoToMdtPrepData/MdtRdoToMdtPrepData -ApplicationMgr SUCCESS CscRdoToCscPrepData/CscRdoToCscPrepData -ApplicationMgr SUCCESS CscThresholdClusterBuilder/CscThresholdClusterBuilder -ApplicationMgr SUCCESS AthSequencer/AthEndSeq -ApplicationMgr SUCCESS AthIncFirerAlg/EndIncFiringAlg -ApplicationMgr SUCCESS IncidentProcAlg/IncidentProcAlg2 -ApplicationMgr SUCCESS AthSequencer/AthOutSeq -ApplicationMgr SUCCESS AthSequencer/AthRegSeq -ApplicationMgr SUCCESS ****************************************************************************** -ByteStreamInputSvc INFO Picked valid file: /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1 -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/CSC/FTHOLD' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/CSC/NOISE' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/CSC/PED' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/CSC/PSLOPE' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/CSC/RMS' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/CSC/STAT' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/CSC/T0BASE' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/CSC/T0PHASE' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/EXT/DCS/MAGNETS/SENSORDATA' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/GLOBAL/BField/Maps' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/MDT/CABLING/MAP_SCHEMA' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/MDT/CABLING/MEZZANINE_SCHEMA' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/MDT/RTBLOB' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/MDT/T0BLOB' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/MUONALIGN/CSC/ILINES' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/MUONALIGN/MDT/ASBUILTPARAMS' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/MUONALIGN/MDT/BARREL' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/MUONALIGN/MDT/ENDCAP/SIDEA' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/MUONALIGN/MDT/ENDCAP/SIDEC' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/MUONALIGN/TGC/SIDEA' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/MUONALIGN/TGC/SIDEC' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/RPC/CABLING/MAP_SCHEMA' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/RPC/CABLING/MAP_SCHEMA_CORR' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/RPC/DCS/DeadRopanels' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/RPC/DCS/OffRopanels' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/RPC/DQMF/ELEMENT_STATUS' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/RPC/TRIGGER/CM_THR_ETA' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/RPC/TRIGGER/CM_THR_PHI' -ApplicationMgr INFO Application Manager Started successfully -EventInfoByteSt... INFO IsSimulation : 0 -EventInfoByteSt... INFO IsTestbeam : 0 -EventInfoByteSt... INFO IsCalibration : 0 -AthenaEventLoopMgr INFO ===>>> start of run 327265 <<<=== -EventPersistenc... INFO Added successfully Conversion service:TagInfoMgr -IOVDbSvc INFO Opening COOL connection for COOLONL_RPC/CONDBR2 -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to RPCCablingMapSchema_2016_2017_01 for folder /RPC/CABLING/MAP_SCHEMA -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to RPCCablingMapSchemaCorr_2016_2017_01 for folder /RPC/CABLING/MAP_SCHEMA_CORR -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to RPCTriggerCMThrEta_RUN1-RUN2-HI-02 for folder /RPC/TRIGGER/CM_THR_ETA -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to RPCTriggerCMThrPhi_RUN1-RUN2-HI-02 for folder /RPC/TRIGGER/CM_THR_PHI -IOVDbSvc INFO Disconnecting from COOLONL_RPC/CONDBR2 -EventPersistenc... INFO Added successfully Conversion service:AthenaPoolCnvSvc -MuonRPC_CablingSvc INFO initMappingModel has been called -MuonRPC_CablingSvc INFO ToolHandle in initMappingModel - <TheRpcCablingDbTool = PublicToolHandle('RPCCablingDbTool/RPCCablingDbTool')> -MuonRPC_CablingSvc INFO Retrieving cabling singleton; to create an empty one or to get the existing one -RPCcabling INFO CablingRPC---singleton constructor ---- this must be executed just once -RPCcabling INFO CablingRPC---The singleton will fill the maps from the COOL streams -RPCcabling INFO CablingRPC---InitMaps from COOL cannot be executed NOW: empty string -RPCcabling INFO CablingRPC---The singleton is created here -RPCcabling INFO CablingRPC--- cacheCleared: s_status = 0 -MuonRPC_CablingSvc INFO Cabling singleton cache has been cleared -MuonRPC_CablingSvc INFO Trigger roads will be loaded from COOL -ToolSvc.RPCCabl... INFO LoadParameters /RPC/CABLING/MAP_SCHEMA I=2 -ToolSvc.RPCCabl... INFO loadRPCMap --- Load Map from DB -ToolSvc.RPCCabl... INFO Try to read from folder </RPC/CABLING/MAP_SCHEMA> -ToolSvc.RPCCabl... INFO CondAttrListCollection from DB folder have been obtained with size 1 -ToolSvc.RPCCabl... INFO After Reading folder, Configuration string size is 222202 -ToolSvc.RPCCabl... INFO LoadParameters /RPC/CABLING/MAP_SCHEMA_CORR I=2 -ToolSvc.RPCCabl... INFO loadRPCCorr --- Load Corrections from DB -ToolSvc.RPCCabl... INFO Try to read from folder </RPC/CABLING/MAP_SCHEMA_CORR> -ToolSvc.RPCCabl... INFO CondAttrListCollection from DB folder have been obtained with size 1 -ToolSvc.RPCCabl... INFO After Reading folder, Correction string size is 29369 -MuonRPC_CablingSvc INFO InitMappingModel: Trigger roads not yet loaded from COOL - postpone cabling initialization -MuonRPC_CablingSvc INFO initTrigRoadsModel has been called -MuonRPC_CablingSvc INFO Trigger roads will be loaded from COOL -MuonRPC_CablingSvc INFO Retrieve the pointer to the cabling singleton -RPCcabling INFO CablingRPC--- cacheCleared: s_status = 0 -MuonRPC_CablingSvc INFO Cabling singleton cache has been cleared -ToolSvc.RPCTrig... INFO LoadParameters /RPC/TRIGGER/CM_THR_ETA I=2 -ToolSvc.RPCTrig... INFO LoadParameters /RPC/TRIGGER/CM_THR_PHI I=2 -MuonRPC_CablingSvc INFO ======== RPC Trigger Roads from COOL - Header infos ======== -MuonRPC_CablingSvc INFO -RPC LVL1 Configuration 10.6 with roads from Feb 2012 -L1 THRESHOLDS: MU4 MU6 MU10 MU11 MU15 MU20 -Road version: "road_files_120209" -CMA th0 th1 th2 -eta low-pt mu4 mu6 mu10 -phi low-pt mu4 mu6 mu10 -eta high-pt mu11 mu15 mu20 -phi high-pt mu11 mu15 mu15 - - -RPCcabling INFO CablingRPC---InitMaps from COOL: going to read configuration -RPCcabling INFO CablingRPC--->> RPC cabling map from COOL << -RPCcabling INFO CablingRPC--- ReadConf: map has size 222202 -RPCcabling INFO CablingRPC--- ReadConf: map n. of lines read is 924 -RPCcabling INFO CablingRPC--- ReadConf: version is 5.0 Atlas R_07_03_RUN2ver104 -RPCcabling INFO CablingRPC--- buildRDOmap -RPCcabling INFO CablingRPC---InitMaps from COOL: going to read corrections to configuration -RPCcabling INFO CablingRPC--->> RPC cabling corrections from COOL << -RPCcabling INFO CablingRPC--- ReadCorr: CorrMap has size 29369 -RPCcabling INFO CablingRPC--- ReadConf: CorrMap n. of lines read is 743 -RPCcabling INFO CablingRPC---InitMaps from COOL - maps have been parsed -MuonRPC_CablingSvc INFO InitTrigRoadsModel: RPC cabling model is loaded! -Level-1 configuration database version 5.0 Atlas R_07_03_RUN2ver104 read. -Contains 26 Trigger Sector Types: -negative sectors 0 - 15 ==> 18 2 24 3 19 2 24 4 20 2 24 1 18 5 25 6 -negative sectors 16 - 31 ==> 21 13 26 6 21 7 16 8 14 7 16 6 21 13 26 1 -positive sectors 32 - 47 ==> 9 24 2 22 9 24 2 23 10 24 2 18 1 25 5 18 -positive sectors 48 - 63 ==> 1 26 13 21 6 17 12 15 11 17 12 21 6 26 13 22 - -MuonRPC_CablingSvc INFO buildOfflineOnlineMap -MuonRPC_CablingSvc INFO Applying FeetPadThresholds : 0,2,5 -MuonRPC_CablingSvc INFO MuonRPC_CablingSvc initialized succesfully -AthenaEventLoopMgr INFO ===>>> start processing event #186525031, run #327265 0 events processed so far <<<=== -IOVDbSvc INFO Opening COOL connection for COOLOFL_CSC/CONDBR2 -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to CscFthold-RUN2-BLK-UPD1-007-00 for folder /CSC/FTHOLD -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to CscNoise-RUN2-BLK-UPD1-007-00 for folder /CSC/NOISE -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to CscPed-RUN2-BLK-UPD1-007-00 for folder /CSC/PED -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to CscPslope-RUN2-BLK-UPD1-000-00 for folder /CSC/PSLOPE -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to CscRms-RUN2-BLK-UPD1-003-00 for folder /CSC/RMS -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to CscStat-RUN2-BLK-UPD1-008-00 for folder /CSC/STAT -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to CscT0base-RUN2-BLK-UPD1-001-00 for folder /CSC/T0BASE -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to CscT0phase-RUN2-BLK-UPD2-001-00 for folder /CSC/T0PHASE -IOVDbSvc INFO Disconnecting from COOLOFL_CSC/CONDBR2 -IOVDbSvc INFO Opening COOL connection for COOLOFL_DCS/CONDBR2 -IOVDbSvc INFO Disconnecting from COOLOFL_DCS/CONDBR2 -IOVDbSvc INFO Opening COOL connection for COOLONL_GLOBAL/CONDBR2 -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to BFieldMap-Run1-14m-v01 for folder /GLOBAL/BField/Maps -IOVDbSvc INFO Disconnecting from COOLONL_GLOBAL/CONDBR2 -IOVDbSvc INFO Opening COOL connection for COOLONL_MDT/CONDBR2 -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to MDTCablingMapSchema_BMG_01 for folder /MDT/CABLING/MAP_SCHEMA -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to MDTCablingMezzanineSchema_M5-RUN2 for folder /MDT/CABLING/MEZZANINE_SCHEMA -IOVDbSvc INFO Disconnecting from COOLONL_MDT/CONDBR2 -IOVDbSvc INFO Opening COOL connection for COOLOFL_MDT/CONDBR2 -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to MDTRT-RUN2-UPD4-21 for folder /MDT/RTBLOB -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to MDTT0-RUN2-UPD4-21 for folder /MDT/T0BLOB -IOVDbSvc INFO Disconnecting from COOLOFL_MDT/CONDBR2 -IOVDbSvc INFO Opening COOL connection for COOLOFL_MUONALIGN/CONDBR2 -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to MuonAlignCscIlines-UPD1-02 for folder /MUONALIGN/CSC/ILINES -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to MuonAlignMdtAsbuiltparams-RUN2-BA_ONLY-UPD4-00 for folder /MUONALIGN/MDT/ASBUILTPARAMS -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to MuonAlignMDTBarrelAlign-RUN2-BA_ROLLING_11-BLKP-UPD4-00 for folder /MUONALIGN/MDT/BARREL -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to MuonAlignMDTEndCapAAlign-RUN2-ECA_ROLLING_2015_03_01-UPD4-02 for folder /MUONALIGN/MDT/ENDCAP/SIDEA -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to MuonAlignMDTEndCapCAlign-RUN2-ECC_ROLLING_2015_03_01-UPD4-02 for folder /MUONALIGN/MDT/ENDCAP/SIDEC -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to MuonAlignTGCEndCapAAlign-RUN2-TGCA_ROLLING_2011_01-ES1-UPD1-03 for folder /MUONALIGN/TGC/SIDEA -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to MuonAlignTGCEndCapCAlign-RUN2-TGCC_ROLLING_2011_01-ES1-UPD1-03 for folder /MUONALIGN/TGC/SIDEC -IOVDbSvc INFO Disconnecting from COOLOFL_MUONALIGN/CONDBR2 -IOVDbSvc INFO Opening COOL connection for COOLOFL_RPC/CONDBR2 -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to RPCDQMFElementStatus_Run1_UPD4-RUN2-01 for folder /RPC/DQMF/ELEMENT_STATUS -IOVDbSvc INFO Disconnecting from COOLOFL_RPC/CONDBR2 -MuonAlignmentCo... INFO Load alignment parameters from DB folder </MUONALIGN/CSC/ILINES> -MuonAlignmentCo... INFO Size of CSC/ILINES CondAttrListCollection ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/CSC/ILINES' ) readCscILinesCdo->size()= 1 -MuonAlignmentCo... INFO Range of CSC/ILINES input is {[0,0,t:1425168000] - [t:4294967294.854775807]} -MGM::MuonDetect... INFO temporary CSC I-line container with size = 128 -MGM::MuonDetect... INFO # of CSC I-lines read from the ILineMapContainer in StoreGate is 128 -MGM::MuonDetect... INFO # of deltaTransforms updated according to A-lines is 128 -MGM::MuonDetect... INFO # of entries in the CSC I-lines historical container is 128 -MuonAlignmentCo... INFO recorded new CscInternalAlignmentMapContainer with range {[0,0,t:1425168000] - [t:4294967294.854775807]} into Conditions Store -MuonAlignmentCo... INFO Load alignment parameters from DB folder </MUONALIGN/MDT/ASBUILTPARAMS> -MuonAlignmentCo... INFO Size of MDT/ASBUILTPARAMS CondAttrListCollection ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/ASBUILTPARAMS' ) ->size()= 1 -MuonAlignmentCo... INFO Range of MDT/ASBUILTPARAMS input is {[0,0,t:0] - [t:4294967294.854775807]} -MGM::MuonDetect... INFO temporary As-Built container with size = 628 -MGM::MuonDetect... INFO # of MDT As-Built read from the MdtAsBuiltMapContainer in StoreGate is 628 -MGM::MuonDetect... INFO # of deltaTransforms updated according to As-Built is 628 -MGM::MuonDetect... INFO # of entries in the MdtAsBuilt historical container is 628 -MuonAlignmentCo... INFO recorded new MdtAsBuiltMapContainer with range {[0,0,t:0] - [t:4294967294.854775807]} into Conditions Store -MuonAlignmentCo... INFO Load alignment parameters from DB folder </MUONALIGN/MDT/BARREL> -MuonAlignmentCo... INFO Size of /MUONALIGN/MDT/BARREL CondAttrListCollection ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/BARREL' ) readCdo->size()= 1 -MuonAlignmentCo... INFO Range of /MUONALIGN/MDT/BARREL input is, ALines: {[0,0,t:1497851700] - [t:1498737300]} BLines: {[0,0,t:1497851700] - [t:1498737300]} -MuonAlignmentCo... INFO Data read from folder /MUONALIGN/MDT/BARREL have IoV = 195569 -MuonAlignmentCo... INFO A- and B-Lines parameters from DB folder </MUONALIGN/MDT/BARREL> loaded -MuonAlignmentCo... INFO Load alignment parameters from DB folder </MUONALIGN/MDT/ENDCAP/SIDEA> -MuonAlignmentCo... INFO Size of /MUONALIGN/MDT/ENDCAP/SIDEA CondAttrListCollection ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/ENDCAP/SIDEA' ) readCdo->size()= 1 -MuonAlignmentCo... INFO Range of /MUONALIGN/MDT/ENDCAP/SIDEA input is, ALines: {[0,0,t:1497891240] - [t:1497898380]} BLines: {[0,0,t:1497891240] - [t:1497898380]} -MuonAlignmentCo... INFO Data read from folder /MUONALIGN/MDT/ENDCAP/SIDEA have IoV = 195588 -MuonAlignmentCo... INFO A- and B-Lines parameters from DB folder </MUONALIGN/MDT/ENDCAP/SIDEA> loaded -MuonAlignmentCo... INFO Load alignment parameters from DB folder </MUONALIGN/MDT/ENDCAP/SIDEC> -MuonAlignmentCo... INFO Size of /MUONALIGN/MDT/ENDCAP/SIDEC CondAttrListCollection ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/ENDCAP/SIDEC' ) readCdo->size()= 1 -MuonAlignmentCo... INFO Range of /MUONALIGN/MDT/ENDCAP/SIDEC input is, ALines: {[0,0,t:1497892260] - [t:1497899460]} BLines: {[0,0,t:1497892260] - [t:1497899460]} -MuonAlignmentCo... INFO Data read from folder /MUONALIGN/MDT/ENDCAP/SIDEC have IoV = 195599 -MuonAlignmentCo... INFO A- and B-Lines parameters from DB folder </MUONALIGN/MDT/ENDCAP/SIDEC> loaded -MuonAlignmentCo... INFO Load alignment parameters from DB folder </MUONALIGN/TGC/SIDEA> -MuonAlignmentCo... INFO No BLines decoding will be attempted for folder named /MUONALIGN/TGC/SIDEA -MuonAlignmentCo... INFO Size of /MUONALIGN/TGC/SIDEA CondAttrListCollection ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/TGC/SIDEA' ) readCdo->size()= 1 -MuonAlignmentCo... INFO Range of /MUONALIGN/TGC/SIDEA input is, ALines: {[0,0,t:0] - [t:4294967294.854775807]} -MuonAlignmentCo... INFO Data read from folder /MUONALIGN/TGC/SIDEA have IoV = 82360 -MuonAlignmentCo... INFO A- and B-Lines parameters from DB folder </MUONALIGN/TGC/SIDEA> loaded -MuonAlignmentCo... INFO Load alignment parameters from DB folder </MUONALIGN/TGC/SIDEC> -MuonAlignmentCo... INFO No BLines decoding will be attempted for folder named /MUONALIGN/TGC/SIDEC -MuonAlignmentCo... INFO Size of /MUONALIGN/TGC/SIDEC CondAttrListCollection ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/TGC/SIDEC' ) readCdo->size()= 1 -MuonAlignmentCo... INFO Range of /MUONALIGN/TGC/SIDEC input is, ALines: {[0,0,t:0] - [t:4294967294.854775807]} -MuonAlignmentCo... INFO Data read from folder /MUONALIGN/TGC/SIDEC have IoV = 82359 -MuonAlignmentCo... INFO A- and B-Lines parameters from DB folder </MUONALIGN/TGC/SIDEC> loaded -MGM::MuonDetect... INFO temporary A-line container with size = 2694 -MGM::MuonDetect... INFO # of A-lines read from the ALineMapContainer in StoreGate is 2694 -MGM::MuonDetect... INFO # of deltaTransforms updated according to A-lines is 2694 -MGM::MuonDetect... INFO # of entries in the A-lines historical container is 2814 -MuonAlignmentCo... INFO recorded new ALineMapContainer with range {[0,0,t:1497892260,l:0] - [t:1497898380]} into Conditions Store -MGM::MuonDetect... INFO In updateDeformations() -MGM::MuonDetect... INFO temporary B-line container with size = 1206 -MGM::MuonDetect... INFO # of B-lines read from the ALineMapContainer in StoreGate is 1206 -MGM::MuonDetect... INFO # of deform-Transforms updated according to B-lines is 1174 -MGM::MuonDetect... INFO # of entries in the B-lines historical container is 1174 -MuonAlignmentCo... INFO recorded new BLineMapContainer with range {[0,0,t:1497892260,l:0] - [t:1497898380]} into Conditions Store -MuonGeoModel INFO MuonDetectorFactory - constructor MuonSystem OuterRadius 13000 Length 22030 -MuonDetectorCon... INFO create MuonDetectorTool - package version = MuonGeoModel-00-00-00 -MuonDetectorCon... INFO (from GeoModelSvc) AtlasVersion = <ATLAS-R2-2016-01-00-01> MuonVersion = <> -MuonDetectorCon... INFO Keys for Muon Switches are (key) ATLAS-R2-2016-01-00-01 (node) ATLAS -MuonDetectorCon... INFO (from GeoModelSvc) in AtlasVersion = <ATLAS-R2-2016-01-00-01> default MuonVersion is <MuonSpectrometer-R.08.01> -MuonDetectorCon... INFO Properties have been set as follows: -MuonDetectorCon... INFO LayoutName R -MuonDetectorCon... INFO IncludeCutouts 0 -MuonDetectorCon... INFO IncludeCutoutsBog 0 -MuonDetectorCon... INFO IncludeCtbBis 0 -MuonDetectorCon... INFO ControlAlines 111111 -MuonDetectorCon... INFO MinimalGeoFlag 0 -MuonDetectorCon... INFO EnableCscIntAlignment 1 -MuonDetectorCon... INFO EnableCscIntAlignmentFromGM 0 -MuonDetectorCon... INFO ControlCscIntAlines 111111 -MuonDetectorCon... INFO EnableMdtDeformations 1 -MuonDetectorCon... INFO EnableMdtAsBuiltParameters 1 -MuGM:MuonFactory INFO MuonLayout set to <R.08.01> = Development version for DC3 - infrastructures -MuGM:MuonFactory INFO BOG cutouts are activated 1 , all other cutouts are disabled 1 -MuGM:MuonFactory INFO Manager created for geometry version R.08.01 from DB MuonVersion <MuonSpectrometer-R.08.01> -MuonGeoModel.MYSQL INFO GeometryVersion set to <R.08.01> -MuGM:MuonFactory INFO Mysql helper class created here for geometry version R.08.01 from DB MuonVersion <MuonSpectrometer-R.08.01> -MuGM:MuonFactory INFO MDTIDHELPER retrieved from DetStore -MuGM:MuonFactory INFO RPCIDHELPER retrieved from DetStore -MuGM:MuonFactory INFO TGCIDHELPER retrieved from DetStore -MuGM:MuonFactory INFO CSCIDHELPER retrieved from DetStore -MuGM:MuonFactory INFO **************** MuonDetectorFactory001 ************************ -MuGM:MuonFactory INFO *** Start building the Muon Geometry Tree ********************** -MuGM:RDBReadAtlas INFO Start retriving dbObjects with tag = <ATLAS-R2-2016-01-00-01> node <ATLAS> -RDBAccessSvc WARNING Could not get the tag for XtomoData node. Returning 0 pointer to IRDBQuery -MuGM:RDBReadAtlas INFO After getQuery XtomoData -In DblQ00Xtomo(data) -No XtomoData table in the MuonDD Database -MuGM:RDBReadAtlas INFO After new DblQ00Xtomo -MuGM:RDBReadAtlas INFO After m_dhxtomo.data() -MuGM:RDBReadAtlas INFO No Ascii aszt input found: looking for A-lines in ORACLE -MuGM:RDBReadAtlas INFO ASZT table found in Oracle -MuGM:RDBReadAtlas INFO ASZT size is 32 -MuGM:RDBReadAtlas INFO No Ascii iacsc input found: looking for A-lines in ORACLE -RDBAccessSvc WARNING Could not get the tag for ISZT node. Returning 0 pointer to IRDBQuery -MuGM:RDBReadAtlas INFO No ISZT table in Oracle -MuGM:RDBReadAtlas INFO Access granted for all dbObjects needed by muon detectors -MuonGeoModel.MYSQL INFO LayoutName (from DBAM) set to <R.08> -- relevant for CTB2004 -MuGM:ProcStations INFO Processing Stations and Components -MuGM:ProcStations INFO Processing Stations and Components DONE -MuGM:ProcTechnol.s INFO nMDT 26 nCSC 4 nTGC 44 nRPC 50 -MuGM:ProcTechnol.s INFO nDED 4 nSUP 8 nSPA 4 -MuGM:ProcTechnol.s INFO nCHV 14 nCRO 14 nCMI 12 nLBI 12 -MuGM:ProcPosition INFO *** N. of stations positioned in the setup 234 -MuGM:ProcPosition INFO *** N. of stations described in mysql 234 -MuGM:ProcPosition INFO *** N. of types 32 size of jtypvec 32 -MuGM:ProcPosition INFO *** : 234 kinds of stations (type*sub_type) -MuGM:ProcPosition INFO *** : 1758 physical stations in space - according to the MuonDD DataBase -MuGM:ProcCutouts INFO Processing Cutouts for geometry layout R.08 -MuGM:ProcCutouts INFO Processing Cutouts DONE -MuGM:RDBReadAtlas INFO ProcessTGCreadout - version 7 wirespacing 1.8 -MuGM:RDBReadAtlas INFO Intermediate Objects built from primary numbers -MuGM:MuonFactory INFO theMaterialManager retrieven successfully from the DetStore -MuGM:MuonFactory INFO MuonSystem description from OracleTag=<ATLAS-R2-2016-01-00-01> and node=<ATLAS> -MuGM:MuonFactory INFO TreeTop added to the Manager -MuGM:MuonFactory INFO Muon Layout R.08.01 -MuGM:MuonFactory INFO Fine Clash Fixing disabled: (should be ON/OFF for Simulation/Reconstruction) -MuGM:MuonFactory INFO **************** MuonDetectorFactory001 **************************** -MuGM:MuonFactory INFO *** The Muon Chamber Geometry Tree is built with -MuGM:MuonFactory INFO *** 1758 child volumes -MuGM:MuonFactory INFO *** 1839 independent elements and -MuGM:MuonFactory INFO *** 11473 elements cloned or shared -MuGM:MuonFactory INFO *** 234 kinds of stations -MuGM:MuonFactory INFO *** 1758 stations with alignable transforms -MuGM:MuonFactory INFO *** 148 stations are described as Assemblies -MuGM:MuonFactory INFO *** 1758 MuonStations -MuGM:MuonFactory INFO *** 2324 MDT Readout Elements 1186 MDT Detector Elements -MuGM:MuonFactory INFO *** 32 CSC Readout Elements 32 CSC Detector Elements -MuGM:MuonFactory INFO *** 1122 RPC Readout Elements 600 RPC Detector Elements -MuGM:MuonFactory INFO *** 1578 TGC Readout Elements 1578 TGC Detector Elements -MuGM:MuonFactory INFO ******************************************************************** -MuGM:MuonFactory INFO *** Inert Material built according to DB switches and config. ****** -MuGM:MuonFactory INFO *** The Muon Geometry Tree has 1758 child vol.s in total ******** -MuGM:MuonFactory INFO ******************************************************************** - -MGM::MuonDetect... INFO Init A/B Line Containers - done - size is respectively 1758/0 -MGM::MuonDetect... INFO Init of CSC I-Lines will be done via Conditions DB -MGM::MuonDetect... INFO Init I-Line Container - done - size is respectively 128 -MGM::MuonDetect... INFO I-Line for CSC wire layers loaded (Csc Internal Alignment) -MGM::MuonDetect... INFO According to configuration they WILL be used -MGM::MuonDetect... INFO Filling cache -MGM::MuonDetect... INFO temporary CSC I-line container with size = 128 -MGM::MuonDetect... INFO # of CSC I-lines read from the ILineMapContainer in StoreGate is 128 -MGM::MuonDetect... INFO # of deltaTransforms updated according to A-lines is 128 -MGM::MuonDetect... INFO # of entries in the CSC I-lines historical container is 128 -MGM::MuonDetect... INFO temporary As-Built container with size = 628 -MGM::MuonDetect... INFO # of MDT As-Built read from the MdtAsBuiltMapContainer in StoreGate is 628 -MGM::MuonDetect... INFO # of deltaTransforms updated according to As-Built is 628 -MGM::MuonDetect... INFO # of entries in the MdtAsBuilt historical container is 628 -MGM::MuonDetect... INFO temporary A-line container with size = 2694 -MGM::MuonDetect... INFO # of A-lines read from the ALineMapContainer in StoreGate is 2694 -MGM::MuonDetect... INFO # of deltaTransforms updated according to A-lines is 2694 -MGM::MuonDetect... INFO # of entries in the A-lines historical container is 2814 -MGM::MuonDetect... INFO In updateDeformations() -MGM::MuonDetect... INFO temporary B-line container with size = 1206 -MGM::MuonDetect... INFO # of B-lines read from the ALineMapContainer in StoreGate is 1206 -MGM::MuonDetect... INFO # of deform-Transforms updated according to B-lines is 1174 -MGM::MuonDetect... INFO # of entries in the B-lines historical container is 1174 -MuonDetectorCon... INFO recorded new MuonDetectorManager with range {[0,0,t:1497892260,l:0] - [t:1497898380]} into Conditions Store -RpcCablingCondAlg INFO maps configuration have been parsed -RpcCablingCondAlg INFO recorded new RpcCablingCondData with range {[315000,l:0] - [999999,l:0]} -MuonMDT_CablingAlg INFO Size of CondAttrListCollection ( 'CondAttrListCollection' , 'ConditionStore+/MDT/CABLING/MEZZANINE_SCHEMA' ) readCdoMez->size()= 24 -MuonMDT_CablingAlg INFO Range of input is {[0,l:0] - [INVALID]} -MuonMDT_CablingAlg INFO Size of CondAttrListCollection ( 'CondAttrListCollection' , 'ConditionStore+/MDT/CABLING/MAP_SCHEMA' ) readCdoMap->size()= 2312 -MuonMDT_CablingAlg INFO Range of input is {[327264,l:4294640031] - [327265,l:4294640030]} -MuonMDT_CablingAlg INFO recorded new MuonMDT_CablingMap with range {[327264,t:0,l:4294640031] - [327265,l:4294640030]} into Conditions Store -AtlasFieldMapCo... INFO updateFieldMap: Update map from conditions -AtlasFieldMapCo... INFO updateFieldMap: Update map from conditions: Range of input/output is {[0,l:0] - [INVALID]} -AtlasFieldMapCo... INFO updateFieldMap: reading magnetic field map filenames from COOL -AtlasFieldMapCo... INFO updateFieldMap: found map of type GlobalMap with soleCur=7730 toroCur=20400 (path file:MagneticFieldMaps/bfieldmap_7730_20400_14m.root) -AtlasFieldMapCo... INFO updateFieldMap: found map of type SolenoidMap with soleCur=7730 toroCur=0 (path file:MagneticFieldMaps/bfieldmap_7730_0_14m.root) -AtlasFieldMapCo... INFO updateFieldMap: found map of type ToroidMap with soleCur=0 toroCur=20400 (path file:MagneticFieldMaps/bfieldmap_0_20400_14m.root) -AtlasFieldMapCo... INFO updateFieldMap: tagInfoH ( 'TagInfo' , 'DetectorStore+ProcessingTags' ) is valid. -AtlasFieldMapCo... INFO updateFieldMap: DID NOT reset currents from TagInfo -AtlasFieldMapCo... INFO updateFieldMap: Set map currents from FieldSvc: solenoid/toroid 7730,20400 -AtlasFieldMapCo... INFO updateFieldMap: Use map file MagneticFieldMaps/bfieldmap_7730_20400_14m.root -AtlasFieldMapCo... INFO updateFieldMap: Initialized the field map from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/atlas/offline/ReleaseData/v20/MagneticFieldMaps/bfieldmap_7730_20400_14m.root -AtlasFieldMapCo... INFO execute: solenoid zone id 7000 -AtlasFieldMapCo... INFO execute: recored AtlasFieldMapCondObj with field map -AtlasFieldCache... INFO UpdateCurrentFromConditions -AtlasFieldCache... INFO UpdateCurrentFromConditions: Range of input/output is {[0,0,t:1497895317.371000000] - [t:1497898549.609000000]} -AtlasFieldCache... INFO UpdateCurrentFromConditions: Attempt 1 at reading currents from DCS (using channel name) -AtlasFieldCache... INFO UpdateCurrentFromConditions: Trying to read from DCS: [channel name, index, value] CentralSol_Current , 1 , 7729.99 -AtlasFieldCache... INFO UpdateCurrentFromConditions: Trying to read from DCS: [channel name, index, value] CentralSol_SCurrent , 2 , 7730 -AtlasFieldCache... INFO UpdateCurrentFromConditions: Trying to read from DCS: [channel name, index, value] Toroids_Current , 3 , 20399.9 -AtlasFieldCache... INFO UpdateCurrentFromConditions: Trying to read from DCS: [channel name, index, value] Toroids_SCurrent , 4 , 20397.7 -AtlasFieldCache... INFO UpdateCurrentFromConditions: Currents read from DCS - solenoid 7729.99 toroid 20399.9 -AtlasFieldCache... INFO scaleField: Solenoid field scale factor 1. Solenoid and map currents: 7729.99,7730 -AtlasFieldCache... INFO scaleField: Toroid field scale factor 1. Toroid and map currents: 20399.9,20400 -AtlasFieldCache... INFO execute: initialized AtlasFieldCacheCondObj and cache with SFs - sol/tor 1/1 -AtlasFieldCache... INFO execute: solenoid zone id 7000 -MdtCalibDbAlg INFO Size of CondAttrListCollection ( 'CondAttrListCollection' , 'ConditionStore+/MDT/RTBLOB' ) readCdoRt->size()= 1186 -MdtCalibDbAlg INFO Range of input is {[327265,l:0] - [327342,l:0]} -MdtCalibDbAlg INFO MdtCalibDbAlg::loadRt Read 1188RTs from COOL -MdtCalibDbAlg INFO recorded new MdtRtRelationCollection with range {[327265,l:0] - [327342,l:0]} into Conditions Store -MdtCalibDbAlg INFO recorded new MdtCorFuncSetCollection with range {[327265,l:0] - [327342,l:0]} into Conditions Store -MdtCalibDbAlg INFO Ignoring nonexistant station in calibration DB: MuonSpectrometer BML -6 stationPhi 7 MDT multiLayer 1 tubeLayer 1 tube 1 -MdtCalibDbAlg INFO Ignoring nonexistant station in calibration DB: MuonSpectrometer BML stationEta 6 stationPhi 7 MDT multiLayer 1 tubeLayer 1 tube 1 -MdtCalibDbAlg INFO Size of CondAttrListCollection ( 'CondAttrListCollection' , 'ConditionStore+/MDT/T0BLOB' ) readCdoTube->size()= 1186 -MdtCalibDbAlg INFO Range of input is {[319000,l:0] - [INVALID]} -MdtCalibDbAlg INFO recorded new MdtTubeCalibContainerCollection with range {[319000,l:0] - [INVALID]} into Conditions Store -CscCondDbData INFO Maximum Layer hash is 255 -AthenaEventLoopMgr INFO ===>>> done processing event #186525031, run #327265 1 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #186524665, run #327265 1 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #186524665, run #327265 2 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #186542447, run #327265 2 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #186542447, run #327265 3 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #186543405, run #327265 3 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #186543405, run #327265 4 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #186548387, run #327265 4 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #186548387, run #327265 5 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #186515186, run #327265 5 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #186515186, run #327265 6 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #186556019, run #327265 6 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #186556019, run #327265 7 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #186542866, run #327265 7 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #186542866, run #327265 8 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #186537901, run #327265 8 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #186537901, run #327265 9 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #186517811, run #327265 9 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #186517811, run #327265 10 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #186534221, run #327265 10 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #186534221, run #327265 11 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #186540986, run #327265 11 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #186540986, run #327265 12 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #186535104, run #327265 12 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #186535104, run #327265 13 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #186539903, run #327265 13 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #186539903, run #327265 14 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #186552713, run #327265 14 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #186552713, run #327265 15 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #186524730, run #327265 15 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #186524730, run #327265 16 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #186547632, run #327265 16 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #186547632, run #327265 17 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #186555621, run #327265 17 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #186555621, run #327265 18 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #186568452, run #327265 18 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #186568452, run #327265 19 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #186580451, run #327265 19 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #186580451, run #327265 20 events processed so far <<<=== -Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] -ApplicationMgr INFO Application Manager Stopped successfully -IncidentProcAlg1 INFO Finalize -CondInputLoader INFO Finalizing CondInputLoader... -AtlasFieldMapCo... INFO in finalize -AtlasFieldCache... INFO in finalize -IncidentProcAlg2 INFO Finalize -IOVDbFolder INFO Folder /CSC/FTHOLD (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/322656 (( 0.07 ))s -IOVDbFolder INFO Folder /CSC/NOISE (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/350062 (( 0.03 ))s -IOVDbFolder INFO Folder /CSC/PED (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/411187 (( 0.04 ))s -IOVDbFolder INFO Folder /CSC/PSLOPE (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/353376 (( 0.04 ))s -IOVDbFolder INFO Folder /CSC/RMS (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/411395 (( 0.05 ))s -IOVDbFolder INFO Folder /CSC/STAT (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/230496 (( 0.10 ))s -IOVDbFolder INFO Folder /CSC/T0BASE (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/314380 (( 0.08 ))s -IOVDbFolder INFO Folder /CSC/T0PHASE (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/3136 (( 0.07 ))s -IOVDbFolder INFO Folder /EXT/DCS/MAGNETS/SENSORDATA (AttrListColl) db-read 1/1 objs/chan/bytes 4/4/20 (( 0.04 ))s -IOVDbFolder INFO Folder /GLOBAL/BField/Maps (AttrListColl) db-read 1/1 objs/chan/bytes 3/3/202 (( 0.08 ))s -IOVDbFolder INFO Folder /MDT/CABLING/MAP_SCHEMA (AttrListColl) db-read 1/1 objs/chan/bytes 2312/2437/216520 (( 0.20 ))s -IOVDbFolder INFO Folder /MDT/CABLING/MEZZANINE_SCHEMA (AttrListColl) db-read 1/1 objs/chan/bytes 24/24/288 (( 0.07 ))s -IOVDbFolder INFO Folder /MDT/RTBLOB (AttrListColl) db-read 1/1 objs/chan/bytes 2372/1186/2251209 (( 0.16 ))s -IOVDbFolder INFO Folder /MDT/T0BLOB (AttrListColl) db-read 1/1 objs/chan/bytes 1186/1186/1374284 (( 0.18 ))s -IOVDbFolder INFO Folder /MUONALIGN/CSC/ILINES (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/10814 (( 0.10 ))s -IOVDbFolder INFO Folder /MUONALIGN/MDT/ASBUILTPARAMS (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/128992 (( 0.09 ))s -IOVDbFolder INFO Folder /MUONALIGN/MDT/BARREL (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/140293 (( 0.08 ))s -IOVDbFolder INFO Folder /MUONALIGN/MDT/ENDCAP/SIDEA (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/65494 (( 0.06 ))s -IOVDbFolder INFO Folder /MUONALIGN/MDT/ENDCAP/SIDEC (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/65497 (( 0.05 ))s -IOVDbFolder INFO Folder /MUONALIGN/TGC/SIDEA (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/165643 (( 0.05 ))s -IOVDbFolder INFO Folder /MUONALIGN/TGC/SIDEC (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/165643 (( 0.07 ))s -IOVDbFolder INFO Folder /RPC/CABLING/MAP_SCHEMA (AttrListColl) db-read 1/2 objs/chan/bytes 1/1/222235 (( 0.16 ))s -IOVDbFolder INFO Folder /RPC/CABLING/MAP_SCHEMA_CORR (AttrListColl) db-read 1/2 objs/chan/bytes 1/1/29402 (( 0.17 ))s -IOVDbFolder INFO Folder /RPC/DCS/DeadRopanels (AttrListColl) db-read 1/1 objs/chan/bytes 32/48/6200 (( 0.00 ))s -IOVDbFolder INFO Folder /RPC/DCS/OffRopanels (AttrListColl) db-read 1/1 objs/chan/bytes 4/48/16 (( 0.00 ))s -IOVDbFolder INFO Folder /RPC/DQMF/ELEMENT_STATUS (AttrListColl) db-read 1/1 objs/chan/bytes 8320/8320/6180700 (( 0.46 ))s -IOVDbFolder INFO Folder /RPC/TRIGGER/CM_THR_ETA (AttrListColl) db-read 1/2 objs/chan/bytes 1613/1613/7562651 (( 0.40 ))s -IOVDbFolder INFO Folder /RPC/TRIGGER/CM_THR_PHI (AttrListColl) db-read 1/2 objs/chan/bytes 1612/1612/8096306 (( 0.26 ))s -IOVDbFolder INFO Folder /TGC/CABLING/MAP_SCHEMA (AttrListColl) db-read 0/0 objs/chan/bytes 0/1/0 (( 0.00 ))s -IOVDbSvc INFO bytes in (( 3.17 ))s -IOVDbSvc INFO Connection sqlite://;schema=mycool.db;dbname=CONDBR2 : nConnect: 0 nFolders: 0 ReadTime: (( 0.00 ))s -IOVDbSvc INFO Connection COOLOFL_MUONALIGN/CONDBR2 : nConnect: 2 nFolders: 7 ReadTime: (( 0.51 ))s -IOVDbSvc INFO Connection COOLONL_RPC/CONDBR2 : nConnect: 2 nFolders: 4 ReadTime: (( 0.99 ))s -IOVDbSvc INFO Connection COOLONL_TGC/CONDBR2 : nConnect: 1 nFolders: 1 ReadTime: (( 0.00 ))s -IOVDbSvc INFO Connection COOLONL_MDT/CONDBR2 : nConnect: 2 nFolders: 2 ReadTime: (( 0.27 ))s -IOVDbSvc INFO Connection COOLONL_GLOBAL/CONDBR2 : nConnect: 2 nFolders: 1 ReadTime: (( 0.08 ))s -IOVDbSvc INFO Connection COOLOFL_DCS/CONDBR2 : nConnect: 2 nFolders: 3 ReadTime: (( 0.05 ))s -IOVDbSvc INFO Connection COOLOFL_RPC/CONDBR2 : nConnect: 2 nFolders: 1 ReadTime: (( 0.46 ))s -IOVDbSvc INFO Connection COOLOFL_MDT/CONDBR2 : nConnect: 2 nFolders: 2 ReadTime: (( 0.34 ))s -IOVDbSvc INFO Connection COOLOFL_CSC/CONDBR2 : nConnect: 2 nFolders: 8 ReadTime: (( 0.48 ))s -ToolSvc INFO Removing all tools created by ToolSvc -TgcRdoToTgcPrep... INFO finalize(): input RDOs->output PRDs [Hit: 6807->6807, Tracklet: 28->28, TrackletEIFI: 692->692, HiPt: 4031->4031, SL: 3->3] MdtRawDataProvi... INFO Fraction of fills that use the cache = 0 TgcRawDataProvi... INFO Fraction of fills that use the cache = 0 RpcROD_Decoder:... INFO ============ FINAL RPC DATA FORMAT STAT. =========== @@ -1066,15 +50,3 @@ RpcROD_Decoder:... INFO SL Footer Errors.............0 RpcROD_Decoder:... INFO RX Footer Errors.............0 RpcROD_Decoder:... INFO CRC8 check Failures..........0 RpcROD_Decoder:... INFO ==================================================== -ToolSvc.ByteStr... INFO in finalize() -ToolSvc.TGCCabl... INFO finalize -IdDictDetDescrCnv INFO in finalize -*****Chrono***** INFO **************************************************************************************************** -*****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) -*****Chrono***** INFO **************************************************************************************************** -cObj_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 32 -ChronoStatSvc INFO Time User : Tot= 28.9 [s] #= 1 -*****Chrono***** INFO **************************************************************************************************** -ChronoStatSvc.f... INFO Service finalized successfully -ApplicationMgr INFO Application Manager Finalized successfully -ApplicationMgr INFO Application Manager Terminated successfully diff --git a/MuonSpectrometer/MuonConfig/share/MuonDataDecodeTest_Cache.ref b/MuonSpectrometer/MuonConfig/share/MuonDataDecodeTest_Cache.ref index 7c9acb32d89deb5e31a064f341e1a5c0f0d0cda0..19870c902df591399e53249e88245277decfadbc 100644 --- a/MuonSpectrometer/MuonConfig/share/MuonDataDecodeTest_Cache.ref +++ b/MuonSpectrometer/MuonConfig/share/MuonDataDecodeTest_Cache.ref @@ -1,549 +1,21 @@ -Flag Name : Value -Beam.BunchSpacing : 25 -Beam.Energy : [function] -Beam.NumberOfCollisions : [function] -Beam.Type : [function] -Beam.estimatedLuminosity : [function] -Common.Project : 'Athena' -Common.bunchCrossingSource : [function] -Common.doExpressProcessing : False -Common.isOnline : False -Common.useOnlineLumi : [function] -Concurrency.NumConcurrentEvents : 0 -Concurrency.NumProcs : 0 -Concurrency.NumThreads : 0 -Exec.DebugStage : '' -Exec.MaxEvents : -1 -Exec.OutputLevel : 3 -Exec.SkipEvents : 0 -GeoModel.Align.Dynamic : [function] -GeoModel.AtlasVersion : 'ATLAS-R2-2016-01-00-01' -GeoModel.IBLLayout : [function] -GeoModel.Layout : 'atlas' -GeoModel.Run : [function] -GeoModel.StripGeoType : [function] -GeoModel.Type : [function] -IOVDb.DatabaseInstance : [function] -IOVDb.GlobalTag : 'CONDBR2-BLKPA-2018-13' -Input.Collections : [function] -Input.Files : ['/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1'] -Input.Format : [function] -Input.ProjectName : [function] -Input.RunNumber : [function] -Input.SecondaryCollections : [function] -Input.SecondaryFiles : [] -Input.isMC : [function] -Output.AODFileName : '' -Output.ESDFileName : '' -Output.EVNTFileName : '' -Output.HISTFileName : '' -Output.HITSFileName : '' -Output.RDOFileName : '' -Output.RDO_SGNLFileName : '' -Output.doESD : [function] -Output.doWriteAOD : [function] -Output.doWriteBS : False -Output.doWriteESD : [function] -Output.doWriteRDO : [function] -Output.doWriteRDO_SGNL : [function] -Random.Engine : 'dSFMT' -Scheduler.CheckDependencies : True -Scheduler.ShowControlFlow : True -Scheduler.ShowDataDeps : True -Scheduler.ShowDataFlow : True -TrackingGeometry.MagneticFileMode : 6 -TrackingGeometry.MaterialSource : 'COOL' -Flag categories that can be loaded dynamically -Category : Generator name : Defined in -BField : __bfield : AthenaConfiguration/AllConfigFlags.py -BTagging : __btagging : AthenaConfiguration/AllConfigFlags.py -Calo : __calo : AthenaConfiguration/AllConfigFlags.py -DQ : __dq : AthenaConfiguration/AllConfigFlags.py -Detector : __detector : AthenaConfiguration/AllConfigFlags.py -Digitization : __digitization : AthenaConfiguration/AllConfigFlags.py -Egamma : __egamma : AthenaConfiguration/AllConfigFlags.py -InDet : __indet : AthenaConfiguration/AllConfigFlags.py -LAr : __lar : AthenaConfiguration/AllConfigFlags.py -Muon : __muon : AthenaConfiguration/AllConfigFlags.py -MuonCombined : __muoncombined : AthenaConfiguration/AllConfigFlags.py -Overlay : __overlay : AthenaConfiguration/AllConfigFlags.py -PF : __pflow : AthenaConfiguration/AllConfigFlags.py -Sim : __simulation : AthenaConfiguration/AllConfigFlags.py -Tile : __tile : AthenaConfiguration/AllConfigFlags.py -Trigger : __trigger : AthenaConfiguration/AllConfigFlags.py -Py:Athena INFO About to setup Raw data decoding -Py:Athena INFO using release [WorkDir-22.0.15] [x86_64-centos7-gcc8-opt] [muonconfig/5f5ea9b] -- built on [2020-06-03T1254] -Py:AutoConfigFlags INFO Obtaining metadata of auto-configuration by peeking into /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1 -Py:MetaReader INFO Current mode used: peeker -Py:MetaReader INFO Current filenames: ['/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1'] -Py:ConfigurableDb INFO Read module info for 5533 configurables from 5 genConfDb files -Py:ConfigurableDb INFO No duplicates have been found: that's good ! -EventInfoMgtInit: Got release version Athena-22.0.15 -Py:IOVDbSvc.CondDB INFO Setting up conditions DB access to instance OFLP200 -Py:Athena INFO Print Config -Py:ComponentAccumulator INFO Event Inputs -Py:ComponentAccumulator INFO Event Algorithm Sequences -Py:ComponentAccumulator INFO Top sequence 0 -Py:ComponentAccumulator INFO \__ AthAlgSeq (seq: SEQ AND) -Py:ComponentAccumulator INFO \__ MuonCacheCreator (alg) -Py:ComponentAccumulator INFO \__ RpcRawDataProvider (alg) -Py:ComponentAccumulator INFO \__ TgcRawDataProvider (alg) -Py:ComponentAccumulator INFO \__ MdtRawDataProvider (alg) -Py:ComponentAccumulator INFO \__ CscRawDataProvider (alg) -Py:ComponentAccumulator INFO \__ RpcRdoToRpcPrepData (alg) -Py:ComponentAccumulator INFO \__ TgcRdoToTgcPrepData (alg) -Py:ComponentAccumulator INFO \__ MdtRdoToMdtPrepData (alg) -Py:ComponentAccumulator INFO \__ CscRdoToCscPrepData (alg) -Py:ComponentAccumulator INFO \__ CscThresholdClusterBuilder (alg) -Py:ComponentAccumulator INFO Condition Algorithms -Py:ComponentAccumulator INFO \__ CondInputLoader (cond alg) -Py:ComponentAccumulator INFO \__ MuonAlignmentCondAlg (cond alg) -Py:ComponentAccumulator INFO \__ MuonDetectorCondAlg (cond alg) -Py:ComponentAccumulator INFO \__ RpcCablingCondAlg (cond alg) -Py:ComponentAccumulator INFO \__ MuonMDT_CablingAlg (cond alg) -Py:ComponentAccumulator INFO \__ AtlasFieldMapCondAlg (cond alg) -Py:ComponentAccumulator INFO \__ AtlasFieldCacheCondAlg (cond alg) -Py:ComponentAccumulator INFO \__ RpcCondDbAlg (cond alg) -Py:ComponentAccumulator INFO \__ MdtCalibDbAlg (cond alg) -Py:ComponentAccumulator INFO \__ CscCondDbAlg (cond alg) -Py:ComponentAccumulator INFO Services -Py:ComponentAccumulator INFO ['EventSelector', 'ByteStreamInputSvc', 'EventPersistencySvc', 'ByteStreamCnvSvc', 'ROBDataProviderSvc', 'ByteStreamAddressProviderSvc', 'MetaDataStore', 'InputMetaDataStore', 'MetaDataSvc', 'ProxyProviderSvc', 'GeoModelSvc', 'DetDescrCnvSvc', 'TagInfoMgr', 'IOVDbSvc', 'PoolSvc', 'CondSvc', 'DBReplicaSvc', 'AthenaPoolCnvSvc', 'MuonIdHelperSvc', 'RPCcablingServerSvc', 'MuonRPC_CablingSvc', 'LVL1TGC::TGCRecRoiSvc', 'TGCcablingServerSvc', 'MuonMDT_CablingSvc', 'AtlasFieldSvc', 'CSCcablingSvc'] -Py:ComponentAccumulator INFO Public Tools -Py:ComponentAccumulator INFO [ -Py:ComponentAccumulator INFO IOVDbMetaDataTool/IOVDbMetaDataTool, -Py:ComponentAccumulator INFO ByteStreamMetadataTool/ByteStreamMetadataTool, -Py:ComponentAccumulator INFO RPCCablingDbTool/RPCCablingDbTool, -Py:ComponentAccumulator INFO Muon::RPC_RawDataProviderToolMT/RPC_RawDataProviderToolMT, -Py:ComponentAccumulator INFO Muon::TGC_RawDataProviderToolMT/TGC_RawDataProviderToolMT, -Py:ComponentAccumulator INFO MDTCablingDbTool/MDTCablingDbTool, -Py:ComponentAccumulator INFO Muon::MDT_RawDataProviderToolMT/MDT_RawDataProviderToolMT, -Py:ComponentAccumulator INFO Muon::CSC_RawDataProviderToolMT/CSC_RawDataProviderToolMT, -Py:ComponentAccumulator INFO ] -Py:ComponentAccumulator INFO Private Tools -Py:ComponentAccumulator INFO [ -Py:ComponentAccumulator INFO ] -Py:ComponentAccumulator INFO TheApp properties -Py:ComponentAccumulator INFO EvtSel : EventSelector -Py:Athena INFO Save Config - -JOs reading stage finished, launching CARunner from pickle file - -ApplicationMgr SUCCESS -==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v33r1) - running on lxplus703.cern.ch on Wed Jun 3 15:26:14 2020 -==================================================================================================================================== -ApplicationMgr INFO Application Manager Configured successfully -PublicTool IOVDbMetaDataTool -PublicTool ByteStreamMetadataTool -PublicTool RPCCablingDbTool -PublicTool RPC_RawDataProviderToolMT -PublicTool TGC_RawDataProviderToolMT -PublicTool MDTCablingDbTool -PublicTool MDT_RawDataProviderToolMT -PublicTool CSC_RawDataProviderToolMT -CoreDumpSvc INFO install f-a-t-a-l handler... (flag = 438) -CoreDumpSvc INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) -ClassIDSvc INFO getRegistryEntries: read 3838 CLIDRegistry entries for module ALL -MetaDataSvc INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00 -AthenaPoolCnvSvc INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00 -PoolSvc INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.xml) [ok] -PoolSvc INFO Set connectionsvc retry/timeout/IDLE timeout to 'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled -PoolSvc INFO Frontier compression level set to 5 -DBReplicaSvc INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy-atlas.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-06-02T2139/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus703.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] -DBReplicaSvc INFO COOL SQLite replicas will be excluded if matching pattern /DBRelease/ -PoolSvc INFO Successfully setup replica sorting algorithm -PoolSvc INFO Setting up APR FileCatalog and Streams -PoolSvc INFO Resolved path (via ATLAS_POOLCOND_PATH) is /cvmfs/atlas-condb.cern.ch/repo/conditions/poolcond/PoolFileCatalog.xml -PoolSvc WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables -PoolSvc WARNING Unable to locate catalog for apcfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables -PoolSvc WARNING Unable to locate catalog for prfile:poolcond/PoolCat_comcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables -PoolSvc WARNING Unable to locate catalog for apcfile:poolcond/PoolCat_comcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables -PoolSvc INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.xml -DbSession INFO Open DbSession -Domain[ROOT_All] INFO > Access DbDomain READ [ROOT_All] -ToolSvc.ByteStr... INFO Initializing ToolSvc.ByteStreamMetadataTool - package version ByteStreamCnvSvc-00-00-00 -MetaDataSvc INFO Found MetaDataTools = PublicToolHandleArray(['IOVDbMetaDataTool/IOVDbMetaDataTool','ByteStreamMetadataTool/ByteStreamMetadataTool']) -ByteStreamAddre... INFO Initializing ByteStreamAddressProviderSvc - package version ByteStreamCnvSvcBase-00-00-00 -ByteStreamAddre... INFO initialized -ByteStreamAddre... INFO -- Will fill Store with id = 0 -IOVDbSvc INFO Opened read transaction for POOL PersistencySvc -IOVDbSvc INFO Only 5 POOL conditions files will be open at once -IOVDbSvc INFO Cache alignment will be done in 3 slices -IOVDbSvc INFO Global tag: CONDBR2-BLKPA-2018-13 set from joboptions -IOVDbFolder INFO Inputfile tag override disabled for /GLOBAL/BField/Maps -IOVDbSvc INFO Initialised with 10 connections and 29 folders -IOVDbSvc INFO Service IOVDbSvc initialised successfully -ClassIDSvc INFO getRegistryEntries: read 2674 CLIDRegistry entries for module ALL -IOVDbSvc INFO Opening COOL connection for COOLOFL_MUONALIGN/CONDBR2 -IOVSvc INFO No IOVSvcTool associated with store "StoreGateSvc" -IOVSvc.IOVSvcTool INFO IOVRanges will be checked at every Event -IOVDbSvc INFO Opening COOL connection for COOLONL_RPC/CONDBR2 -IOVDbSvc INFO Disconnecting from COOLOFL_MUONALIGN/CONDBR2 -IOVDbSvc INFO Opening COOL connection for COOLONL_TGC/CONDBR2 -IOVDbSvc INFO Disconnecting from COOLONL_RPC/CONDBR2 -IOVDbSvc INFO Opening COOL connection for COOLONL_MDT/CONDBR2 -IOVDbSvc INFO Disconnecting from COOLONL_TGC/CONDBR2 -IOVDbSvc INFO Opening COOL connection for COOLONL_GLOBAL/CONDBR2 -IOVDbSvc INFO Disconnecting from COOLONL_MDT/CONDBR2 -IOVDbSvc INFO Opening COOL connection for COOLOFL_DCS/CONDBR2 -IOVDbSvc INFO Disconnecting from COOLONL_GLOBAL/CONDBR2 -IOVDbSvc INFO Opening COOL connection for COOLOFL_RPC/CONDBR2 -IOVDbSvc INFO Disconnecting from COOLOFL_DCS/CONDBR2 -IOVDbSvc INFO Opening COOL connection for COOLOFL_MDT/CONDBR2 -IOVDbSvc INFO Disconnecting from COOLOFL_RPC/CONDBR2 -IOVDbSvc INFO Opening COOL connection for COOLOFL_CSC/CONDBR2 -IOVDbSvc INFO Disconnecting from COOLOFL_MDT/CONDBR2 -IOVDbSvc INFO Disconnecting from COOLOFL_CSC/CONDBR2 -IOVDbSvc INFO Added taginfo remove for /CSC/FTHOLD -IOVDbSvc INFO Added taginfo remove for /CSC/NOISE -IOVDbSvc INFO Added taginfo remove for /CSC/PED -IOVDbSvc INFO Added taginfo remove for /CSC/PSLOPE -IOVDbSvc INFO Added taginfo remove for /CSC/RMS -IOVDbSvc INFO Added taginfo remove for /CSC/STAT -IOVDbSvc INFO Added taginfo remove for /CSC/T0BASE -IOVDbSvc INFO Added taginfo remove for /CSC/T0PHASE -IOVDbSvc INFO Added taginfo remove for /EXT/DCS/MAGNETS/SENSORDATA -IOVDbSvc INFO Added taginfo remove for /GLOBAL/BField/Maps -IOVDbSvc INFO Added taginfo remove for /MDT/CABLING/MAP_SCHEMA -IOVDbSvc INFO Added taginfo remove for /MDT/CABLING/MEZZANINE_SCHEMA -IOVDbSvc INFO Added taginfo remove for /MDT/RTBLOB -IOVDbSvc INFO Added taginfo remove for /MDT/T0BLOB -IOVDbSvc INFO Added taginfo remove for /MUONALIGN/CSC/ILINES -IOVDbSvc INFO Added taginfo remove for /MUONALIGN/MDT/ASBUILTPARAMS -IOVDbSvc INFO Added taginfo remove for /MUONALIGN/MDT/BARREL -IOVDbSvc INFO Added taginfo remove for /MUONALIGN/MDT/ENDCAP/SIDEA -IOVDbSvc INFO Added taginfo remove for /MUONALIGN/MDT/ENDCAP/SIDEC -IOVDbSvc INFO Added taginfo remove for /MUONALIGN/TGC/SIDEA -IOVDbSvc INFO Added taginfo remove for /MUONALIGN/TGC/SIDEC -IOVDbSvc INFO Added taginfo remove for /RPC/CABLING/MAP_SCHEMA -IOVDbSvc INFO Added taginfo remove for /RPC/CABLING/MAP_SCHEMA_CORR -IOVDbSvc INFO Added taginfo remove for /RPC/DCS/DeadRopanels -IOVDbSvc INFO Added taginfo remove for /RPC/DCS/OffRopanels -IOVDbSvc INFO Added taginfo remove for /RPC/DQMF/ELEMENT_STATUS -IOVDbSvc INFO Added taginfo remove for /RPC/TRIGGER/CM_THR_ETA -IOVDbSvc INFO Added taginfo remove for /RPC/TRIGGER/CM_THR_PHI -IOVDbSvc INFO Added taginfo remove for /TGC/CABLING/MAP_SCHEMA -GeoModelSvc INFO Explicitly initializing DetDescrCnvSvc -DetDescrCnvSvc INFO initializing -DetDescrCnvSvc INFO Found DetectorStore service -DetDescrCnvSvc INFO filling proxies for detector managers -DetDescrCnvSvc INFO filling address for CaloTTMgr with CLID 117659265 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloMgr with CLID 4548337 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloSuperCellMgr with CLID 241807251 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloIdManager with CLID 125856940 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArIdManager with CLID 79554919 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for IdDict with CLID 2411 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for AtlasID with CLID 164875623 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for PixelID with CLID 2516 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for SCT_ID with CLID 2517 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TRT_ID with CLID 2518 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for SiliconID with CLID 129452393 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArEM_ID with CLID 163583365 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArEM_SuperCell_ID with CLID 99488227 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHEC_ID with CLID 3870484 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHEC_SuperCell_ID with CLID 254277678 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArFCAL_ID with CLID 45738051 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArFCAL_SuperCell_ID with CLID 12829437 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArMiniFCAL_ID with CLID 79264204 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArOnlineID with CLID 158698068 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TTOnlineID with CLID 38321944 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArOnline_SuperCellID with CLID 115600394 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArHVLineID with CLID 27863673 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for LArElectrodeID with CLID 80757351 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileID with CLID 2901 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for Tile_SuperCell_ID with CLID 49557789 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileHWID with CLID 2902 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TileTBID with CLID 2903 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for MDTIDHELPER with CLID 4170 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CSCIDHELPER with CLID 4171 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for RPCIDHELPER with CLID 4172 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for TGCIDHELPER with CLID 4173 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloLVL1_ID with CLID 108133391 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloCell_ID with CLID 123500438 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloCell_SuperCell_ID with CLID 128365736 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for CaloDM_ID with CLID 167756483 and storage type 68 to detector store -DetDescrCnvSvc INFO filling address for ZdcID with CLID 190591643 and storage type 68 to detector store -GeoModelSvc.Muo... INFO Initializing ... -GeoModelSvc::RD...WARNING Getting PixTBMatComponents with default tag -GeoModelSvc::RD...WARNING Getting PixTBMaterials with default tag -GeoModelSvc::RD...WARNING Getting InDetMatComponents with default tag -GeoModelSvc::RD...WARNING Getting InDetMaterials with default tag -MuonGeoModel INFO MuonDetectorFactory - constructor MuonSystem OuterRadius 13000 Length 22030 -GeoModelSvc.Muo... INFO create MuonDetectorTool - package version = MuonGeoModel-00-00-00 -GeoModelSvc.Muo... INFO (from GeoModelSvc) AtlasVersion = <ATLAS-R2-2016-01-00-01> MuonVersion = <> -GeoModelSvc.Muo... INFO Keys for Muon Switches are (key) ATLAS-R2-2016-01-00-01 (node) ATLAS -GeoModelSvc.Muo... INFO (from GeoModelSvc) in AtlasVersion = <ATLAS-R2-2016-01-00-01> default MuonVersion is <MuonSpectrometer-R.08.01> -GeoModelSvc.Muo... INFO Properties have been set as follows: -GeoModelSvc.Muo... INFO LayoutName R -GeoModelSvc.Muo... INFO IncludeCutouts 0 -GeoModelSvc.Muo... INFO IncludeCutoutsBog 0 -GeoModelSvc.Muo... INFO IncludeCtbBis 0 -GeoModelSvc.Muo... INFO ControlAlines 111111 -GeoModelSvc.Muo... INFO MinimalGeoFlag 0 -GeoModelSvc.Muo... INFO EnableCscIntAlignment 1 -GeoModelSvc.Muo... INFO EnableCscIntAlignmentFromGM 0 -GeoModelSvc.Muo... INFO ControlCscIntAlines 111111 -GeoModelSvc.Muo... INFO EnableMdtDeformations 1 -GeoModelSvc.Muo... INFO EnableMdtAsBuiltParameters 1 -MuGM:MuonFactory INFO MuonLayout set to <R.08.01> = Development version for DC3 - infrastructures -MuGM:MuonFactory INFO BOG cutouts are activated 1 , all other cutouts are disabled 1 -MuGM:MuonFactory INFO Manager created for geometry version R.08.01 from DB MuonVersion <MuonSpectrometer-R.08.01> -MuonGeoModel.MYSQL INFO GeometryVersion set to <R.08.01> -MuGM:MuonFactory INFO Mysql helper class created here for geometry version R.08.01 from DB MuonVersion <MuonSpectrometer-R.08.01> -MuGM:MuonFactory INFO MDTIDHELPER retrieved from DetStore -EventPersistenc... INFO Added successfully Conversion service:ByteStreamCnvSvc -EventPersistenc... INFO Added successfully Conversion service:DetDescrCnvSvc -MDT_IDDetDescrCnv INFO in createObj: creating a MdtIdHelper object in the detector store -IdDictDetDescrCnv INFO in initialize -IdDictDetDescrCnv INFO in createObj: creating a IdDictManager object in the detector store -IdDictDetDescrCnv INFO IdDictName: IdDictParser/ATLAS_IDS.xml -IdDictDetDescrCnv INFO Reading InnerDetector IdDict file InDetIdDictFiles/IdDictInnerDetector_IBL3D25-03.xml -IdDictDetDescrCnv INFO Reading LArCalorimeter IdDict file IdDictParser/IdDictLArCalorimeter_DC3-05-Comm-01.xml -IdDictDetDescrCnv INFO Reading TileCalorimeter IdDict file IdDictParser/IdDictTileCalorimeter.xml -IdDictDetDescrCnv INFO Reading Calorimeter IdDict file IdDictParser/IdDictCalorimeter_L1Onl.xml -IdDictDetDescrCnv INFO Reading MuonSpectrometer IdDict file IdDictParser/IdDictMuonSpectrometer_R.03.xml -IdDictDetDescrCnv INFO Reading ForwardDetectors IdDict file IdDictParser/IdDictForwardDetectors_2010.xml -IdDictDetDescrCnv INFO Found id dicts: -IdDictDetDescrCnv INFO Using dictionary tag: null -IdDictDetDescrCnv INFO Dictionary ATLAS version default DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary Calorimeter version default DetDescr tag CaloIdentifier-LVL1-02 file IdDictParser/IdDictCalorimeter_L1Onl.xml -IdDictDetDescrCnv INFO Dictionary ForwardDetectors version default DetDescr tag ForDetIdentifier-01 file IdDictParser/IdDictForwardDetectors_2010.xml -IdDictDetDescrCnv INFO Dictionary InnerDetector version IBL-DBM DetDescr tag InDetIdentifier-IBL3D25-02 file InDetIdDictFiles/IdDictInnerDetector_IBL3D25-03.xml -IdDictDetDescrCnv INFO Dictionary LArCalorimeter version fullAtlas DetDescr tag LArIdentifier-DC3-05-Comm file IdDictParser/IdDictLArCalorimeter_DC3-05-Comm-01.xml -IdDictDetDescrCnv INFO Dictionary LArElectrode version fullAtlas DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary LArHighVoltage version fullAtlas DetDescr tag (using default) file -IdDictDetDescrCnv INFO Dictionary MuonSpectrometer version R.03 DetDescr tag MuonIdentifier-08 file IdDictParser/IdDictMuonSpectrometer_R.03.xml -IdDictDetDescrCnv INFO Dictionary TileCalorimeter version fullAtlasAndTestBeam DetDescr tag TileIdentifier-00 file IdDictParser/IdDictTileCalorimeter.xml -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -MdtIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 210 -MdtIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 241 -MdtIdHelper INFO MultiRange built successfully to tube: MultiRange size is 241 -MdtIdHelper INFO Initializing MDT hash indices ... -MdtIdHelper INFO The element hash max is 1188 -MdtIdHelper INFO The detector element hash max is 2328 -MdtIdHelper INFO Initializing MDT hash indices for finding neighbors ... -MuGM:MuonFactory INFO RPCIDHELPER retrieved from DetStore -RPC_IDDetDescrCnv INFO in createObj: creating a RpcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -RpcIdHelper INFO MultiRange built successfully to doubletR: MultiRange size is 241 -RpcIdHelper INFO MultiRange built successfully to detectorElement: DetectorElement MultiRange size is 241 -RpcIdHelper INFO MultiRange built successfully to rpcStrip: MultiRange size is 241 -RpcIdHelper INFO Initializing RPC hash indices ... -RpcIdHelper INFO The element hash max is 600 -RpcIdHelper INFO The detector element hash max is 1122 -RpcIdHelper INFO Initializing RPC hash indices for finding neighbors ... -MuGM:MuonFactory INFO TGCIDHELPER retrieved from DetStore -TGC_IDDetDescrCnv INFO in createObj: creating a TgcIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -TgcIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 210 -TgcIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 210 -TgcIdHelper INFO MultiRange built successfully to channel: MultiRange size is 241 -TgcIdHelper INFO Initializing TGC hash indices ... -TgcIdHelper INFO The element hash max is 1578 -TgcIdHelper INFO The detector element hash max is 1578 -TgcIdHelper INFO Initializing TGC hash indices for finding neighbors ... -MuGM:MuonFactory INFO CSCIDHELPER retrieved from DetStore -CSC_IDDetDescrCnv INFO in createObj: creating a CcscIdHelper object in the detector store -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0 -AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0 -AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! -AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! - AtlasDetectorID::initialize_from_dictionary - OK -CscIdHelper INFO MultiRange built successfully to Technology: MultiRange size is 210 -CscIdHelper INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 237 -CscIdHelper INFO MultiRange built successfully to cscStrip: MultiRange size is 241 -CscIdHelper INFO Initializing CSC hash indices ... -CscIdHelper INFO The element hash max is 32 -CscIdHelper INFO The detector element hash max is 64 -CscIdHelper INFO The channel hash max is 61440 -CscIdHelper INFO Initializing CSC hash indices for finding neighbors ... -MuGM:MuonFactory INFO **************** MuonDetectorFactory001 ************************ -MuGM:MuonFactory INFO *** Start building the Muon Geometry Tree ********************** -MuGM:RDBReadAtlas INFO Start retriving dbObjects with tag = <ATLAS-R2-2016-01-00-01> node <ATLAS> -RDBAccessSvc WARNING Could not get the tag for XtomoData node. Returning 0 pointer to IRDBQuery -MuGM:RDBReadAtlas INFO After getQuery XtomoData -In DblQ00Xtomo(data) -No XtomoData table in the MuonDD Database -MuGM:RDBReadAtlas INFO After new DblQ00Xtomo -MuGM:RDBReadAtlas INFO After m_dhxtomo.data() -MuGM:RDBReadAtlas INFO No Ascii aszt input found: looking for A-lines in ORACLE -MuGM:RDBReadAtlas INFO ASZT table found in Oracle -MuGM:RDBReadAtlas INFO ASZT size is 32 -MuGM:RDBReadAtlas INFO No Ascii iacsc input found: looking for A-lines in ORACLE -RDBAccessSvc WARNING Could not get the tag for ISZT node. Returning 0 pointer to IRDBQuery -MuGM:RDBReadAtlas INFO No ISZT table in Oracle -MuGM:RDBReadAtlas INFO Access granted for all dbObjects needed by muon detectors -MuonGeoModel.MYSQL INFO LayoutName (from DBAM) set to <R.08> -- relevant for CTB2004 -MuGM:ProcStations INFO Processing Stations and Components -MuGM:ProcStations INFO Processing Stations and Components DONE -MuGM:ProcTechnol.s INFO nMDT 13 nCSC 2 nTGC 22 nRPC 25 -MuGM:ProcTechnol.s INFO nDED 2 nSUP 4 nSPA 2 -MuGM:ProcTechnol.s INFO nCHV 7 nCRO 7 nCMI 6 nLBI 6 -MuGM:ProcPosition INFO *** N. of stations positioned in the setup 234 -MuGM:ProcPosition INFO *** N. of stations described in mysql 234 -MuGM:ProcPosition INFO *** N. of types 32 size of jtypvec 32 -MuGM:ProcPosition INFO *** : 234 kinds of stations (type*sub_type) -MuGM:ProcPosition INFO *** : 1758 physical stations in space - according to the MuonDD DataBase -MuGM:ProcCutouts INFO Processing Cutouts for geometry layout R.08 -MuGM:ProcCutouts INFO Processing Cutouts DONE -MuGM:RDBReadAtlas INFO ProcessTGCreadout - version 7 wirespacing 1.8 -MuGM:RDBReadAtlas INFO Intermediate Objects built from primary numbers -MuGM:MuonFactory INFO theMaterialManager retrieven successfully from the DetStore -MuGM:MuonFactory INFO MuonSystem description from OracleTag=<ATLAS-R2-2016-01-00-01> and node=<ATLAS> -MuGM:MuonFactory INFO TreeTop added to the Manager -MuGM:MuonFactory INFO Muon Layout R.08.01 -MuGM:MuonFactory INFO Fine Clash Fixing disabled: (should be ON/OFF for Simulation/Reconstruction) -MuGM:MuonFactory INFO **************** MuonDetectorFactory001 **************************** -MuGM:MuonFactory INFO *** The Muon Chamber Geometry Tree is built with -MuGM:MuonFactory INFO *** 1758 child volumes -MuGM:MuonFactory INFO *** 1839 independent elements and -MuGM:MuonFactory INFO *** 11473 elements cloned or shared -MuGM:MuonFactory INFO *** 234 kinds of stations -MuGM:MuonFactory INFO *** 1758 stations with alignable transforms -MuGM:MuonFactory INFO *** 148 stations are described as Assemblies -MuGM:MuonFactory INFO *** 1758 MuonStations -MuGM:MuonFactory INFO *** 2324 MDT Readout Elements 1186 MDT Detector Elements -MuGM:MuonFactory INFO *** 32 CSC Readout Elements 32 CSC Detector Elements -MuGM:MuonFactory INFO *** 1122 RPC Readout Elements 600 RPC Detector Elements -MuGM:MuonFactory INFO *** 1578 TGC Readout Elements 1578 TGC Detector Elements -MuGM:MuonFactory INFO ******************************************************************** -MuGM:MuonFactory INFO *** Inert Material built according to DB switches and config. ****** -MuGM:MuonFactory INFO *** The Muon Geometry Tree has 1758 child vol.s in total ******** -MuGM:MuonFactory INFO ******************************************************************** - -MGM::MuonDetect... INFO Init A/B Line Containers - done - size is respectively 1758/0 -MGM::MuonDetect... INFO Init of CSC I-Lines will be done via Conditions DB -MGM::MuonDetect... INFO Init I-Line Container - done - size is respectively 128 -MGM::MuonDetect... INFO I-Line for CSC wire layers loaded (Csc Internal Alignment) -MGM::MuonDetect... INFO According to configuration they WILL be used -MGM::MuonDetect... INFO Filling cache -GeoModelSvc INFO GeoModelSvc.MuonDetectorTool SZ= 228440Kb Time = 1.65S -ClassIDSvc INFO getRegistryEntries: read 3099 CLIDRegistry entries for module ALL -AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 -ClassIDSvc INFO getRegistryEntries: read 839 CLIDRegistry entries for module ALL -ClassIDSvc INFO getRegistryEntries: read 422 CLIDRegistry entries for module ALL -ClassIDSvc INFO getRegistryEntries: read 305 CLIDRegistry entries for module ALL -ClassIDSvc INFO getRegistryEntries: read 291 CLIDRegistry entries for module ALL -CondInputLoader INFO Initializing CondInputLoader... -CondInputLoader INFO Adding base classes: - + ( 'CondAttrListCollection' , 'ConditionStore+/CSC/FTHOLD' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/CSC/NOISE' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/CSC/PED' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/CSC/PSLOPE' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/CSC/RMS' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/CSC/STAT' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/CSC/T0BASE' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/CSC/T0PHASE' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/EXT/DCS/MAGNETS/SENSORDATA' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/GLOBAL/BField/Maps' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/MDT/CABLING/MAP_SCHEMA' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/MDT/CABLING/MEZZANINE_SCHEMA' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/MDT/RTBLOB' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/MDT/T0BLOB' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/CSC/ILINES' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/ASBUILTPARAMS' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/BARREL' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/ENDCAP/SIDEA' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/ENDCAP/SIDEC' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/TGC/SIDEA' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/TGC/SIDEC' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/RPC/CABLING/MAP_SCHEMA' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/RPC/CABLING/MAP_SCHEMA_CORR' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/RPC/DCS/DeadRopanels' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/RPC/DCS/OffRopanels' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/RPC/DQMF/ELEMENT_STATUS' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/RPC/TRIGGER/CM_THR_ETA' ) -> - + ( 'CondAttrListCollection' , 'ConditionStore+/RPC/TRIGGER/CM_THR_PHI' ) -> -CondInputLoader INFO Will create WriteCondHandle dependencies for the following DataObjects: - + ( 'CondAttrListCollection' , 'ConditionStore+/CSC/FTHOLD' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/CSC/NOISE' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/CSC/PED' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/CSC/PSLOPE' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/CSC/RMS' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/CSC/STAT' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/CSC/T0BASE' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/CSC/T0PHASE' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/EXT/DCS/MAGNETS/SENSORDATA' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/GLOBAL/BField/Maps' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/MDT/CABLING/MAP_SCHEMA' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/MDT/CABLING/MEZZANINE_SCHEMA' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/MDT/RTBLOB' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/MDT/T0BLOB' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/CSC/ILINES' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/ASBUILTPARAMS' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/BARREL' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/ENDCAP/SIDEA' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/ENDCAP/SIDEC' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/TGC/SIDEA' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/TGC/SIDEC' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/RPC/CABLING/MAP_SCHEMA' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/RPC/CABLING/MAP_SCHEMA_CORR' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/RPC/DCS/DeadRopanels' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/RPC/DCS/OffRopanels' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/RPC/DQMF/ELEMENT_STATUS' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/RPC/TRIGGER/CM_THR_ETA' ) - + ( 'CondAttrListCollection' , 'ConditionStore+/RPC/TRIGGER/CM_THR_PHI' ) -MuonAlignmentCo... INFO Initilalizing -MuonAlignmentCo... INFO In initialize ---- # of folders registered is 7 -MuonAlignmentCo... INFO geometry version from the MuonDetectorManager = R.08.01 -MuonDetectorCon... INFO Initializing ... -AtlasFieldMapCo... INFO Initialize -AtlasFieldMapCo... INFO Initialize: Key ( 'AtlasFieldMapCondObj' , 'ConditionStore+fieldMapCondObj' ) has been succesfully registered -AtlasFieldMapCo... INFO Initialize: Will update the field map from conditions -AtlasFieldCache... INFO Initialize -AtlasFieldCache... INFO Initialize: Key ( 'AtlasFieldCacheCondObj' , 'ConditionStore+fieldCondObj' ) has been succesfully registered -AtlasFieldCache... INFO Initialize: Will update current from conditions -AtlasFieldCache... INFO Initialize: useDCS, useSoleCurrent, useToroCurrent. 1, 'UseSoleCurrent':7730.0000, 'UseToroCurrent':20400.000 LockMapCurrents 0 -ClassIDSvc INFO getRegistryEntries: read 7927 CLIDRegistry entries for module ALL -ClassIDSvc INFO getRegistryEntries: read 1043 CLIDRegistry entries for module ALL RpcRawDataProvider INFO RpcRawDataProvider::initialize RpcRawDataProvider INFO 'DoSeededDecoding':False -ClassIDSvc INFO getRegistryEntries: read 2156 CLIDRegistry entries for module ALL -ROBDataProviderSvc INFO Initializing ROBDataProviderSvc - package version ByteStreamCnvSvcBase-00-00-00 -ROBDataProviderSvc INFO ---> Filter out empty ROB fragments = 'filterEmptyROB':False -ROBDataProviderSvc INFO ---> Filter out specific ROBs by Status Code: # ROBs = 0 -ROBDataProviderSvc INFO ---> Filter out Sub Detector ROBs by Status Code: # Sub Detectors = 0 RpcRawDataProvi... INFO initialize() successful in RpcRawDataProvider.RPC_RawDataProviderToolMT TgcRawDataProvider INFO TgcRawDataProvider::initialize TgcRawDataProvider INFO 'DoSeededDecoding':False -ClassIDSvc INFO getRegistryEntries: read 1223 CLIDRegistry entries for module ALL TgcRawDataProvi... INFO initialize() successful in TgcRawDataProvider.TGC_RawDataProviderToolMT.TgcROD_Decoder -MuonTGC_CablingSvc INFO for 1/12 sector initialize -ToolSvc.TGCCabl... INFO initialize -ToolSvc.TGCCabl... INFO readTGCMap from text -ToolSvc.TGCCabl... INFO readTGCMap found file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-06-02T2139/Athena/22.0.15/InstallArea/x86_64-centos7-gcc8-opt/share/ASD2PP_diff_12_ONL.db -ToolSvc.TGCCabl... INFO giveASD2PP_DIFF_12 (m_ASD2PP_DIFF_12 is not NULL) TgcRawDataProvi... INFO initialize() successful in TgcRawDataProvider.TGC_RawDataProviderToolMT MdtRawDataProvider INFO MdtRawDataProvider::initialize MdtRawDataProvider INFO 'DoSeededDecoding':False -ClassIDSvc INFO getRegistryEntries: read 1376 CLIDRegistry entries for module ALL MdtRawDataProvi... INFO Retrieved service ServiceHandle('ROBDataProviderSvc') MdtRawDataProvi... INFO Processing configuration for layouts with BME chambers. MdtRawDataProvi... INFO Processing configuration for layouts with BMG chambers. MdtRawDataProvi... INFO Retrieved tool Decoder = PrivateToolHandle('MdtROD_Decoder/MdtROD_Decoder') MdtRawDataProvi... INFO initialize() successful in MdtRawDataProvider.MDT_RawDataProviderToolMT -ClassIDSvc INFO getRegistryEntries: read 1048 CLIDRegistry entries for module ALL CscRawDataProvi... INFO Retrieved service ServiceHandle('ROBDataProviderSvc') CscRawDataProvi... INFO Retrieved tool Decoder = PrivateToolHandle('Muon::CscROD_Decoder/CscROD_Decoder') CscRawDataProvi... INFO The Muon Geometry version is R.08.01 CscRawDataProvi... INFO initialize() successful in CscRawDataProvider.CSC_RawDataProviderToolMT -ClassIDSvc INFO getRegistryEntries: read 53 CLIDRegistry entries for module ALL -RpcRdoToRpcPrep... INFO package version = MuonRPC_CnvTools-00-00-00 RpcRdoToRpcPrep... INFO properties are RpcRdoToRpcPrep... INFO produceRpcCoinDatafromTriggerWords 1 RpcRdoToRpcPrep... INFO reduceCablingOverlap 1 @@ -552,21 +24,6 @@ RpcRdoToRpcPrep... INFO timeShift -12.5 RpcRdoToRpcPrep... INFO etaphi_coincidenceTime 20 RpcRdoToRpcPrep... INFO overlap_timeTolerance 10 RpcRdoToRpcPrep... INFO Correct prd time from cool db 0 -MuonRPC_CablingSvc INFO Initializing MuonRPC_CablingSvc - package version MuonRPC_Cabling-00-00-00 -ToolSvc.RPCCabl... INFO Initializing - folders names are: conf /RPC/CABLING/MAP_SCHEMA / corr /RPC/CABLING/MAP_SCHEMA_CORR -MuonRPC_CablingSvc INFO RPCCablingDbTool retrieved with handle TheRpcCablingDbTool = PublicToolHandle('RPCCablingDbTool/RPCCablingDbTool') -MuonRPC_CablingSvc INFO Register call-back against 2 folders listed below -MuonRPC_CablingSvc INFO Folder n. 1 </RPC/CABLING/MAP_SCHEMA> found in the DetStore -ClassIDSvc INFO getRegistryEntries: read 239 CLIDRegistry entries for module ALL -MuonRPC_CablingSvc INFO initMappingModel registered for call-back against folder </RPC/CABLING/MAP_SCHEMA> -MuonRPC_CablingSvc INFO Folder n. 2 </RPC/CABLING/MAP_SCHEMA_CORR> found in the DetStore -MuonRPC_CablingSvc INFO initMappingModel registered for call-back against folder </RPC/CABLING/MAP_SCHEMA_CORR> -MuonRPC_CablingSvc INFO RPCTriggerDbTool retrieved with statusCode = SUCCESS pointer = TheRpcTriggerDbTool = PublicToolHandle('RPCTriggerDbTool') -MuonRPC_CablingSvc INFO Register call-back against 2 folders listed below -MuonRPC_CablingSvc INFO Folder n. 1 </RPC/TRIGGER/CM_THR_ETA> found in the DetStore -MuonRPC_CablingSvc INFO initTrigRoadsModel registered for call-back against folder </RPC/TRIGGER/CM_THR_ETA> -MuonRPC_CablingSvc INFO Folder n. 2 </RPC/TRIGGER/CM_THR_PHI> found in the DetStore -MuonRPC_CablingSvc INFO initTrigRoadsModel registered for call-back against folder </RPC/TRIGGER/CM_THR_PHI> RpcRdoToRpcPrep... INFO Retrieved DecodingTool = PrivateToolHandle('Muon::RpcRdoToPrepDataToolMT/RpcRdoToRpcPrepDataTool') TgcRdoToTgcPrep... INFO initialize() successful in TgcRdoToTgcPrepData.TgcRdoToTgcPrepDataTool TgcRdoToTgcPrep... INFO Retrieved DecodingTool = PrivateToolHandle('Muon::TgcRdoToPrepDataToolMT/TgcRdoToTgcPrepDataTool') @@ -574,483 +31,8 @@ MdtRdoToMdtPrep... INFO Processing configuration for layouts with BMG chambers MdtRdoToMdtPrep... INFO Processing configuration for layouts with BME chambers. MdtRdoToMdtPrep... INFO Processing configuration for layouts with BMG chambers. MdtRdoToMdtPrep... INFO Retrieved DecodingTool = PrivateToolHandle('Muon::MdtRdoToPrepDataToolMT/MdtRdoToMdtPrepDataTool') -ClassIDSvc INFO getRegistryEntries: read 166 CLIDRegistry entries for module ALL -MdtRdoToMdtPrep...WARNING Lookup table will not be initialised MdtRdoToMdtPrepData.RegSelTool_MDT key 'ConditionStore+Tool_Not_Initalised' CscRdoToCscPrep... INFO The Geometry version is MuonSpectrometer-R.08.01 -ClassIDSvc INFO getRegistryEntries: read 114 CLIDRegistry entries for module ALL CscRdoToCscPrep... INFO Retrieved CscRdoToCscPrepDataTool = PrivateToolHandle('Muon::CscRdoToCscPrepDataToolMT/CscRdoToCscPrepDataTool') -EventSelector WARNING InputCollections not properly set, checking EventStorageInputSvc properties -EventSelector INFO reinitialization... -ClassIDSvc INFO getRegistryEntries: read 440 CLIDRegistry entries for module ALL -EventSelector INFO Retrieved InputCollections from InputSvc -ByteStreamInputSvc INFO Initializing ByteStreamInputSvc - package version ByteStreamCnvSvc-00-00-00 -EventSelector INFO reinitialization... -AthenaEventLoopMgr INFO Setup EventSelector service EventSelector -ApplicationMgr INFO Application Manager Initialized successfully -ApplicationMgr SUCCESS ****************************** Algorithm Sequence **************************** -ApplicationMgr SUCCESS AthSequencer/AthMasterSeq -ApplicationMgr SUCCESS AthSequencer/AthAlgEvtSeq -ApplicationMgr SUCCESS AthSequencer/AthBeginSeq -ApplicationMgr SUCCESS AthIncFirerAlg/BeginIncFiringAlg -ApplicationMgr SUCCESS IncidentProcAlg/IncidentProcAlg1 -ApplicationMgr SUCCESS AthSequencer/AthAllAlgSeq -ApplicationMgr SUCCESS AthSequencer/AthCondSeq -ApplicationMgr SUCCESS CondInputLoader/CondInputLoader -ApplicationMgr SUCCESS MuonAlignmentCondAlg/MuonAlignmentCondAlg -ApplicationMgr SUCCESS MuonDetectorCondAlg/MuonDetectorCondAlg -ApplicationMgr SUCCESS RpcCablingCondAlg/RpcCablingCondAlg -ApplicationMgr SUCCESS MuonMDT_CablingAlg/MuonMDT_CablingAlg -ApplicationMgr SUCCESS MagField::AtlasFieldMapCondAlg/AtlasFieldMapCondAlg -ApplicationMgr SUCCESS MagField::AtlasFieldCacheCondAlg/AtlasFieldCacheCondAlg -ApplicationMgr SUCCESS RpcCondDbAlg/RpcCondDbAlg -ApplicationMgr SUCCESS MdtCalibDbAlg/MdtCalibDbAlg -ApplicationMgr SUCCESS CscCondDbAlg/CscCondDbAlg -ApplicationMgr SUCCESS AthSequencer/AthAlgSeq -ApplicationMgr SUCCESS MuonCacheCreator/MuonCacheCreator -ApplicationMgr SUCCESS Muon::RpcRawDataProvider/RpcRawDataProvider -ApplicationMgr SUCCESS Muon::TgcRawDataProvider/TgcRawDataProvider -ApplicationMgr SUCCESS Muon::MdtRawDataProvider/MdtRawDataProvider -ApplicationMgr SUCCESS Muon::CscRawDataProvider/CscRawDataProvider -ApplicationMgr SUCCESS RpcRdoToRpcPrepData/RpcRdoToRpcPrepData -ApplicationMgr SUCCESS TgcRdoToTgcPrepData/TgcRdoToTgcPrepData -ApplicationMgr SUCCESS MdtRdoToMdtPrepData/MdtRdoToMdtPrepData -ApplicationMgr SUCCESS CscRdoToCscPrepData/CscRdoToCscPrepData -ApplicationMgr SUCCESS CscThresholdClusterBuilder/CscThresholdClusterBuilder -ApplicationMgr SUCCESS AthSequencer/AthEndSeq -ApplicationMgr SUCCESS AthIncFirerAlg/EndIncFiringAlg -ApplicationMgr SUCCESS IncidentProcAlg/IncidentProcAlg2 -ApplicationMgr SUCCESS AthSequencer/AthOutSeq -ApplicationMgr SUCCESS AthSequencer/AthRegSeq -ApplicationMgr SUCCESS ****************************************************************************** -ByteStreamInputSvc INFO Picked valid file: /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1 -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/CSC/FTHOLD' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/CSC/NOISE' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/CSC/PED' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/CSC/PSLOPE' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/CSC/RMS' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/CSC/STAT' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/CSC/T0BASE' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/CSC/T0PHASE' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/EXT/DCS/MAGNETS/SENSORDATA' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/GLOBAL/BField/Maps' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/MDT/CABLING/MAP_SCHEMA' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/MDT/CABLING/MEZZANINE_SCHEMA' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/MDT/RTBLOB' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/MDT/T0BLOB' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/MUONALIGN/CSC/ILINES' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/MUONALIGN/MDT/ASBUILTPARAMS' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/MUONALIGN/MDT/BARREL' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/MUONALIGN/MDT/ENDCAP/SIDEA' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/MUONALIGN/MDT/ENDCAP/SIDEC' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/MUONALIGN/TGC/SIDEA' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/MUONALIGN/TGC/SIDEC' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/RPC/CABLING/MAP_SCHEMA' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/RPC/CABLING/MAP_SCHEMA_CORR' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/RPC/DCS/DeadRopanels' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/RPC/DCS/OffRopanels' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/RPC/DQMF/ELEMENT_STATUS' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/RPC/TRIGGER/CM_THR_ETA' -CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/RPC/TRIGGER/CM_THR_PHI' -ApplicationMgr INFO Application Manager Started successfully -EventInfoByteSt... INFO IsSimulation : 0 -EventInfoByteSt... INFO IsTestbeam : 0 -EventInfoByteSt... INFO IsCalibration : 0 -AthenaEventLoopMgr INFO ===>>> start of run 327265 <<<=== -EventPersistenc... INFO Added successfully Conversion service:TagInfoMgr -IOVDbSvc INFO Opening COOL connection for COOLONL_RPC/CONDBR2 -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to RPCCablingMapSchema_2016_2017_01 for folder /RPC/CABLING/MAP_SCHEMA -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to RPCCablingMapSchemaCorr_2016_2017_01 for folder /RPC/CABLING/MAP_SCHEMA_CORR -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to RPCTriggerCMThrEta_RUN1-RUN2-HI-02 for folder /RPC/TRIGGER/CM_THR_ETA -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to RPCTriggerCMThrPhi_RUN1-RUN2-HI-02 for folder /RPC/TRIGGER/CM_THR_PHI -IOVDbSvc INFO Disconnecting from COOLONL_RPC/CONDBR2 -EventPersistenc... INFO Added successfully Conversion service:AthenaPoolCnvSvc -MuonRPC_CablingSvc INFO initMappingModel has been called -MuonRPC_CablingSvc INFO ToolHandle in initMappingModel - <TheRpcCablingDbTool = PublicToolHandle('RPCCablingDbTool/RPCCablingDbTool')> -MuonRPC_CablingSvc INFO Retrieving cabling singleton; to create an empty one or to get the existing one -RPCcabling INFO CablingRPC---singleton constructor ---- this must be executed just once -RPCcabling INFO CablingRPC---The singleton will fill the maps from the COOL streams -RPCcabling INFO CablingRPC---InitMaps from COOL cannot be executed NOW: empty string -RPCcabling INFO CablingRPC---The singleton is created here -RPCcabling INFO CablingRPC--- cacheCleared: s_status = 0 -MuonRPC_CablingSvc INFO Cabling singleton cache has been cleared -MuonRPC_CablingSvc INFO Trigger roads will be loaded from COOL -ToolSvc.RPCCabl... INFO LoadParameters /RPC/CABLING/MAP_SCHEMA I=2 -ToolSvc.RPCCabl... INFO loadRPCMap --- Load Map from DB -ToolSvc.RPCCabl... INFO Try to read from folder </RPC/CABLING/MAP_SCHEMA> -ToolSvc.RPCCabl... INFO CondAttrListCollection from DB folder have been obtained with size 1 -ToolSvc.RPCCabl... INFO After Reading folder, Configuration string size is 222202 -ToolSvc.RPCCabl... INFO LoadParameters /RPC/CABLING/MAP_SCHEMA_CORR I=2 -ToolSvc.RPCCabl... INFO loadRPCCorr --- Load Corrections from DB -ToolSvc.RPCCabl... INFO Try to read from folder </RPC/CABLING/MAP_SCHEMA_CORR> -ToolSvc.RPCCabl... INFO CondAttrListCollection from DB folder have been obtained with size 1 -ToolSvc.RPCCabl... INFO After Reading folder, Correction string size is 29369 -MuonRPC_CablingSvc INFO InitMappingModel: Trigger roads not yet loaded from COOL - postpone cabling initialization -MuonRPC_CablingSvc INFO initTrigRoadsModel has been called -MuonRPC_CablingSvc INFO Trigger roads will be loaded from COOL -MuonRPC_CablingSvc INFO Retrieve the pointer to the cabling singleton -RPCcabling INFO CablingRPC--- cacheCleared: s_status = 0 -MuonRPC_CablingSvc INFO Cabling singleton cache has been cleared -ToolSvc.RPCTrig... INFO LoadParameters /RPC/TRIGGER/CM_THR_ETA I=2 -ToolSvc.RPCTrig... INFO LoadParameters /RPC/TRIGGER/CM_THR_PHI I=2 -MuonRPC_CablingSvc INFO ======== RPC Trigger Roads from COOL - Header infos ======== -MuonRPC_CablingSvc INFO -RPC LVL1 Configuration 10.6 with roads from Feb 2012 -L1 THRESHOLDS: MU4 MU6 MU10 MU11 MU15 MU20 -Road version: "road_files_120209" -CMA th0 th1 th2 -eta low-pt mu4 mu6 mu10 -phi low-pt mu4 mu6 mu10 -eta high-pt mu11 mu15 mu20 -phi high-pt mu11 mu15 mu15 - - -RPCcabling INFO CablingRPC---InitMaps from COOL: going to read configuration -RPCcabling INFO CablingRPC--->> RPC cabling map from COOL << -RPCcabling INFO CablingRPC--- ReadConf: map has size 222202 -RPCcabling INFO CablingRPC--- ReadConf: map n. of lines read is 924 -RPCcabling INFO CablingRPC--- ReadConf: version is 5.0 Atlas R_07_03_RUN2ver104 -RPCcabling INFO CablingRPC--- buildRDOmap -RPCcabling INFO CablingRPC---InitMaps from COOL: going to read corrections to configuration -RPCcabling INFO CablingRPC--->> RPC cabling corrections from COOL << -RPCcabling INFO CablingRPC--- ReadCorr: CorrMap has size 29369 -RPCcabling INFO CablingRPC--- ReadConf: CorrMap n. of lines read is 743 -RPCcabling INFO CablingRPC---InitMaps from COOL - maps have been parsed -MuonRPC_CablingSvc INFO InitTrigRoadsModel: RPC cabling model is loaded! -Level-1 configuration database version 5.0 Atlas R_07_03_RUN2ver104 read. -Contains 26 Trigger Sector Types: -negative sectors 0 - 15 ==> 18 2 24 3 19 2 24 4 20 2 24 1 18 5 25 6 -negative sectors 16 - 31 ==> 21 13 26 6 21 7 16 8 14 7 16 6 21 13 26 1 -positive sectors 32 - 47 ==> 9 24 2 22 9 24 2 23 10 24 2 18 1 25 5 18 -positive sectors 48 - 63 ==> 1 26 13 21 6 17 12 15 11 17 12 21 6 26 13 22 - -MuonRPC_CablingSvc INFO buildOfflineOnlineMap -MuonRPC_CablingSvc INFO Applying FeetPadThresholds : 0,2,5 -MuonRPC_CablingSvc INFO MuonRPC_CablingSvc initialized succesfully -AthenaEventLoopMgr INFO ===>>> start processing event #186525031, run #327265 0 events processed so far <<<=== -IOVDbSvc INFO Opening COOL connection for COOLOFL_CSC/CONDBR2 -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to CscFthold-RUN2-BLK-UPD1-007-00 for folder /CSC/FTHOLD -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to CscNoise-RUN2-BLK-UPD1-007-00 for folder /CSC/NOISE -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to CscPed-RUN2-BLK-UPD1-007-00 for folder /CSC/PED -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to CscPslope-RUN2-BLK-UPD1-000-00 for folder /CSC/PSLOPE -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to CscRms-RUN2-BLK-UPD1-003-00 for folder /CSC/RMS -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to CscStat-RUN2-BLK-UPD1-008-00 for folder /CSC/STAT -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to CscT0base-RUN2-BLK-UPD1-001-00 for folder /CSC/T0BASE -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to CscT0phase-RUN2-BLK-UPD2-001-00 for folder /CSC/T0PHASE -IOVDbSvc INFO Disconnecting from COOLOFL_CSC/CONDBR2 -IOVDbSvc INFO Opening COOL connection for COOLOFL_DCS/CONDBR2 -IOVDbSvc INFO Disconnecting from COOLOFL_DCS/CONDBR2 -IOVDbSvc INFO Opening COOL connection for COOLONL_GLOBAL/CONDBR2 -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to BFieldMap-Run1-14m-v01 for folder /GLOBAL/BField/Maps -IOVDbSvc INFO Disconnecting from COOLONL_GLOBAL/CONDBR2 -IOVDbSvc INFO Opening COOL connection for COOLONL_MDT/CONDBR2 -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to MDTCablingMapSchema_BMG_01 for folder /MDT/CABLING/MAP_SCHEMA -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to MDTCablingMezzanineSchema_M5-RUN2 for folder /MDT/CABLING/MEZZANINE_SCHEMA -IOVDbSvc INFO Disconnecting from COOLONL_MDT/CONDBR2 -IOVDbSvc INFO Opening COOL connection for COOLOFL_MDT/CONDBR2 -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to MDTRT-RUN2-UPD4-21 for folder /MDT/RTBLOB -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to MDTT0-RUN2-UPD4-21 for folder /MDT/T0BLOB -IOVDbSvc INFO Disconnecting from COOLOFL_MDT/CONDBR2 -IOVDbSvc INFO Opening COOL connection for COOLOFL_MUONALIGN/CONDBR2 -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to MuonAlignCscIlines-UPD1-02 for folder /MUONALIGN/CSC/ILINES -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to MuonAlignMdtAsbuiltparams-RUN2-BA_ONLY-UPD4-00 for folder /MUONALIGN/MDT/ASBUILTPARAMS -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to MuonAlignMDTBarrelAlign-RUN2-BA_ROLLING_11-BLKP-UPD4-00 for folder /MUONALIGN/MDT/BARREL -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to MuonAlignMDTEndCapAAlign-RUN2-ECA_ROLLING_2015_03_01-UPD4-02 for folder /MUONALIGN/MDT/ENDCAP/SIDEA -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to MuonAlignMDTEndCapCAlign-RUN2-ECC_ROLLING_2015_03_01-UPD4-02 for folder /MUONALIGN/MDT/ENDCAP/SIDEC -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to MuonAlignTGCEndCapAAlign-RUN2-TGCA_ROLLING_2011_01-ES1-UPD1-03 for folder /MUONALIGN/TGC/SIDEA -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to MuonAlignTGCEndCapCAlign-RUN2-TGCC_ROLLING_2011_01-ES1-UPD1-03 for folder /MUONALIGN/TGC/SIDEC -IOVDbSvc INFO Disconnecting from COOLOFL_MUONALIGN/CONDBR2 -IOVDbSvc INFO Opening COOL connection for COOLOFL_RPC/CONDBR2 -IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to RPCDQMFElementStatus_Run1_UPD4-RUN2-01 for folder /RPC/DQMF/ELEMENT_STATUS -IOVDbSvc INFO Disconnecting from COOLOFL_RPC/CONDBR2 -MuonAlignmentCo... INFO Load alignment parameters from DB folder </MUONALIGN/CSC/ILINES> -MuonAlignmentCo... INFO Size of CSC/ILINES CondAttrListCollection ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/CSC/ILINES' ) readCscILinesCdo->size()= 1 -MuonAlignmentCo... INFO Range of CSC/ILINES input is {[0,0,t:1425168000] - [t:4294967294.854775807]} -MGM::MuonDetect... INFO temporary CSC I-line container with size = 128 -MGM::MuonDetect... INFO # of CSC I-lines read from the ILineMapContainer in StoreGate is 128 -MGM::MuonDetect... INFO # of deltaTransforms updated according to A-lines is 128 -MGM::MuonDetect... INFO # of entries in the CSC I-lines historical container is 128 -MuonAlignmentCo... INFO recorded new CscInternalAlignmentMapContainer with range {[0,0,t:1425168000] - [t:4294967294.854775807]} into Conditions Store -MuonAlignmentCo... INFO Load alignment parameters from DB folder </MUONALIGN/MDT/ASBUILTPARAMS> -MuonAlignmentCo... INFO Size of MDT/ASBUILTPARAMS CondAttrListCollection ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/ASBUILTPARAMS' ) ->size()= 1 -MuonAlignmentCo... INFO Range of MDT/ASBUILTPARAMS input is {[0,0,t:0] - [t:4294967294.854775807]} -MGM::MuonDetect... INFO temporary As-Built container with size = 628 -MGM::MuonDetect... INFO # of MDT As-Built read from the MdtAsBuiltMapContainer in StoreGate is 628 -MGM::MuonDetect... INFO # of deltaTransforms updated according to As-Built is 628 -MGM::MuonDetect... INFO # of entries in the MdtAsBuilt historical container is 628 -MuonAlignmentCo... INFO recorded new MdtAsBuiltMapContainer with range {[0,0,t:0] - [t:4294967294.854775807]} into Conditions Store -MuonAlignmentCo... INFO Load alignment parameters from DB folder </MUONALIGN/MDT/BARREL> -MuonAlignmentCo... INFO Size of /MUONALIGN/MDT/BARREL CondAttrListCollection ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/BARREL' ) readCdo->size()= 1 -MuonAlignmentCo... INFO Range of /MUONALIGN/MDT/BARREL input is, ALines: {[0,0,t:1497851700] - [t:1498737300]} BLines: {[0,0,t:1497851700] - [t:1498737300]} -MuonAlignmentCo... INFO Data read from folder /MUONALIGN/MDT/BARREL have IoV = 195569 -MuonAlignmentCo... INFO A- and B-Lines parameters from DB folder </MUONALIGN/MDT/BARREL> loaded -MuonAlignmentCo... INFO Load alignment parameters from DB folder </MUONALIGN/MDT/ENDCAP/SIDEA> -MuonAlignmentCo... INFO Size of /MUONALIGN/MDT/ENDCAP/SIDEA CondAttrListCollection ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/ENDCAP/SIDEA' ) readCdo->size()= 1 -MuonAlignmentCo... INFO Range of /MUONALIGN/MDT/ENDCAP/SIDEA input is, ALines: {[0,0,t:1497891240] - [t:1497898380]} BLines: {[0,0,t:1497891240] - [t:1497898380]} -MuonAlignmentCo... INFO Data read from folder /MUONALIGN/MDT/ENDCAP/SIDEA have IoV = 195588 -MuonAlignmentCo... INFO A- and B-Lines parameters from DB folder </MUONALIGN/MDT/ENDCAP/SIDEA> loaded -MuonAlignmentCo... INFO Load alignment parameters from DB folder </MUONALIGN/MDT/ENDCAP/SIDEC> -MuonAlignmentCo... INFO Size of /MUONALIGN/MDT/ENDCAP/SIDEC CondAttrListCollection ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/ENDCAP/SIDEC' ) readCdo->size()= 1 -MuonAlignmentCo... INFO Range of /MUONALIGN/MDT/ENDCAP/SIDEC input is, ALines: {[0,0,t:1497892260] - [t:1497899460]} BLines: {[0,0,t:1497892260] - [t:1497899460]} -MuonAlignmentCo... INFO Data read from folder /MUONALIGN/MDT/ENDCAP/SIDEC have IoV = 195599 -MuonAlignmentCo... INFO A- and B-Lines parameters from DB folder </MUONALIGN/MDT/ENDCAP/SIDEC> loaded -MuonAlignmentCo... INFO Load alignment parameters from DB folder </MUONALIGN/TGC/SIDEA> -MuonAlignmentCo... INFO No BLines decoding will be attempted for folder named /MUONALIGN/TGC/SIDEA -MuonAlignmentCo... INFO Size of /MUONALIGN/TGC/SIDEA CondAttrListCollection ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/TGC/SIDEA' ) readCdo->size()= 1 -MuonAlignmentCo... INFO Range of /MUONALIGN/TGC/SIDEA input is, ALines: {[0,0,t:0] - [t:4294967294.854775807]} -MuonAlignmentCo... INFO Data read from folder /MUONALIGN/TGC/SIDEA have IoV = 82360 -MuonAlignmentCo... INFO A- and B-Lines parameters from DB folder </MUONALIGN/TGC/SIDEA> loaded -MuonAlignmentCo... INFO Load alignment parameters from DB folder </MUONALIGN/TGC/SIDEC> -MuonAlignmentCo... INFO No BLines decoding will be attempted for folder named /MUONALIGN/TGC/SIDEC -MuonAlignmentCo... INFO Size of /MUONALIGN/TGC/SIDEC CondAttrListCollection ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/TGC/SIDEC' ) readCdo->size()= 1 -MuonAlignmentCo... INFO Range of /MUONALIGN/TGC/SIDEC input is, ALines: {[0,0,t:0] - [t:4294967294.854775807]} -MuonAlignmentCo... INFO Data read from folder /MUONALIGN/TGC/SIDEC have IoV = 82359 -MuonAlignmentCo... INFO A- and B-Lines parameters from DB folder </MUONALIGN/TGC/SIDEC> loaded -MGM::MuonDetect... INFO temporary A-line container with size = 2694 -MGM::MuonDetect... INFO # of A-lines read from the ALineMapContainer in StoreGate is 2694 -MGM::MuonDetect... INFO # of deltaTransforms updated according to A-lines is 2694 -MGM::MuonDetect... INFO # of entries in the A-lines historical container is 2814 -MuonAlignmentCo... INFO recorded new ALineMapContainer with range {[0,0,t:1497892260,l:0] - [t:1497898380]} into Conditions Store -MGM::MuonDetect... INFO In updateDeformations() -MGM::MuonDetect... INFO temporary B-line container with size = 1206 -MGM::MuonDetect... INFO # of B-lines read from the ALineMapContainer in StoreGate is 1206 -MGM::MuonDetect... INFO # of deform-Transforms updated according to B-lines is 1174 -MGM::MuonDetect... INFO # of entries in the B-lines historical container is 1174 -MuonAlignmentCo... INFO recorded new BLineMapContainer with range {[0,0,t:1497892260,l:0] - [t:1497898380]} into Conditions Store -MuonGeoModel INFO MuonDetectorFactory - constructor MuonSystem OuterRadius 13000 Length 22030 -MuonDetectorCon... INFO create MuonDetectorTool - package version = MuonGeoModel-00-00-00 -MuonDetectorCon... INFO (from GeoModelSvc) AtlasVersion = <ATLAS-R2-2016-01-00-01> MuonVersion = <> -MuonDetectorCon... INFO Keys for Muon Switches are (key) ATLAS-R2-2016-01-00-01 (node) ATLAS -MuonDetectorCon... INFO (from GeoModelSvc) in AtlasVersion = <ATLAS-R2-2016-01-00-01> default MuonVersion is <MuonSpectrometer-R.08.01> -MuonDetectorCon... INFO Properties have been set as follows: -MuonDetectorCon... INFO LayoutName R -MuonDetectorCon... INFO IncludeCutouts 0 -MuonDetectorCon... INFO IncludeCutoutsBog 0 -MuonDetectorCon... INFO IncludeCtbBis 0 -MuonDetectorCon... INFO ControlAlines 111111 -MuonDetectorCon... INFO MinimalGeoFlag 0 -MuonDetectorCon... INFO EnableCscIntAlignment 1 -MuonDetectorCon... INFO EnableCscIntAlignmentFromGM 0 -MuonDetectorCon... INFO ControlCscIntAlines 111111 -MuonDetectorCon... INFO EnableMdtDeformations 1 -MuonDetectorCon... INFO EnableMdtAsBuiltParameters 1 -MuGM:MuonFactory INFO MuonLayout set to <R.08.01> = Development version for DC3 - infrastructures -MuGM:MuonFactory INFO BOG cutouts are activated 1 , all other cutouts are disabled 1 -MuGM:MuonFactory INFO Manager created for geometry version R.08.01 from DB MuonVersion <MuonSpectrometer-R.08.01> -MuonGeoModel.MYSQL INFO GeometryVersion set to <R.08.01> -MuGM:MuonFactory INFO Mysql helper class created here for geometry version R.08.01 from DB MuonVersion <MuonSpectrometer-R.08.01> -MuGM:MuonFactory INFO MDTIDHELPER retrieved from DetStore -MuGM:MuonFactory INFO RPCIDHELPER retrieved from DetStore -MuGM:MuonFactory INFO TGCIDHELPER retrieved from DetStore -MuGM:MuonFactory INFO CSCIDHELPER retrieved from DetStore -MuGM:MuonFactory INFO **************** MuonDetectorFactory001 ************************ -MuGM:MuonFactory INFO *** Start building the Muon Geometry Tree ********************** -MuGM:RDBReadAtlas INFO Start retriving dbObjects with tag = <ATLAS-R2-2016-01-00-01> node <ATLAS> -RDBAccessSvc WARNING Could not get the tag for XtomoData node. Returning 0 pointer to IRDBQuery -MuGM:RDBReadAtlas INFO After getQuery XtomoData -In DblQ00Xtomo(data) -No XtomoData table in the MuonDD Database -MuGM:RDBReadAtlas INFO After new DblQ00Xtomo -MuGM:RDBReadAtlas INFO After m_dhxtomo.data() -MuGM:RDBReadAtlas INFO No Ascii aszt input found: looking for A-lines in ORACLE -MuGM:RDBReadAtlas INFO ASZT table found in Oracle -MuGM:RDBReadAtlas INFO ASZT size is 32 -MuGM:RDBReadAtlas INFO No Ascii iacsc input found: looking for A-lines in ORACLE -RDBAccessSvc WARNING Could not get the tag for ISZT node. Returning 0 pointer to IRDBQuery -MuGM:RDBReadAtlas INFO No ISZT table in Oracle -MuGM:RDBReadAtlas INFO Access granted for all dbObjects needed by muon detectors -MuonGeoModel.MYSQL INFO LayoutName (from DBAM) set to <R.08> -- relevant for CTB2004 -MuGM:ProcStations INFO Processing Stations and Components -MuGM:ProcStations INFO Processing Stations and Components DONE -MuGM:ProcTechnol.s INFO nMDT 26 nCSC 4 nTGC 44 nRPC 50 -MuGM:ProcTechnol.s INFO nDED 4 nSUP 8 nSPA 4 -MuGM:ProcTechnol.s INFO nCHV 14 nCRO 14 nCMI 12 nLBI 12 -MuGM:ProcPosition INFO *** N. of stations positioned in the setup 234 -MuGM:ProcPosition INFO *** N. of stations described in mysql 234 -MuGM:ProcPosition INFO *** N. of types 32 size of jtypvec 32 -MuGM:ProcPosition INFO *** : 234 kinds of stations (type*sub_type) -MuGM:ProcPosition INFO *** : 1758 physical stations in space - according to the MuonDD DataBase -MuGM:ProcCutouts INFO Processing Cutouts for geometry layout R.08 -MuGM:ProcCutouts INFO Processing Cutouts DONE -MuGM:RDBReadAtlas INFO ProcessTGCreadout - version 7 wirespacing 1.8 -MuGM:RDBReadAtlas INFO Intermediate Objects built from primary numbers -MuGM:MuonFactory INFO theMaterialManager retrieven successfully from the DetStore -MuGM:MuonFactory INFO MuonSystem description from OracleTag=<ATLAS-R2-2016-01-00-01> and node=<ATLAS> -MuGM:MuonFactory INFO TreeTop added to the Manager -MuGM:MuonFactory INFO Muon Layout R.08.01 -MuGM:MuonFactory INFO Fine Clash Fixing disabled: (should be ON/OFF for Simulation/Reconstruction) -MuGM:MuonFactory INFO **************** MuonDetectorFactory001 **************************** -MuGM:MuonFactory INFO *** The Muon Chamber Geometry Tree is built with -MuGM:MuonFactory INFO *** 1758 child volumes -MuGM:MuonFactory INFO *** 1839 independent elements and -MuGM:MuonFactory INFO *** 11473 elements cloned or shared -MuGM:MuonFactory INFO *** 234 kinds of stations -MuGM:MuonFactory INFO *** 1758 stations with alignable transforms -MuGM:MuonFactory INFO *** 148 stations are described as Assemblies -MuGM:MuonFactory INFO *** 1758 MuonStations -MuGM:MuonFactory INFO *** 2324 MDT Readout Elements 1186 MDT Detector Elements -MuGM:MuonFactory INFO *** 32 CSC Readout Elements 32 CSC Detector Elements -MuGM:MuonFactory INFO *** 1122 RPC Readout Elements 600 RPC Detector Elements -MuGM:MuonFactory INFO *** 1578 TGC Readout Elements 1578 TGC Detector Elements -MuGM:MuonFactory INFO ******************************************************************** -MuGM:MuonFactory INFO *** Inert Material built according to DB switches and config. ****** -MuGM:MuonFactory INFO *** The Muon Geometry Tree has 1758 child vol.s in total ******** -MuGM:MuonFactory INFO ******************************************************************** - -MGM::MuonDetect... INFO Init A/B Line Containers - done - size is respectively 1758/0 -MGM::MuonDetect... INFO Init of CSC I-Lines will be done via Conditions DB -MGM::MuonDetect... INFO Init I-Line Container - done - size is respectively 128 -MGM::MuonDetect... INFO I-Line for CSC wire layers loaded (Csc Internal Alignment) -MGM::MuonDetect... INFO According to configuration they WILL be used -MGM::MuonDetect... INFO Filling cache -MGM::MuonDetect... INFO temporary CSC I-line container with size = 128 -MGM::MuonDetect... INFO # of CSC I-lines read from the ILineMapContainer in StoreGate is 128 -MGM::MuonDetect... INFO # of deltaTransforms updated according to A-lines is 128 -MGM::MuonDetect... INFO # of entries in the CSC I-lines historical container is 128 -MGM::MuonDetect... INFO temporary As-Built container with size = 628 -MGM::MuonDetect... INFO # of MDT As-Built read from the MdtAsBuiltMapContainer in StoreGate is 628 -MGM::MuonDetect... INFO # of deltaTransforms updated according to As-Built is 628 -MGM::MuonDetect... INFO # of entries in the MdtAsBuilt historical container is 628 -MGM::MuonDetect... INFO temporary A-line container with size = 2694 -MGM::MuonDetect... INFO # of A-lines read from the ALineMapContainer in StoreGate is 2694 -MGM::MuonDetect... INFO # of deltaTransforms updated according to A-lines is 2694 -MGM::MuonDetect... INFO # of entries in the A-lines historical container is 2814 -MGM::MuonDetect... INFO In updateDeformations() -MGM::MuonDetect... INFO temporary B-line container with size = 1206 -MGM::MuonDetect... INFO # of B-lines read from the ALineMapContainer in StoreGate is 1206 -MGM::MuonDetect... INFO # of deform-Transforms updated according to B-lines is 1174 -MGM::MuonDetect... INFO # of entries in the B-lines historical container is 1174 -MuonDetectorCon... INFO recorded new MuonDetectorManager with range {[0,0,t:1497892260,l:0] - [t:1497898380]} into Conditions Store -RpcCablingCondAlg INFO maps configuration have been parsed -RpcCablingCondAlg INFO recorded new RpcCablingCondData with range {[315000,l:0] - [999999,l:0]} -MuonMDT_CablingAlg INFO Size of CondAttrListCollection ( 'CondAttrListCollection' , 'ConditionStore+/MDT/CABLING/MEZZANINE_SCHEMA' ) readCdoMez->size()= 24 -MuonMDT_CablingAlg INFO Range of input is {[0,l:0] - [INVALID]} -MuonMDT_CablingAlg INFO Size of CondAttrListCollection ( 'CondAttrListCollection' , 'ConditionStore+/MDT/CABLING/MAP_SCHEMA' ) readCdoMap->size()= 2312 -MuonMDT_CablingAlg INFO Range of input is {[327264,l:4294640031] - [327265,l:4294640030]} -MuonMDT_CablingAlg INFO recorded new MuonMDT_CablingMap with range {[327264,t:0,l:4294640031] - [327265,l:4294640030]} into Conditions Store -AtlasFieldMapCo... INFO updateFieldMap: Update map from conditions -AtlasFieldMapCo... INFO updateFieldMap: Update map from conditions: Range of input/output is {[0,l:0] - [INVALID]} -AtlasFieldMapCo... INFO updateFieldMap: reading magnetic field map filenames from COOL -AtlasFieldMapCo... INFO updateFieldMap: found map of type GlobalMap with soleCur=7730 toroCur=20400 (path file:MagneticFieldMaps/bfieldmap_7730_20400_14m.root) -AtlasFieldMapCo... INFO updateFieldMap: found map of type SolenoidMap with soleCur=7730 toroCur=0 (path file:MagneticFieldMaps/bfieldmap_7730_0_14m.root) -AtlasFieldMapCo... INFO updateFieldMap: found map of type ToroidMap with soleCur=0 toroCur=20400 (path file:MagneticFieldMaps/bfieldmap_0_20400_14m.root) -AtlasFieldMapCo... INFO updateFieldMap: tagInfoH ( 'TagInfo' , 'DetectorStore+ProcessingTags' ) is valid. -AtlasFieldMapCo... INFO updateFieldMap: DID NOT reset currents from TagInfo -AtlasFieldMapCo... INFO updateFieldMap: Set map currents from FieldSvc: solenoid/toroid 7730,20400 -AtlasFieldMapCo... INFO updateFieldMap: Use map file MagneticFieldMaps/bfieldmap_7730_20400_14m.root -AtlasFieldMapCo... INFO updateFieldMap: Initialized the field map from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/atlas/offline/ReleaseData/v20/MagneticFieldMaps/bfieldmap_7730_20400_14m.root -AtlasFieldMapCo... INFO execute: solenoid zone id 7000 -AtlasFieldMapCo... INFO execute: recored AtlasFieldMapCondObj with field map -AtlasFieldCache... INFO UpdateCurrentFromConditions -AtlasFieldCache... INFO UpdateCurrentFromConditions: Range of input/output is {[0,0,t:1497895317.371000000] - [t:1497898549.609000000]} -AtlasFieldCache... INFO UpdateCurrentFromConditions: Attempt 1 at reading currents from DCS (using channel name) -AtlasFieldCache... INFO UpdateCurrentFromConditions: Trying to read from DCS: [channel name, index, value] CentralSol_Current , 1 , 7729.99 -AtlasFieldCache... INFO UpdateCurrentFromConditions: Trying to read from DCS: [channel name, index, value] CentralSol_SCurrent , 2 , 7730 -AtlasFieldCache... INFO UpdateCurrentFromConditions: Trying to read from DCS: [channel name, index, value] Toroids_Current , 3 , 20399.9 -AtlasFieldCache... INFO UpdateCurrentFromConditions: Trying to read from DCS: [channel name, index, value] Toroids_SCurrent , 4 , 20397.7 -AtlasFieldCache... INFO UpdateCurrentFromConditions: Currents read from DCS - solenoid 7729.99 toroid 20399.9 -AtlasFieldCache... INFO scaleField: Solenoid field scale factor 1. Solenoid and map currents: 7729.99,7730 -AtlasFieldCache... INFO scaleField: Toroid field scale factor 1. Toroid and map currents: 20399.9,20400 -AtlasFieldCache... INFO execute: initialized AtlasFieldCacheCondObj and cache with SFs - sol/tor 1/1 -AtlasFieldCache... INFO execute: solenoid zone id 7000 -MdtCalibDbAlg INFO Size of CondAttrListCollection ( 'CondAttrListCollection' , 'ConditionStore+/MDT/RTBLOB' ) readCdoRt->size()= 1186 -MdtCalibDbAlg INFO Range of input is {[327265,l:0] - [327342,l:0]} -MdtCalibDbAlg INFO MdtCalibDbAlg::loadRt Read 1188RTs from COOL -MdtCalibDbAlg INFO recorded new MdtRtRelationCollection with range {[327265,l:0] - [327342,l:0]} into Conditions Store -MdtCalibDbAlg INFO recorded new MdtCorFuncSetCollection with range {[327265,l:0] - [327342,l:0]} into Conditions Store -MdtCalibDbAlg INFO Ignoring nonexistant station in calibration DB: MuonSpectrometer BML -6 stationPhi 7 MDT multiLayer 1 tubeLayer 1 tube 1 -MdtCalibDbAlg INFO Ignoring nonexistant station in calibration DB: MuonSpectrometer BML stationEta 6 stationPhi 7 MDT multiLayer 1 tubeLayer 1 tube 1 -MdtCalibDbAlg INFO Size of CondAttrListCollection ( 'CondAttrListCollection' , 'ConditionStore+/MDT/T0BLOB' ) readCdoTube->size()= 1186 -MdtCalibDbAlg INFO Range of input is {[319000,l:0] - [INVALID]} -MdtCalibDbAlg INFO recorded new MdtTubeCalibContainerCollection with range {[319000,l:0] - [INVALID]} into Conditions Store -CscCondDbData INFO Maximum Layer hash is 255 -AthenaEventLoopMgr INFO ===>>> done processing event #186525031, run #327265 1 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #186524665, run #327265 1 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #186524665, run #327265 2 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #186542447, run #327265 2 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #186542447, run #327265 3 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #186543405, run #327265 3 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #186543405, run #327265 4 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #186548387, run #327265 4 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #186548387, run #327265 5 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #186515186, run #327265 5 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #186515186, run #327265 6 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #186556019, run #327265 6 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #186556019, run #327265 7 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #186542866, run #327265 7 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #186542866, run #327265 8 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #186537901, run #327265 8 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #186537901, run #327265 9 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #186517811, run #327265 9 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #186517811, run #327265 10 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #186534221, run #327265 10 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #186534221, run #327265 11 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #186540986, run #327265 11 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #186540986, run #327265 12 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #186535104, run #327265 12 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #186535104, run #327265 13 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #186539903, run #327265 13 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #186539903, run #327265 14 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #186552713, run #327265 14 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #186552713, run #327265 15 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #186524730, run #327265 15 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #186524730, run #327265 16 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #186547632, run #327265 16 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #186547632, run #327265 17 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #186555621, run #327265 17 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #186555621, run #327265 18 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #186568452, run #327265 18 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #186568452, run #327265 19 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #186580451, run #327265 19 events processed so far <<<=== -AthenaEventLoopMgr INFO ===>>> done processing event #186580451, run #327265 20 events processed so far <<<=== -Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] -ApplicationMgr INFO Application Manager Stopped successfully -IncidentProcAlg1 INFO Finalize -CondInputLoader INFO Finalizing CondInputLoader... -AtlasFieldMapCo... INFO in finalize -AtlasFieldCache... INFO in finalize -IncidentProcAlg2 INFO Finalize -IOVDbFolder INFO Folder /CSC/FTHOLD (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/322656 (( 0.11 ))s -IOVDbFolder INFO Folder /CSC/NOISE (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/350062 (( 0.09 ))s -IOVDbFolder INFO Folder /CSC/PED (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/411187 (( 0.08 ))s -IOVDbFolder INFO Folder /CSC/PSLOPE (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/353376 (( 0.10 ))s -IOVDbFolder INFO Folder /CSC/RMS (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/411395 (( 0.10 ))s -IOVDbFolder INFO Folder /CSC/STAT (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/230496 (( 0.06 ))s -IOVDbFolder INFO Folder /CSC/T0BASE (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/314380 (( 0.03 ))s -IOVDbFolder INFO Folder /CSC/T0PHASE (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/3136 (( 0.02 ))s -IOVDbFolder INFO Folder /EXT/DCS/MAGNETS/SENSORDATA (AttrListColl) db-read 1/1 objs/chan/bytes 4/4/20 (( 0.02 ))s -IOVDbFolder INFO Folder /GLOBAL/BField/Maps (AttrListColl) db-read 1/1 objs/chan/bytes 3/3/202 (( 0.06 ))s -IOVDbFolder INFO Folder /MDT/CABLING/MAP_SCHEMA (AttrListColl) db-read 1/1 objs/chan/bytes 2312/2437/216520 (( 0.28 ))s -IOVDbFolder INFO Folder /MDT/CABLING/MEZZANINE_SCHEMA (AttrListColl) db-read 1/1 objs/chan/bytes 24/24/288 (( 0.05 ))s -IOVDbFolder INFO Folder /MDT/RTBLOB (AttrListColl) db-read 1/1 objs/chan/bytes 2372/1186/2251209 (( 0.30 ))s -IOVDbFolder INFO Folder /MDT/T0BLOB (AttrListColl) db-read 1/1 objs/chan/bytes 1186/1186/1374284 (( 0.20 ))s -IOVDbFolder INFO Folder /MUONALIGN/CSC/ILINES (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/10814 (( 0.04 ))s -IOVDbFolder INFO Folder /MUONALIGN/MDT/ASBUILTPARAMS (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/128992 (( 0.05 ))s -IOVDbFolder INFO Folder /MUONALIGN/MDT/BARREL (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/140293 (( 0.09 ))s -IOVDbFolder INFO Folder /MUONALIGN/MDT/ENDCAP/SIDEA (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/65494 (( 0.06 ))s -IOVDbFolder INFO Folder /MUONALIGN/MDT/ENDCAP/SIDEC (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/65497 (( 0.08 ))s -IOVDbFolder INFO Folder /MUONALIGN/TGC/SIDEA (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/165643 (( 0.07 ))s -IOVDbFolder INFO Folder /MUONALIGN/TGC/SIDEC (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/165643 (( 0.04 ))s -IOVDbFolder INFO Folder /RPC/CABLING/MAP_SCHEMA (AttrListColl) db-read 1/2 objs/chan/bytes 1/1/222235 (( 0.22 ))s -IOVDbFolder INFO Folder /RPC/CABLING/MAP_SCHEMA_CORR (AttrListColl) db-read 1/2 objs/chan/bytes 1/1/29402 (( 0.07 ))s -IOVDbFolder INFO Folder /RPC/DCS/DeadRopanels (AttrListColl) db-read 1/1 objs/chan/bytes 32/48/6200 (( 0.01 ))s -IOVDbFolder INFO Folder /RPC/DCS/OffRopanels (AttrListColl) db-read 1/1 objs/chan/bytes 4/48/16 (( 0.00 ))s -IOVDbFolder INFO Folder /RPC/DQMF/ELEMENT_STATUS (AttrListColl) db-read 1/1 objs/chan/bytes 8320/8320/6180700 (( 0.37 ))s -IOVDbFolder INFO Folder /RPC/TRIGGER/CM_THR_ETA (AttrListColl) db-read 1/2 objs/chan/bytes 1613/1613/7562651 (( 0.51 ))s -IOVDbFolder INFO Folder /RPC/TRIGGER/CM_THR_PHI (AttrListColl) db-read 1/2 objs/chan/bytes 1612/1612/8096306 (( 0.17 ))s -IOVDbFolder INFO Folder /TGC/CABLING/MAP_SCHEMA (AttrListColl) db-read 0/0 objs/chan/bytes 0/1/0 (( 0.00 ))s -IOVDbSvc INFO bytes in (( 3.28 ))s -IOVDbSvc INFO Connection sqlite://;schema=mycool.db;dbname=CONDBR2 : nConnect: 0 nFolders: 0 ReadTime: (( 0.00 ))s -IOVDbSvc INFO Connection COOLOFL_MUONALIGN/CONDBR2 : nConnect: 2 nFolders: 7 ReadTime: (( 0.43 ))s -IOVDbSvc INFO Connection COOLONL_RPC/CONDBR2 : nConnect: 2 nFolders: 4 ReadTime: (( 0.96 ))s -IOVDbSvc INFO Connection COOLONL_TGC/CONDBR2 : nConnect: 1 nFolders: 1 ReadTime: (( 0.00 ))s -IOVDbSvc INFO Connection COOLONL_MDT/CONDBR2 : nConnect: 2 nFolders: 2 ReadTime: (( 0.33 ))s -IOVDbSvc INFO Connection COOLONL_GLOBAL/CONDBR2 : nConnect: 2 nFolders: 1 ReadTime: (( 0.06 ))s -IOVDbSvc INFO Connection COOLOFL_DCS/CONDBR2 : nConnect: 2 nFolders: 3 ReadTime: (( 0.03 ))s -IOVDbSvc INFO Connection COOLOFL_RPC/CONDBR2 : nConnect: 2 nFolders: 1 ReadTime: (( 0.37 ))s -IOVDbSvc INFO Connection COOLOFL_MDT/CONDBR2 : nConnect: 2 nFolders: 2 ReadTime: (( 0.50 ))s -IOVDbSvc INFO Connection COOLOFL_CSC/CONDBR2 : nConnect: 2 nFolders: 8 ReadTime: (( 0.59 ))s -ToolSvc INFO Removing all tools created by ToolSvc -TgcRdoToTgcPrep... INFO finalize(): input RDOs->output PRDs [Hit: 6807->6807, Tracklet: 28->28, TrackletEIFI: 692->692, HiPt: 4031->4031, SL: 3->3] MdtRawDataProvi... INFO Fraction of fills that use the cache = 0 TgcRawDataProvi... INFO Fraction of fills that use the cache = 0 RpcROD_Decoder:... INFO ============ FINAL RPC DATA FORMAT STAT. =========== @@ -1068,15 +50,3 @@ RpcROD_Decoder:... INFO SL Footer Errors.............0 RpcROD_Decoder:... INFO RX Footer Errors.............0 RpcROD_Decoder:... INFO CRC8 check Failures..........0 RpcROD_Decoder:... INFO ==================================================== -ToolSvc.ByteStr... INFO in finalize() -ToolSvc.TGCCabl... INFO finalize -IdDictDetDescrCnv INFO in finalize -*****Chrono***** INFO **************************************************************************************************** -*****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) -*****Chrono***** INFO **************************************************************************************************** -cObj_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 32 -ChronoStatSvc INFO Time User : Tot= 29 [s] #= 1 -*****Chrono***** INFO **************************************************************************************************** -ChronoStatSvc.f... INFO Service finalized successfully -ApplicationMgr INFO Application Manager Finalized successfully -ApplicationMgr INFO Application Manager Terminated successfully diff --git a/MuonSpectrometer/MuonDigitization/CSC_Digitization/CMakeLists.txt b/MuonSpectrometer/MuonDigitization/CSC_Digitization/CMakeLists.txt index 9671268224cd20d019e16e44eff8d23c7bee1f9a..3137dbe4939d60f6d46ff6668b17ce6bdac3b870 100755 --- a/MuonSpectrometer/MuonDigitization/CSC_Digitization/CMakeLists.txt +++ b/MuonSpectrometer/MuonDigitization/CSC_Digitization/CMakeLists.txt @@ -31,7 +31,7 @@ atlas_add_component( CSC_Digitization src/*.cxx src/components/*.cxx INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaBaseComps AthenaKernel PileUpToolsLib GaudiKernel MuonReadoutGeometry MuonDigitContainer MuonIdHelpersLib MuonSimData MuonSimEvent HitManagement StoreGateLib SGtests GeneratorObjects ) + LINK_LIBRARIES ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaBaseComps AthenaKernel PileUpToolsLib GaudiKernel MuonReadoutGeometry MuonDigitContainer MuonIdHelpersLib MuonSimData MuonSimEvent HitManagement StoreGateLib SGtests GeneratorObjects CscCalibToolsLib ) # Install files from the package: atlas_install_headers( CSC_Digitization ) diff --git a/MuonSpectrometer/MuonDigitization/RPC_Digitization/CMakeLists.txt b/MuonSpectrometer/MuonDigitization/RPC_Digitization/CMakeLists.txt index 0e19bfe4d68161eefc47942f362fc6b415d33fe0..00c0703a6341069e0fbc0169ce948adc50a9bccb 100755 --- a/MuonSpectrometer/MuonDigitization/RPC_Digitization/CMakeLists.txt +++ b/MuonSpectrometer/MuonDigitization/RPC_Digitization/CMakeLists.txt @@ -41,7 +41,7 @@ atlas_add_component( RPC_Digitization src/*.cxx src/components/*.cxx INCLUDE_DIRS ${AIDA_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaBaseComps PileUpToolsLib xAODEventInfo GaudiKernel MuonSimData MuonSimEvent HitManagement AthenaKernel EventInfo GeneratorObjects MuonCondInterface MuonCondData MuonReadoutGeometry MuonDigitContainer MuonIdHelpersLib PathResolver ) + LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaBaseComps PileUpToolsLib xAODEventInfo GaudiKernel MuonSimData MuonSimEvent HitManagement AthenaKernel EventInfo GeneratorObjects MuonCondInterface MuonCondData MuonReadoutGeometry MuonDigitContainer MuonIdHelpersLib PathResolver GeometryDBSvcLib EventInfoMgtLib ) # Install files from the package: atlas_install_headers( RPC_Digitization ) diff --git a/MuonSpectrometer/MuonDigitization/TGC_Digitization/CMakeLists.txt b/MuonSpectrometer/MuonDigitization/TGC_Digitization/CMakeLists.txt index 2e3b90e3c30db1c55b36016f977366d4fe9245f7..7b78cf64cf3fafae335aa2d97da814a1793dd427 100755 --- a/MuonSpectrometer/MuonDigitization/TGC_Digitization/CMakeLists.txt +++ b/MuonSpectrometer/MuonDigitization/TGC_Digitization/CMakeLists.txt @@ -37,7 +37,7 @@ atlas_add_component( TGC_Digitization src/*.cxx src/components/*.cxx INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} AthenaBaseComps AthenaKernel PileUpToolsLib GeoPrimitives Identifier GaudiKernel MuonSimEvent HitManagement xAODEventInfo GeneratorObjects MuonReadoutGeometry MuonDigitContainer MuonIdHelpersLib MuonSimData PathResolver ) + LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} AthenaBaseComps AthenaKernel PileUpToolsLib GeoPrimitives Identifier GaudiKernel MuonSimEvent HitManagement xAODEventInfo GeneratorObjects MuonReadoutGeometry MuonDigitContainer MuonIdHelpersLib MuonSimData PathResolver RDBAccessSvcLib ) # Install files from the package: atlas_install_python_modules( python/*.py ) diff --git a/MuonSpectrometer/MuonDigitization/sTGC_Digitization/CMakeLists.txt b/MuonSpectrometer/MuonDigitization/sTGC_Digitization/CMakeLists.txt index e92320687657c1f8369f351eed6485511cb2fad7..8f8d38b959401432e90148e729678b5fb3c2ec11 100644 --- a/MuonSpectrometer/MuonDigitization/sTGC_Digitization/CMakeLists.txt +++ b/MuonSpectrometer/MuonDigitization/sTGC_Digitization/CMakeLists.txt @@ -47,7 +47,7 @@ atlas_add_component( sTGC_Digitization src/*.cxx src/components/*.cxx INCLUDE_DIRS ${AIDA_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaBaseComps AthenaKernel AthContainers PileUpToolsLib Identifier xAODEventInfo GaudiKernel MuonSimEvent HitManagement StoreGateLib SGtests EventInfo GeneratorObjects MuonReadoutGeometry MuonDigitContainer MuonIdHelpersLib MuonSimData PathResolver TrkDetDescrUtils TrkSurfaces TrkEventPrimitives NSWCalibToolsLib ) + LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaBaseComps AthenaKernel AthContainers PileUpToolsLib Identifier xAODEventInfo GaudiKernel MuonSimEvent HitManagement StoreGateLib SGtests EventInfo GeneratorObjects MuonReadoutGeometry MuonDigitContainer MuonIdHelpersLib MuonSimData PathResolver TrkDetDescrUtils TrkSurfaces TrkEventPrimitives NSWCalibToolsLib MuonDigToolInterfacesLib ) # Install files from the package: atlas_install_headers( sTGC_Digitization ) diff --git a/MuonSpectrometer/MuonGeoModel/src/RpcLayer.cxx b/MuonSpectrometer/MuonGeoModel/src/RpcLayer.cxx index 51c83b18fd84bae765dbce5593f7659208622a58..123910170f791d82f914c056fd4d9bd6ad2ba0d9 100755 --- a/MuonSpectrometer/MuonGeoModel/src/RpcLayer.cxx +++ b/MuonSpectrometer/MuonGeoModel/src/RpcLayer.cxx @@ -196,8 +196,8 @@ GeoVPhysVol* RpcLayer::build(int cutoutson, std::vector<Cutout*> vcutdef) double gasLength = ggLength - 2.*r->bakeliteframesize; double gasWidth = ggWidth- 2.*r->bakeliteframesize; - double y_translation; - double z_translation; + double y_translation = 0; + double z_translation = 0; if (m->nGasGaps()==3) { // for BIS RPCs if (name == "RPC26" ) { //big RPC7 gasLength = ggLength - 93.25; // ggLength - deadframesizeEta diff --git a/MuonSpectrometer/MuonOverlay/CscOverlay/src/CscOverlay.cxx b/MuonSpectrometer/MuonOverlay/CscOverlay/src/CscOverlay.cxx index 74304be5f72f1cb05f4e52cd398fcccb5f31f82f..d5003a1764a985c398a6082fd7a03cc2882d5e57 100644 --- a/MuonSpectrometer/MuonOverlay/CscOverlay/src/CscOverlay.cxx +++ b/MuonSpectrometer/MuonOverlay/CscOverlay/src/CscOverlay.cxx @@ -82,25 +82,22 @@ StatusCode CscOverlay::overlayContainer(const CscRawDataContainer *bkgContainer, { ATH_MSG_DEBUG("overlayContainer() begin"); - // Get all the hashes for the signal and background containers - const std::vector<IdentifierHash> bkgHashes = bkgContainer->GetAllCurrentHashes(); - const std::vector<IdentifierHash> signalHashes = signalContainer->GetAllCurrentHashes(); - // The MC signal container should typically be smaller than bkgContainer, // because the latter contains all the noise, minimum bias and pile up. // Thus we firstly iterate over signal hashes and store them in a map. - std::map<IdentifierHash, bool> overlapMap; - for (const IdentifierHash &hashId : signalHashes) { - overlapMap.emplace(hashId, false); + std::vector < std::pair<IdentifierHash, bool> > overlapMap; + overlapMap.reserve(signalContainer->numberOfCollections()); + for (const auto &[hashId, ptr] : signalContainer->GetAllHashPtrPair()) { + overlapMap.emplace_back(hashId, false); } // Now loop through the background hashes and copy unique ones over - for (const IdentifierHash &hashId : bkgHashes) { - auto search = overlapMap.find(hashId); - if (search == overlapMap.end()) { + for (const auto &[hashId, ptr] : bkgContainer->GetAllHashPtrPair()) { + auto search = std::lower_bound( overlapMap.begin(), overlapMap.end(), hashId, + [](const std::pair<IdentifierHash, bool> &lhs, IdentifierHash rhs) -> bool { return lhs.first < rhs; } ); + if (search == overlapMap.end() || search->first != hashId) { // Copy the background collection - std::unique_ptr<CscRawDataCollection> bkgCollection - = copyCollection(bkgContainer->indexFindPtr(hashId)); + std::unique_ptr<CscRawDataCollection> bkgCollection = copyCollection(ptr); if (outputContainer->addCollection(bkgCollection.get(), hashId).isFailure()) { ATH_MSG_ERROR("Adding background Collection with hashId " << hashId << " failed"); diff --git a/MuonSpectrometer/MuonOverlay/MuonOverlayBase/MuonOverlayBase/IDC_MuonOverlayBase.icc b/MuonSpectrometer/MuonOverlay/MuonOverlayBase/MuonOverlayBase/IDC_MuonOverlayBase.icc index 0b8723c1854ccc1d02c8b4657b739a8a03325382..31d061dfdced16408060e834f62037dac34725cd 100644 --- a/MuonSpectrometer/MuonOverlay/MuonOverlayBase/MuonOverlayBase/IDC_MuonOverlayBase.icc +++ b/MuonSpectrometer/MuonOverlay/MuonOverlayBase/MuonOverlayBase/IDC_MuonOverlayBase.icc @@ -41,15 +41,12 @@ StatusCode IDC_MuonOverlayBase::overlayContainerBase(const IDC_Container *bkgCon ATH_MSG_DEBUG("overlayContainer<>() begin"); - // Get all the hashes for the signal container - const std::vector<IdentifierHash> signalHashes = signalContainer->GetAllCurrentHashes(); - // There are some use cases where background is empty if (!bkgContainer) { // Only loop through the signal collections and copy them over - for (const IdentifierHash &hashId : signalHashes) { + for (const auto &[hashId, ptr] : signalContainer->GetAllHashPtrPair()) { // Copy the signal collection - std::unique_ptr<Collection> signalCollection = copyCollection(hashId, signalContainer->indexFindPtr(hashId)); + std::unique_ptr<Collection> signalCollection = copyCollection(hashId, ptr); if (outputContainer->addCollection(signalCollection.get(), hashId).isFailure()) { ATH_MSG_ERROR("Adding signal Collection with hashId " << hashId << " failed"); @@ -62,21 +59,20 @@ StatusCode IDC_MuonOverlayBase::overlayContainerBase(const IDC_Container *bkgCon return StatusCode::SUCCESS; } - // Get all the hashes for the background container - const std::vector<IdentifierHash> bkgHashes = bkgContainer->GetAllCurrentHashes(); - // The MC signal container should typically be smaller than bkgContainer, // because the latter contains all the noise, minimum bias and pile up. // Thus we firstly iterate over signal hashes and store them in a map. - std::map<IdentifierHash, bool> overlapMap; - for (const IdentifierHash &hashId : signalHashes) { - overlapMap.emplace(hashId, false); + std::vector < std::pair<IdentifierHash, bool> > overlapMap; + overlapMap.reserve(signalContainer->numberOfCollections()); + for (const auto &[hashId, ptr] : signalContainer->GetAllHashPtrPair()) { + overlapMap.emplace_back(hashId, false); } // Now loop through the background hashes and copy unique ones over - for (const IdentifierHash &hashId : bkgHashes) { - auto search = overlapMap.find(hashId); - if (search == overlapMap.end()) { + for (const auto &[hashId, ptr] : bkgContainer->GetAllHashPtrPair()) { + auto search = std::lower_bound( overlapMap.begin(), overlapMap.end(), hashId, + [](const std::pair<IdentifierHash, bool> &lhs, IdentifierHash rhs) -> bool { return lhs.first < rhs; } ); + if (search == overlapMap.end() || search->first != hashId) { // Copy the background collection std::unique_ptr<Collection> bkgCollection = copyCollection(hashId, bkgContainer->indexFindPtr(hashId)); diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_myTopOptions.py b/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_myTopOptions.py index 4f304b37278d2baf634e0642c38d3b514fa8ef60..9e2fa8f727b997d67be0de2f2c9d874b24a4b9fc 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_myTopOptions.py +++ b/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_myTopOptions.py @@ -1,3 +1,5 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + from MuonRecExample.MuonRecFlags import muonRecFlags from RecExConfig.RecFlags import rec from RecExConfig.RecAlgsFlags import recAlgs @@ -16,7 +18,6 @@ athenaCommonFlags.AllowIgnoreConfigError = False # configure flags so that only Muon Standalone reco is run import MuonRecExample.MuonRecStandaloneOnlySetup -#import MuonCombinedRecExample.MuonCombinedRecOnlySetup from MuonCombinedRecExample.MuonCombinedRecFlags import muonCombinedRecFlags from MuonRecExample import MuonRecUtils @@ -44,30 +45,15 @@ athenaCommonFlags.FilesInput = [InputRdoFile] #-------------------------------------------------------------------------------- # Output #-------------------------------------------------------------------------------- -#rec.doPerfMon = True -#rec.doDetailedAuditor = True -#rec.doWriteESD = True -muonRecFlags.doCalibNtuple = False # write calibration ntuple? -#muonRecFlags.calibNtupleSegments = False # write segments to ntuple? -#muonRecFlags.calibNtupleTracks = False # write tracks to ntuple? -#muonRecFlags.calibNtupleTrigger = False # write trigger info to ntuple? -### - -#rec.doNameAuditor = True -#muonRecFlags.doVP1 = True # Decide whether to run Virtual Point1 graphical event display rec.doTruth=True - -#rec.doTrigger = True - -# Read geometry alignment corrections from DB -#muonRecFlags.useAlignmentCorrections = True rec.doTrigger = False -#recFlags.doTruth.set_Value_and_Lock(False) + muonRecFlags.doStandalone.set_Value_and_Lock(True) muonRecFlags.doTrackPerformance = True muonRecFlags.TrackPerfSummaryLevel = 2 muonRecFlags.TrackPerfDebugLevel = 5 muonRecFlags.doCSCs = True +muonRecFlags.doCalibNtuple = False # do not write calibration ntuples # flags to tweak standalone muon reconstruction if doMig5: @@ -86,27 +72,15 @@ try: include("MuonRecExample/MuonRec_topOptions.py") ###### put any user finetuning after this line ##### - #from MuonTestEDM.MuonTestEDMConf import MuonTestEDM - #MyEDMTester = MuonTestEDM(DoDumpPRDs=True, DoDumpTracks=False, DoDumpRDOs=True, DoDumpSegments=False) - #topSequence += MyEDMTester - - #if not 'DumpFileName' in dir(): - # DumpFileName="ReadBS" - - #MyEDMTester.RdoDumpFileName = DumpFileName+".rdo.log" - #MyEDMTester.PrdDumpFileName = DumpFileName+".prd.log" - #MyEDMTester.TrackDumpFileName = DumpFileName+".track.log" - #MyEDMTester.TrackParticleDumpFileName = DumpFileName+".trackParticle.log" - #MyEDMTester.SegmentDumpFileName= DumpFileName+".segment.log" - #MyEDMTester.SummaryDumpFileName= DumpFileName+".summary.log" - ###### put any user finetuning before this line ##### ##### DO NOT ADD ANYTHING AFTER THIS LINE ##### except: # print the stacktrace (saving could fail, and would then obscure the real problem) import traceback - print traceback.format_exc().rstrip() + from __future__ import print_function + print ('INFO: MuonRec_myTopOptions.py - stack trace:') + print (traceback.format_exc().rstrip()) # always write config so far for debugging from AthenaCommon.ConfigurationShelve import saveToAscii diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/TgcRawDataMonitoring/TgcRawDataValAlg.h b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/TgcRawDataMonitoring/TgcRawDataValAlg.h index d10309fa309288eaf2fdea4fe46ea8ada6995637..3195dd3a1b6e1b14b0d234abe720a8dbb9e19df7 100644 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/TgcRawDataMonitoring/TgcRawDataValAlg.h +++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/TgcRawDataMonitoring/TgcRawDataValAlg.h @@ -66,9 +66,7 @@ private: std::string m_generic_path_tgcmonitoring; // Keys and Locations for retrieving collections - SG::ReadHandleKey<Muon::TgcPrepDataContainer> m_tgcPrepDataContainerName{this,"TgcPrepDataContainer","TGC_Measurements","current BC TGC PRD"}; - SG::ReadHandleKey<Muon::TgcPrepDataContainer> m_tgcPrepDataPreviousContainerName{this,"TgcPrepDataPreviousContainer","TGC_MeasurementsPriorBC","previous BC TGC PRD"}; - SG::ReadHandleKey<Muon::TgcPrepDataContainer> m_tgcPrepDataNextContainerName{this,"TgcPrepDataNextContainer","TGC_MeasurementsNextBC","next BC TGC PRD"}; + SG::ReadHandleKey<Muon::TgcPrepDataContainer> m_tgcPrepDataContainerName{this,"TgcPrepDataContainerAllBCs","TGC_MeasurementsAllBCs","TGC PRD"}; SG::ReadHandleKey<Muon::TgcCoinDataContainer> m_outputCoinCollectionLocation{this,"OutputCoinCollection","TrigT1CoinDataCollection","TGC T1 coincidences"}; SG::ReadHandleKey<xAOD::EventInfo> m_eventInfo{this,"EventInfo","EventInfo","EventInfo"}; @@ -116,7 +114,7 @@ private: std::vector<double> m_hitPosPhi[2][2]; //[ac][ws] // read Tgc PRD Container - void readTgcPrepDataContainer(const Muon::TgcPrepDataContainer *tgc_prep_container, int pcn); + void readTgcPrepDataContainer(const Muon::TgcPrepDataContainer *tgc_prep_container, int pcn = -1); /////////////////////////////////////////////////////////////////////////// diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/share/TgcRaw_MonitoringOptions.py b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/share/TgcRaw_MonitoringOptions.py index 4aef14a00236702dd10d69cbb7581640f4f2cc91..9cdb7a6ee1f777e18679621bd8553dc3495d6706 100755 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/share/TgcRaw_MonitoringOptions.py +++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/share/TgcRaw_MonitoringOptions.py @@ -17,8 +17,7 @@ tgcLv1RawMonMan = AthenaMonManager(name="TgcLv1RawMonManager", OutputLevel = muonOutputLevel) ############## TgcRawDataValAlg ############# from TgcRawDataMonitoring.TgcRawDataMonitoringConf import TgcRawDataValAlg -tgcRawDataValAlg = TgcRawDataValAlg(name='tgcRawDataValAlg', - TgcPrepDataContainer="TGC_Measurements") +tgcRawDataValAlg = TgcRawDataValAlg(name='tgcRawDataValAlg') #ToolSvc += tgcRawDataValAlg tgcRawMonMan.AthenaMonTools += [ tgcRawDataValAlg ] topSequence += tgcRawMonMan diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataValAlg.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataValAlg.cxx index e5317518bae0a157c56a63b5f298a4ce702a370a..ed663040d57c2f38f02a923b92fdc24fb6a621b8 100644 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataValAlg.cxx +++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataValAlg.cxx @@ -61,8 +61,6 @@ TgcRawDataValAlg::initialize(){ m_mon_profile=true; ATH_CHECK(m_tgcPrepDataContainerName.initialize()); - ATH_CHECK(m_tgcPrepDataPreviousContainerName.initialize()); - ATH_CHECK(m_tgcPrepDataNextContainerName.initialize()); ATH_CHECK(m_outputCoinCollectionLocation.initialize()); ATH_CHECK(m_eventInfo.initialize()); @@ -121,20 +119,9 @@ TgcRawDataValAlg::fillHistograms(){ ///////////////////////////////////// // Get TGC Hit PRD Containers - SG::ReadHandle<Muon::TgcPrepDataContainer> tgc_previous_prd_container(m_tgcPrepDataContainerName); - SG::ReadHandle<Muon::TgcPrepDataContainer> tgc_current_prd_container(m_tgcPrepDataPreviousContainerName); - SG::ReadHandle<Muon::TgcPrepDataContainer> tgc_next_prd_container(m_tgcPrepDataNextContainerName); - - // Previous - ATH_MSG_DEBUG( "****** tgc previous prd container size() : " << tgc_previous_prd_container->size() ); - - // Current - ATH_MSG_DEBUG( "****** tgc current prd container size() : " << tgc_current_prd_container->size() ); - - // Next - ATH_MSG_DEBUG( "****** tgc next prd container size() : " << tgc_next_prd_container->size() ); - - + SG::ReadHandle<Muon::TgcPrepDataContainer> tgc_prd_container(m_tgcPrepDataContainerName); + ATH_MSG_DEBUG( "****** tgc prd container size() : " << tgc_prd_container->size() ); + // Increment event counter m_nEvent++; ATH_MSG_DEBUG("event : " << m_nEvent ); @@ -144,9 +131,7 @@ TgcRawDataValAlg::fillHistograms(){ // Get Data from TGC Containers clearVectorsArrays(); // fill vectors and arrays from TgcPrepData - readTgcPrepDataContainer(tgc_previous_prd_container.cptr(), PREV); - readTgcPrepDataContainer( tgc_current_prd_container.cptr(), CURR); - readTgcPrepDataContainer( tgc_next_prd_container.cptr(), NEXT); + readTgcPrepDataContainer(tgc_prd_container.cptr()); /////////////////////////////////////////////////////////////////////////// diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataValAlg_ReadContainer.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataValAlg_ReadContainer.cxx index 3608553065533466f02d3a3f77dcccafbcc29627..c07746b8fa79de306e970b7466d9a098f407b001 100644 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataValAlg_ReadContainer.cxx +++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataValAlg_ReadContainer.cxx @@ -75,7 +75,6 @@ TgcRawDataValAlg::readTgcPrepDataContainer(const Muon::TgcPrepDataContainer* tgc /////////////////////////////////////////////////////////////////////////// // Loop over TgcPrepDataContainer if(pcn!=TOTA){ - // MuonDetectorManager from the conditions store SG::ReadCondHandle<MuonGM::MuonDetectorManager> DetectorManagerHandle{m_DetectorManagerKey}; const MuonGM::MuonDetectorManager* MuonDetMgr = DetectorManagerHandle.cptr(); @@ -130,6 +129,11 @@ TgcRawDataValAlg::readTgcPrepDataContainer(const Muon::TgcPrepDataContainer* tgc for(Muon::TgcPrepDataCollection::const_iterator collectionIt=(*containerIt)->begin(); collectionIt!= collection_end; ++collectionIt){ + if(pcn<0){ + if (((*collectionIt)->getBcBitMap()&Muon::TgcPrepData::BCBIT_PREVIOUS)==Muon::TgcPrepData::BCBIT_PREVIOUS) pcn=PREV; + if (((*collectionIt)->getBcBitMap()&Muon::TgcPrepData::BCBIT_CURRENT)==Muon::TgcPrepData::BCBIT_CURRENT) pcn=CURR; + if (((*collectionIt)->getBcBitMap()&Muon::TgcPrepData::BCBIT_NEXT)==Muon::TgcPrepData::BCBIT_NEXT) pcn=NEXT; + } // Increment Prd Counter if(pcn==CURR)m_nPrd++; diff --git a/MuonSpectrometer/MuonValidation/MuonPRDTest/scripts/checkNSWValTree.py b/MuonSpectrometer/MuonValidation/MuonPRDTest/scripts/checkNSWValTree.py index 49848ff8e23874c1842641915c9a9c47b72205a3..9140d537a9ada525608cb8706d50fa01c3cbf93b 100644 --- a/MuonSpectrometer/MuonValidation/MuonPRDTest/scripts/checkNSWValTree.py +++ b/MuonSpectrometer/MuonValidation/MuonPRDTest/scripts/checkNSWValTree.py @@ -43,10 +43,10 @@ if __name__ == "__main__": nPRDMM = 0 nPRDSTGC = 0 for i in range(nEntries): - inputTree.GetEntry(i) + inputTree.GetEntry(i) nHitsMM += inputTree.Hits_MM_n nHitsSTGC += inputTree.Hits_sTGC_n - nDigitsMM += inputTree.Digits_MM + nDigitsMM += inputTree.Digits_MM nDigitsSTGC += inputTree.Digits_sTGC nSDOMM += inputTree.SDO_MM nSDOSTGC += inputTree.SDO_sTGC diff --git a/MuonSpectrometer/MuonValidation/MuonPRDTest/src/EDM_object.cxx b/MuonSpectrometer/MuonValidation/MuonPRDTest/src/EDM_object.cxx index 73694f6d0eac9de31a2f34839a1004c2151d4ec7..82f2aeac955d8d0915d3b00107f94f078e9649f4 100644 --- a/MuonSpectrometer/MuonValidation/MuonPRDTest/src/EDM_object.cxx +++ b/MuonSpectrometer/MuonValidation/MuonPRDTest/src/EDM_object.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include <vector> @@ -108,8 +108,11 @@ void EDM_object::update_efficiency ( int maximum_difference ) { uint nMatches = 0; size_t n_obj = size(); m_total += n_obj; + bool isMatched; for (uint i = 0; i < n_obj; ++i) { - nMatches += abs( m_channel->at(i) - m_matchedchannel->at(i) ) <= maximum_difference; + // default matched channel value is -10. If not set to any other value, it is always a mismatch + isMatched = m_matchedchannel->at(i) < 0 || abs( m_channel->at(i) - m_matchedchannel->at(i) ) <= maximum_difference; + nMatches += isMatched; } m_mismatches += (n_obj - nMatches); } diff --git a/MuonSpectrometer/MuonValidation/MuonPRDTest/src/NSWPRDValAlg.cxx b/MuonSpectrometer/MuonValidation/MuonPRDTest/src/NSWPRDValAlg.cxx index c5150dfd476ab81579e367146a882dc139550a83..a8cbecd3af7f23362522f80298b11f1f91af2cba 100644 --- a/MuonSpectrometer/MuonValidation/MuonPRDTest/src/NSWPRDValAlg.cxx +++ b/MuonSpectrometer/MuonValidation/MuonPRDTest/src/NSWPRDValAlg.cxx @@ -485,7 +485,7 @@ StatusCode NSWPRDValAlg::NSWMatchingAlg (EDM_object data0, EDM_object data1) { warningPrinted = true; } } else { - ATH_MSG_WARNING("No match found!"); + ATH_MSG_DEBUG("No match found!"); } } } diff --git a/MuonSpectrometer/MuonValidation/MuonRecValidation/MooPerformance/share/MooPerformance_topOptions.py b/MuonSpectrometer/MuonValidation/MuonRecValidation/MooPerformance/share/MooPerformance_topOptions.py index 1b8f8f753bbe07ada94524411dfb758c7d0d26bb..80fd12b9e4eaed63b8323abc67937ec68ca92b69 100755 --- a/MuonSpectrometer/MuonValidation/MuonRecValidation/MooPerformance/share/MooPerformance_topOptions.py +++ b/MuonSpectrometer/MuonValidation/MuonRecValidation/MooPerformance/share/MooPerformance_topOptions.py @@ -1,8 +1,6 @@ -#-------------------------------------------------------------- -# FPE check -#-------------------------------------------------------------- -from AthenaCommon.AppMgr import theApp -### !!!!theApp.CreateSvc += ["FPEControlSvc"] +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + +from __future__ import print_function #-------------------------------------------------------------------------------- # configure required detector flags for combined reco of simulated muons @@ -85,25 +83,23 @@ from MuonRecExample.MuonRecFlags import muonRecFlags muonRecFlags.doCalibNtuple = False muonRecFlags.doMSVertex = False muonRecFlags.doTrackPerformance = False -# muonRecFlags.enableErrorTuning = False -print 'muonRecFlags:::' -print muonRecFlags +print ('INFO: MooPerformance_topOptions.py - muonRecFlags:') +print (muonRecFlags) #-------------------------------------------------------------------------------- # combined muon reco flags (non-default values) #-------------------------------------------------------------------------------- from MuonCombinedRecExample.MuonCombinedRecFlags import muonCombinedRecFlags -#muonCombinedRecFlags.doCaloMuonCollection = False muonCombinedRecFlags.doMuGirlLowBetaMuonCollection = False -#muonCombinedRecFlags.doMuGirl = False muonCombinedRecFlags.printConfigurables = True muonCombinedRecFlags.doTrackPerformance = False -print 'muonCombinedRecFlags:::' -print muonCombinedRecFlags +print ('INFO: MooPerformance_topOptions.py - muonCombinedRecFlags:') +print (muonCombinedRecFlags) # eliminate annoying messages from StoreGateSvc (clogging up log file) +from AthenaCommon.AppMgr import ServiceMgr ServiceMgr.MessageSvc.setError += [ "StoreGateSvc"] ##### no more flags after this line ##### @@ -119,12 +115,6 @@ try: ## configure MuidStatistics for new unified chain (but no longer in release) from MuonCombinedRecExample.MuonCombinedKeys import MuonCombinedKeys as MuonCbKeys - #from MuidStatistics.MuidStatisticsConf import MuidStatistics - #MuidStatistics = MuidStatistics() - #MuidStatistics.HistSvc = ServiceMgr.THistSvc - #MuidStatistics.CombinedMuonLocation = MuonCbKeys.FinalMuons() ## "Muons" - #MuidStatistics.OutputLevel = DEBUG - #topSequence += MuidStatistics from MuonTrackPerformance.MuonTrackPerformanceConf import MuonTrackStatisticsTool MuonTrackStatisticsTool = MuonTrackStatisticsTool("MuonTrackStatisticsTool") @@ -150,20 +140,17 @@ try: topSequence += MuonTrackPerformanceAlg("MuidExtrapolatedPerformanceAlg", TrackInputLocation = "ExtrapolatedMuonTracks", IsCombined = True ) - # MuGirl off for now - #topSequence += MuonTrackPerformanceAlg("MuGirlPerformanceAlg", - # TrackInputLocation = "MuGirlTracksFromMuidStatistics", - # DoTruth = True, - # IsCombined = True ) - - print MuonTrackStatistics,ToolSvc.MuonTrackStatisticsTool - print 'MooPerformance_topOptions: finished ' - + + print ('INFO: MooPerformance_topOptions.py - MuonTrackStatistics: %s'%MuonTrackStatistics) + print ('INFO: MooPerformance_topOptions.py - MuonTrackStatisticsTool: %s'%ToolSvc.MuonTrackStatisticsTool) + print ('INFO: MooPerformance_topOptions.py - finished') + ###### put any user finetuning before this line ##### except: # print the stacktrace (saving could fail, and would then obscure the real problem) import traceback - print traceback.format_exc().rstrip() + print ('WARNING: MooPerformance_topOptions.py - stack trace:') + print (traceback.format_exc().rstrip()) # always write config so far for debugging from AthenaCommon.ConfigurationShelve import saveToAscii @@ -174,12 +161,5 @@ except: # but still exit with error import sys sys.exit(10) -#else: - # and write config to include user changes after topOptions - #from AthenaCommon.ConfigurationShelve import saveToAscii - #saveToAscii("config.txt") - # add DetFlags - #from MuonRecExample.MuonRecUtils import dumpDetFlags - #dumpDetFlags("config.txt") ServiceMgr.GeoModelSvc.SupportedGeometry=20 diff --git a/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/python/egammaShowerDepthAlg.py b/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/python/egammaShowerDepthAlg.py index cff6dacd1724e81d1846d17176d97e5ccc67a445..a0bbe1380d6df385b643504156b358c971654b73 100644 --- a/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/python/egammaShowerDepthAlg.py +++ b/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/python/egammaShowerDepthAlg.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # $Id$ # @@ -24,8 +24,7 @@ def egammaShowerDepthAlg (name, **kwin): tag = '@GLOBAL' # Create the algorithm. - kw = {'prefix' : 'ele55.', - 'COOLFolder' : '' } + kw = {'prefix' : 'ele55.'} kw.update (kwin) alg = egammaD3PDAnalysisConf.D3PD__egammaShowerDepthAlg (name, **kw) diff --git a/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/src/egammaShowerDepthAlg.cxx b/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/src/egammaShowerDepthAlg.cxx index 5de19739111e56511011558c65bd154168b4c959..3a832b914c27eda39ac10987a1188ae5fce633ae 100644 --- a/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/src/egammaShowerDepthAlg.cxx +++ b/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/src/egammaShowerDepthAlg.cxx @@ -1,8 +1,6 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ - -// $Id$ /** * @file egammaD3PDAnalysis/src/egammaShowerDepthAlg.cxx * @author scott snyder <snyder@bnl.gov> @@ -15,46 +13,18 @@ #include "D3PDMakerInterfaces/ICollectionGetterTool.h" #include "xAODEgamma/Egamma.h" #include "AthenaKernel/errorcheck.h" +#include "GaudiKernel/ThreadLocalContext.h" namespace D3PD { -/** - * @brief Standard Gaudi algorithm constructor. - * @param name The algorithm name. - * @param svcloc The service locator. - */ -egammaShowerDepthAlg::egammaShowerDepthAlg (const std::string& name, - ISvcLocator* svcloc) - : AthAlgorithm (name, svcloc), - m_getter (this), - m_depthCalc (m_sampling_depth, m_eta_start_crack, m_eta_end_crack, m_etamax) -{ - declareProperty ("AuxPrefix", m_auxPrefix, - "Prefix to add to aux data items."); - declareProperty ("Getter", m_getter, - "Getter instance for the input egamma objects."); - declareProperty ("AllowMissing", m_allowMissing = false, - "If true, don't complain if input objects are missing."); - - declareConstant ("sampling_depth" , m_sampling_depth); - declareConstant ("eta_start_crack" , m_eta_start_crack); - declareConstant ("eta_end_crack" , m_eta_end_crack); - declareConstant ("etamax" , m_etamax); - declareConstant ("use_raw_eta" , m_use_raw_eta); - - finish_ctor ("D3PD::egammaShowerDepthAlg"); -} - - /** * @brief Standard Gaudi @c initialize method. */ StatusCode egammaShowerDepthAlg::initialize() { - CHECK( AthAlgorithm::initialize() ); - CHECK( CaloRec::ToolWithConstantsMixin::initialize() ); + CHECK( base_class::initialize() ); CHECK( m_getter.retrieve() ); CHECK( m_getter->configureD3PD<xAOD::Egamma>() ); @@ -62,37 +32,17 @@ StatusCode egammaShowerDepthAlg::initialize() } -/** - * @brief Method to set a property value. - * @param p The property name/value to set. - * @return Gaudi status code. - * - * Required by @c ToolWithConstantsMixin. - */ -StatusCode egammaShowerDepthAlg::setProperty (const Property& p) -{ - CHECK (AthAlgorithm::setProperty (p)); - CHECK (CaloRec::ToolWithConstantsMixin::setProperty (p)); - return StatusCode::SUCCESS; -} -StatusCode egammaShowerDepthAlg::setProperty (const std::string& propname, - const std::string& value) -{ - CHECK (AthAlgorithm::setProperty (propname, value)); - CHECK (CaloRec::ToolWithConstantsMixin::setProperty (propname, value)); - return StatusCode::SUCCESS; -} - - /** * @brief Standard Gaudi @c execute method. */ StatusCode egammaShowerDepthAlg::execute() { + Context myctx = context (Gaudi::Hive::currentContext()); + xAOD::Egamma::Decorator<float> depth (m_auxPrefix + "calibHitsShowerDepth"); // FIXME: Using the adjusted eta value isn't implemented. - if (!m_use_raw_eta) { + if (!m_use_raw_eta(myctx)) { REPORT_MESSAGE (MSG::WARNING) << "use_raw_eta==false is not implemented."; } @@ -102,7 +52,12 @@ StatusCode egammaShowerDepthAlg::execute() const xAOD::CaloCluster* cl = eg->caloCluster(); depth(*eg) = -999; if (cl) - depth(*eg) = m_depthCalc.depth (std::abs (cl->etaBE(2)), cl, msg()); + depth(*eg) = m_depthCalc.depth (std::abs (cl->etaBE(2)), + m_eta_start_crack(myctx), + m_eta_end_crack(myctx), + m_sampling_depth(myctx), + m_etamax(myctx), + cl, msg()); } return StatusCode::SUCCESS; diff --git a/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/src/egammaShowerDepthAlg.h b/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/src/egammaShowerDepthAlg.h index a927a6d2cc497c2f5d67087151c39776ec0fedeb..d14db8596d68f2e7ae790179fb9c1feee06bf149 100644 --- a/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/src/egammaShowerDepthAlg.h +++ b/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/src/egammaShowerDepthAlg.h @@ -1,10 +1,7 @@ // This file's extension implies that it's C, but it's really -*- C++ -*-. - /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ - -// $Id$ /** * @file egammaD3PDAnalysis/src/egammaShowerDepthAlg.h * @author scott snyder <snyder@bnl.gov> @@ -19,7 +16,7 @@ #include "AthenaBaseComps/AthAlgorithm.h" #include "CaloClusterCorrection/CaloSwCalibHitsShowerDepth.h" -#include "CaloRec/ToolWithConstantsMixin.h" +#include "CaloUtils/ToolWithConstants.h" #include "GaudiKernel/ToolHandle.h" @@ -33,65 +30,49 @@ class ICollectionGetterTool; * @brief Store in UserData the shower depth for an egamma object. */ class egammaShowerDepthAlg - : public AthAlgorithm, - public CaloRec::ToolWithConstantsMixin + : public CaloUtils::ToolWithConstants<AthAlgorithm> { public: - /** - * @brief Standard Gaudi algorithm constructor. - * @param name The algorithm name. - * @param svcloc The service locator. - */ - egammaShowerDepthAlg (const std::string& name, - ISvcLocator* svcloc); + /// Inherit constructor. + using base_class::base_class; /// Standard Gaudi @c initialize method. - virtual StatusCode initialize(); - - - /** - * @brief Method to set a property value. - * @param p The property name/value to set. - * @return Gaudi status code. - * - * Required by @c ToolWithConstantsMixin. - */ - using AthAlgorithm::setProperty; - StatusCode setProperty (const Property& p); - StatusCode setProperty (const std::string& propname, - const std::string& value); + virtual StatusCode initialize() override; /// Standard Gaudi @c execute method. - virtual StatusCode execute(); + virtual StatusCode execute() override; private: /// Property: Prefix to add to aux data items. - std::string m_auxPrefix; + StringProperty m_auxPrefix + { this, "AuxPrefix", "", "Prefix to add to aux data items." }; /// Property: Getter for input egamma objects. - ToolHandle<ICollectionGetterTool> m_getter; + ToolHandle<ICollectionGetterTool> m_getter + { this, "Getter", "", "Getter instance for the input egamma objects." }; /// Property: If true, don't complain if input objects are missing. - bool m_allowMissing; + BooleanProperty m_allowMissing + { this, "AllowMissing", false, "If true, don't complain if input objects are missing." }; /// Property: Table of sampling depth weights. - CaloRec::Array<2> m_sampling_depth; + Constant<CxxUtils::Array<2> > m_sampling_depth { this, "sampling_depth" }; /// Property: Eta of the start of the crack. - float m_eta_start_crack; + Constant<float> m_eta_start_crack { this, "eta_start_crack" }; /// Property: Eta of the end of the crack. - float m_eta_end_crack; + Constant<float> m_eta_end_crack { this, "eta_end_crack" }; /// Property: Maximum eta range of the depth weight table. - float m_etamax; + Constant<float> m_etamax { this, "etamax" }; /// Property: Use raw eta value for region comparisons? // FIXME: The false setting of this is not implemented. - bool m_use_raw_eta; + Constant<bool> m_use_raw_eta { this, "use_raw_eta" }; /// Depth calculator. CaloClusterCorr::CaloSwCalibHitsShowerDepth m_depthCalc; diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/SlimmingHelper.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/SlimmingHelper.py index 2a8ab150271ae87619d9fd492a82fe21d3b04084..c8948aa0df317c4fc4d9ce057cde7d7850e91522 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/SlimmingHelper.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/SlimmingHelper.py @@ -414,10 +414,10 @@ class SlimmingHelper: items.extend(AntiKt10TruthTrimmedPtFrac5SmallR20JetsCPContent) elif collectionName=="AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets": from DerivationFrameworkJetEtMiss.AntiKt10LCTopoTrimmedPtFrac5SmallR20JetsCPContent import AntiKt10LCTopoTrimmedPtFrac5SmallR20JetsCPContent - if "AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets" not in self: + if "AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets" not in self.AppendToDictionary: self.AppendToDictionary["AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets"]='xAOD::JetContainer' self.AppendToDictionary["AntiKt10LCTopoTrimmedPtFrac5SmallR20JetsAux"]='xAOD::JetAuxContainer' - if "AntiKt10TruthTrimmedPtFrac5SmallR20Jets" not in self: + if "AntiKt10TruthTrimmedPtFrac5SmallR20Jets" not in self.AppendToDictionary: self.AppendToDictionary["AntiKt10TruthTrimmedPtFrac5SmallR20Jets"]="xAOD::JetContainer" self.AppendToDictionary["AntiKt10TruthTrimmedPtFrac5SmallR20JetsAux"]='xAOD::JetAuxContainer' items.extend(AntiKt10LCTopoTrimmedPtFrac5SmallR20JetsCPContent) diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/CMakeLists.txt b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/CMakeLists.txt index 6e67ef5583b301f3dfea4e7801fb00fd253e1f97..f63656e5bce85f9440f0b6fd4ef6a46b603fa5ee 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/CMakeLists.txt +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/CMakeLists.txt @@ -18,11 +18,18 @@ atlas_depends_on_subdirs( PUBLIC Event/xAOD/xAODTrigger Event/xAOD/xAODTruth Event/xAOD/xAODCaloEvent + InnerDetector/InDetRecTools/InDetTrackSelectionTool + InnerDetector/InDetRecTools/TrackVertexAssociationTool + PhysicsAnalysis/AnalysisCommon/ParticleJetTools PhysicsAnalysis/DerivationFramework/DerivationFrameworkInterfaces - PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency + PhysicsAnalysis/Interfaces/JetAnalysisInterfaces + PhysicsAnalysis/Interfaces/FTagAnalysisInterfaces Reconstruction/Jet/JetInterface - Reconstruction/PFlow/PFlowUtils - Tools/PathResolver ) + Reconstruction/Jet/JetMomentTools + Reconstruction/Jet/JetJvtEfficiency + Reconstruction/PFlow/PFlowUtils + Tools/PathResolver + Trigger/TrigAnalysis/TrigAnalysisInterfaces ) # External dependencies: find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) @@ -33,12 +40,12 @@ atlas_add_library( DerivationFrameworkJetEtMissLib NO_PUBLIC_HEADERS INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} LINK_LIBRARIES ${ROOT_LIBRARIES} GaudiKernel - PRIVATE_LINK_LIBRARIES AthenaBaseComps xAODCore xAODJet xAODPFlow xAODTracking xAODTrigger xAODTruth JetInterface PathResolver PFlowUtilsLib xAODBTaggingEfficiencyLib ) + PRIVATE_LINK_LIBRARIES AthenaBaseComps xAODCore xAODJet xAODPFlow xAODTracking xAODTrigger xAODTruth JetInterface PathResolver PFlowUtilsLib ParticleJetToolsLib FTagAnalysisInterfacesLib JetAnalysisInterfacesLib JetMomentToolsLib InDetTrackSelectionToolLib TrackVertexAssociationToolLib JetJvtEfficiencyLib) atlas_add_component( DerivationFrameworkJetEtMiss src/components/*.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} GaudiKernel AthenaBaseComps xAODCore xAODJet xAODPFlow xAODTracking xAODTrigger xAODTruth JetInterface PathResolver PFlowUtilsLib DerivationFrameworkJetEtMissLib ) + LINK_LIBRARIES ${ROOT_LIBRARIES} GaudiKernel AthenaBaseComps xAODCore xAODJet xAODPFlow xAODTracking xAODTrigger xAODTruth JetInterface PathResolver PFlowUtilsLib DerivationFrameworkJetEtMissLib JetJvtEfficiencyLib) # Install files from the package: atlas_install_python_modules( python/*.py ) diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10EMPFlowTrimmedPtFrac5SmallR20JetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10EMPFlowTrimmedPtFrac5SmallR20JetsCPContent.py new file mode 100644 index 0000000000000000000000000000000000000000..75733a6ec109b0974693adb2a8d1e94893777ddc --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10EMPFlowTrimmedPtFrac5SmallR20JetsCPContent.py @@ -0,0 +1,12 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + +AntiKt10EMPFlowTrimmedPtFrac5SmallR20JetsCPContent = [ +"AntiKt10EMPFlowTrimmedPtFrac5SmallR20Jets", +"AntiKt10EMPFlowTrimmedPtFrac5SmallR20JetsAux.JetConstitScaleMomentum_pt.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_m", +"AntiKt10EMPFlowTrimmedPtFrac5SmallR20JetsAux.ECF1.ECF2.ECF3.Tau1_wta.Tau2_wta.Tau3_wta.Split12.Split23.Qw.PlanarFlow.FoxWolfram2.FoxWolfram0.Angularity.Aplanarity.KtDR.ZCut12", +"AntiKt10EMPFlowTrimmedPtFrac5SmallR20JetsAux.NTrimSubjets.Parent.DetectorEta.DetectorY", +"AntiKt10EMPFlowTrimmedPtFrac5SmallR20JetsAux.R10TruthLabel_R21Consolidated", +"AntiKt10EMPFlowJets", +"AntiKt10EMPFlowJetsAux.NumTrkPt500", +"AntiKt10TruthTrimmedPtFrac5SmallR20Jets.pt.eta.phi.m.ECF1.ECF2.ECF3.Tau2_wta.Tau3_wta.Qw.GhostBHadronsFinalCount", +] diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10LCTopoCSSKSoftDropBeta100Zcut10JetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10LCTopoCSSKSoftDropBeta100Zcut10JetsCPContent.py new file mode 100644 index 0000000000000000000000000000000000000000..71891ba2dbd580616c99eca5963d51d0484b5817 --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10LCTopoCSSKSoftDropBeta100Zcut10JetsCPContent.py @@ -0,0 +1,9 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + +AntiKt10LCTopoCSSKSoftDropBeta100Zcut10JetsCPContent = [ +"AntiKt10LCTopoCSSKSoftDropBeta100Zcut10Jets", +"AntiKt10LCTopoCSSKSoftDropBeta100Zcut10JetsAux.JetConstitScaleMomentum_pt.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_m", +"AntiKt10LCTopoCSSKSoftDropBeta100Zcut10JetsAux.ECF1.ECF2.ECF3.Tau1_wta.Tau2_wta.Tau3_wta.Split12.Split23.Qw.PlanarFlow.FoxWolfram2.FoxWolfram0.Angularity.Aplanarity.KtDR.ZCut12", +"AntiKt10LCTopoCSSKSoftDropBeta100Zcut10JetsAux.Parent.DetectorEta.DetectorY", +"AntiKt10LCTopoCSSKSoftDropBeta100Zcut10JetsAux.R10TruthLabel_R21Consolidated", +] diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10LCTopoJetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10LCTopoJetsCPContent.py new file mode 100644 index 0000000000000000000000000000000000000000..eda16b9657ee3c4a6e65b936403d0958eff2dc7b --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10LCTopoJetsCPContent.py @@ -0,0 +1,10 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + +AntiKt10LCTopoJetsCPContent = [ +"AntiKt10LCTopoJets", +"AntiKt10LCTopoJetsAux.JetConstitScaleMomentum_pt.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_m", +"AntiKt10LCTopoJetsAux.PartonTruthLabelID.DetectorEta.DetectorY", +"AntiKt10LCTopoJetsAux.GhostBHadronsFinalCount.GhostHBosonsCount.GhostTQuarksFinalCount.GhostTrack.GhostWBosonsCount.GhostZBosonsCount", +"AntiKt10LCTopoJetsAux.GhostVR30Rmax4Rmin02TrackJet.GhostVR30Rmax4Rmin02TrackJetGhostTag.GhostVR30Rmax4Rmin02TrackJet_BTagging201810.GhostVR30Rmax4Rmin02TrackJet_BTagging201810GhostTag.GhostVR30Rmax4Rmin02TrackJet_BTagging201903", +"AntiKt10LCTopoJetsAux.HadronConeExclExtendedTruthLabelID.HadronConeExclTruthLabelID.NumTrkPt500.SumPtTrkPt500", +] diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10LCTopoTrimmedPtFrac5SmallR20JetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10LCTopoTrimmedPtFrac5SmallR20JetsCPContent.py index d343d282ffe51bd2477ece73320355291a6735f8..2a768d3aacf55aa120e181cc61063174bc24749b 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10LCTopoTrimmedPtFrac5SmallR20JetsCPContent.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10LCTopoTrimmedPtFrac5SmallR20JetsCPContent.py @@ -1,9 +1,13 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration AntiKt10LCTopoTrimmedPtFrac5SmallR20JetsCPContent = [ "AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets", -"AntiKt10LCTopoTrimmedPtFrac5SmallR20JetsAux.pt.eta.phi.m.constituentLinks.ConstituentScale.JetConstitScaleMomentum_pt.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_m.InputType.AlgorithmType.SizeParameter.TransformType.RClus.PtFrac.ECF1.ECF2.ECF3.Tau1_wta.Tau2_wta.Tau3_wta.Split12.Split23.NTrimSubjets.Parent.GhostAntiKt2TrackJet.TrackSumPt.TrackSumMass", +"AntiKt10LCTopoTrimmedPtFrac5SmallR20JetsAux.JetConstitScaleMomentum_pt.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_m", +"AntiKt10LCTopoTrimmedPtFrac5SmallR20JetsAux.ECF1.ECF2.ECF3.Tau1_wta.Tau2_wta.Tau3_wta.Split12.Split23.Qw.PlanarFlow.FoxWolfram2.FoxWolfram0.Angularity.Aplanarity.KtDR.ZCut12", +"AntiKt10LCTopoTrimmedPtFrac5SmallR20JetsAux.NTrimSubjets.Parent.TrackSumPt.TrackSumMass.DetectorEta.DetectorY", +"AntiKt10LCTopoTrimmedPtFrac5SmallR20JetsAux.GhostAntiKt2TrackJet.GhostBHadronsFinalCount", +"AntiKt10LCTopoTrimmedPtFrac5SmallR20JetsAux.R10TruthLabel_R21Consolidated", "AntiKt10LCTopoJets", -"AntiKt10LCTopoJetsAux.GhostAntiKt2TrackJet", -"AntiKt10TruthTrimmedPtFrac5SmallR20Jets.pt.eta.phi.m.ECF1.ECF2.ECF3.Tau2_wta.Tau3_wta" +"AntiKt10LCTopoJetsAux.GhostAntiKt2TrackJet.GhostVR30Rmax4Rmin02TrackJet.GhostVR30Rmax4Rmin02TrackJetGhostTag.GhostVR30Rmax4Rmin02TrackJet_BTagging201810.GhostVR30Rmax4Rmin02TrackJet_BTagging201810GhostTag.GhostVR30Rmax4Rmin02TrackJet_BTagging201903.NumTrkPt500", +"AntiKt10TruthTrimmedPtFrac5SmallR20Jets.pt.eta.phi.m.ECF1.ECF2.ECF3.Tau2_wta.Tau3_wta.Qw.GhostBHadronsFinalCount", ] diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10TrackCaloClusterJetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10TrackCaloClusterJetsCPContent.py new file mode 100644 index 0000000000000000000000000000000000000000..f4a03191ba443eee97e62b497d0b4b0942d05f49 --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10TrackCaloClusterJetsCPContent.py @@ -0,0 +1,10 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + +AntiKt10TrackCaloClusterJetsCPContent = [ +"AntiKt10TrackCaloClusterJets", +"AntiKt10TrackCaloClusterJetsAux.JetConstitScaleMomentum_pt.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_m", +"AntiKt10TrackCaloClusterJetsAux.DetectorEta.DetectorY", +"AntiKt10TrackCaloClusterJetsAux.GhostBHadronsFinalCount.GhostHBosonsCount.GhostTQuarksFinalCount.GhostTrack.GhostWBosonsCount.GhostZBosonsCount", +"AntiKt10TrackCaloClusterJetsAux.GhostVR30Rmax4Rmin02TrackJet.GhostVR30Rmax4Rmin02TrackJetGhostTag.GhostVR30Rmax4Rmin02TrackJet_BTagging201810.GhostVR30Rmax4Rmin02TrackJet_BTagging201810GhostTag.GhostVR30Rmax4Rmin02TrackJet_BTagging201903", +"AntiKt10TrackCaloClusterJetsAux.HadronConeExclExtendedTruthLabelID.HadronConeExclTruthLabelID.NumTrkPt500.SumPtTrkPt500", +] diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10TrackCaloClusterTrimmedPtFrac5SmallR20JetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10TrackCaloClusterTrimmedPtFrac5SmallR20JetsCPContent.py new file mode 100644 index 0000000000000000000000000000000000000000..fbcfe42a53fbf4c6676537c000a61416de27115c --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10TrackCaloClusterTrimmedPtFrac5SmallR20JetsCPContent.py @@ -0,0 +1,13 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + +AntiKt10TrackCaloClusterTrimmedPtFrac5SmallR20JetsCPContent = [ +"AntiKt10TrackCaloClusterTrimmedPtFrac5SmallR20Jets", +"AntiKt10TrackCaloClusterTrimmedPtFrac5SmallR20JetsAux.JetConstitScaleMomentum_pt.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_m", +"AntiKt10TrackCaloClusterTrimmedPtFrac5SmallR20JetsAux.ECF1.ECF2.ECF3.Tau1_wta.Tau2_wta.Tau3_wta.Split12.Split23.Qw.PlanarFlow.FoxWolfram2.FoxWolfram0.Angularity.Aplanarity.KtDR.ZCut12", +"AntiKt10TrackCaloClusterTrimmedPtFrac5SmallR20JetsAux.NTrimSubjets.Parent.DetectorEta.DetectorY", +"AntiKt10TrackCaloClusterTrimmedPtFrac5SmallR20JetsAux.GhostAntiKt2TrackJet.GhostBHadronsFinalCount", +"AntiKt10TrackCaloClusterTrimmedPtFrac5SmallR20JetsAux.R10TruthLabel_R21Consolidated", +"AntiKt10TrackCaloClusterJets", +"AntiKt10TrackCaloClusterJetsAux.GhostAntiKt2TrackJet.GhostVR30Rmax4Rmin02TrackJet.NumTrkPt500", +"AntiKt10TruthTrimmedPtFrac5SmallR20Jets.pt.eta.phi.m.ECF1.ECF2.ECF3.Tau2_wta.Tau3_wta.Qw.GhostBHadronsFinalCount", +] diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10TruthBottomUpSoftDropBeta100Zcut5JetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10TruthBottomUpSoftDropBeta100Zcut5JetsCPContent.py new file mode 100644 index 0000000000000000000000000000000000000000..0e7aacd46df216c56a781fd165f5a52c8d1219af --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10TruthBottomUpSoftDropBeta100Zcut5JetsCPContent.py @@ -0,0 +1,9 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + +AntiKt10TruthBottomUpSoftDropBeta100Zcut5JetsCPContent = [ +"AntiKt10TruthBottomUpSoftDropBeta100Zcut5Jets", +"AntiKt10TruthBottomUpSoftDropBeta100Zcut5JetsAux.ECF1.ECF2.ECF3.Tau1_wta.Tau2_wta.Tau3_wta.Split12.Split23.Qw.PlanarFlow.FoxWolfram2.FoxWolfram0.Angularity.Aplanarity.KtDR.ZCut12", +"AntiKt10TruthBottomUpSoftDropBeta100Zcut5JetsAux.Parent.GhostBHadronsFinalCount", +"AntiKt10TruthJets", +"AntiKt10TruthJetsAux.GhostBHadronsFinalCount", +] diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10TruthJetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10TruthJetsCPContent.py new file mode 100644 index 0000000000000000000000000000000000000000..698abaf7c970b02d9943422d2c542c555b404b75 --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10TruthJetsCPContent.py @@ -0,0 +1,8 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + +AntiKt10TruthJetsCPContent = [ +"AntiKt10TruthJets", +"AntiKt10TruthJetsAux.PartonTruthLabelID", +"AntiKt10TruthJetsAux.GhostBHadronsFinal.GhostBHadronsFinalCount.GhostTQuarksFinal.GhostTQuarksFinalCount", +"AntiKt10TruthJetsAux.GhostHBosons.GhostHBosonsCount.GhostWBosons.GhostWBosonsCount.GhostZBosons.GhostZBosonsCount", +] diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10TruthRecursiveSoftDropBeta100Zcut5NinfJetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10TruthRecursiveSoftDropBeta100Zcut5NinfJetsCPContent.py new file mode 100644 index 0000000000000000000000000000000000000000..6fe73478b928accebdf31556cae73b45c78ed28f --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10TruthRecursiveSoftDropBeta100Zcut5NinfJetsCPContent.py @@ -0,0 +1,9 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + +AntiKt10TruthRecursiveSoftDropBeta100Zcut5NinfJetsCPContent = [ +"AntiKt10TruthRecursiveSoftDropBeta100Zcut5NinfJets", +"AntiKt10TruthRecursiveSoftDropBeta100Zcut5NinfJetsAux.ECF1.ECF2.ECF3.Tau1_wta.Tau2_wta.Tau3_wta.Split12.Split23.Qw.PlanarFlow.FoxWolfram2.FoxWolfram0.Angularity.Aplanarity.KtDR.ZCut12", +"AntiKt10TruthRecursiveSoftDropBeta100Zcut5NinfJetsAux.Parent.GhostBHadronsFinalCount", +"AntiKt10TruthJets", +"AntiKt10TruthJetsAux.GhostBHadronsFinalCount", +] diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10TruthSoftDropBeta100Zcut10JetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10TruthSoftDropBeta100Zcut10JetsCPContent.py new file mode 100644 index 0000000000000000000000000000000000000000..a91eebe6127ec3dd202a5fbb4d983df1b0540ba8 --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10TruthSoftDropBeta100Zcut10JetsCPContent.py @@ -0,0 +1,9 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + +AntiKt10TruthSoftDropBeta100Zcut10JetsCPContent = [ +"AntiKt10TruthSoftDropBeta100Zcut10Jets", +"AntiKt10TruthSoftDropBeta100Zcut10JetsAux.ECF1.ECF2.ECF3.Tau1_wta.Tau2_wta.Tau3_wta.Split12.Split23.Qw.PlanarFlow.FoxWolfram2.FoxWolfram0.Angularity.Aplanarity.KtDR.ZCut12", +"AntiKt10TruthSoftDropBeta100Zcut10JetsAux.Parent.GhostBHadronsFinalCount", +"AntiKt10TruthJets", +"AntiKt10TruthJetsAux.GhostBHadronsFinalCount", +] diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10TruthTrimmedPtFrac5SmallR20JetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10TruthTrimmedPtFrac5SmallR20JetsCPContent.py new file mode 100644 index 0000000000000000000000000000000000000000..c406b0dcd13f41c876592de9ece069174e7079be --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10TruthTrimmedPtFrac5SmallR20JetsCPContent.py @@ -0,0 +1,10 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + +AntiKt10TruthTrimmedPtFrac5SmallR20JetsCPContent = [ +"AntiKt10TruthTrimmedPtFrac5SmallR20Jets", +"AntiKt10TruthTrimmedPtFrac5SmallR20JetsAux.ECF1.ECF2.ECF3.Tau1_wta.Tau2_wta.Tau3_wta.Split12.Split23.Qw.PlanarFlow.FoxWolfram2.FoxWolfram0.Angularity.Aplanarity.KtDR.ZCut12", +"AntiKt10TruthTrimmedPtFrac5SmallR20JetsAux.NTrimSubjets.Parent.GhostBHadronsFinalCount", +"AntiKt10TruthTrimmedPtFrac5SmallR20JetsAux.R10TruthLabel_R21Consolidated", +"AntiKt10TruthJets", +"AntiKt10TruthJetsAux.GhostBHadronsFinalCount", +] diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10TruthWZJetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10TruthWZJetsCPContent.py new file mode 100644 index 0000000000000000000000000000000000000000..f7aaaf3bf56c349af3e460ade984f20f80553d6d --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10TruthWZJetsCPContent.py @@ -0,0 +1,7 @@ +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + +AntiKt10TruthWZJetsCPContent = [ +"AntiKt10TruthWZJets", +"AntiKt10TruthWZJetsAux.ConeTruthLabelID.HadronConeExclExtendedTruthLabelID.HadronConeExclTruthLabelID.TrueFlavor" +] + diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10UFOCHSJetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10UFOCHSJetsCPContent.py new file mode 100644 index 0000000000000000000000000000000000000000..72c8f9bff136ed3b6a3e880f7931342318937534 --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10UFOCHSJetsCPContent.py @@ -0,0 +1,10 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + +AntiKt10UFOCHSJetsCPContent = [ +"AntiKt10UFOCHSJets", +"AntiKt10UFOCHSJetsAux.JetConstitScaleMomentum_pt.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_m", +"AntiKt10UFOCHSJetsAux.PartonTruthLabelID.DetectorEta.DetectorY", +"AntiKt10UFOCHSJetsAux.GhostBHadronsFinalCount.GhostHBosonsCount.GhostTQuarksFinalCount.GhostTrack.GhostWBosonsCount.GhostZBosonsCount", +"AntiKt10UFOCHSJetsAux.GhostVR30Rmax4Rmin02TrackJet.GhostVR30Rmax4Rmin02TrackJetGhostTag.GhostVR30Rmax4Rmin02TrackJet_BTagging201810.GhostVR30Rmax4Rmin02TrackJet_BTagging201810GhostTag.GhostVR30Rmax4Rmin02TrackJet_BTagging201903", +"AntiKt10UFOCHSJetsAux.HadronConeExclExtendedTruthLabelID.HadronConeExclTruthLabelID.NumTrkPt500.SumPtTrkPt500", +] diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10UFOCHSSoftDropBeta100Zcut10JetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10UFOCHSSoftDropBeta100Zcut10JetsCPContent.py new file mode 100644 index 0000000000000000000000000000000000000000..fffec50d0a8b3a79015aa5e4e757bd2bb00588e6 --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10UFOCHSSoftDropBeta100Zcut10JetsCPContent.py @@ -0,0 +1,12 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + +AntiKt10UFOCHSSoftDropBeta100Zcut10JetsCPContent = [ +"AntiKt10UFOCHSSoftDropBeta100Zcut10Jets", +"AntiKt10UFOCHSSoftDropBeta100Zcut10JetsAux.JetConstitScaleMomentum_pt.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_m", +"AntiKt10UFOCHSSoftDropBeta100Zcut10JetsAux.ECF1.ECF2.ECF3.Tau1_wta.Tau2_wta.Tau3_wta.Split12.Split23.Qw.PlanarFlow.FoxWolfram2.FoxWolfram0.Angularity.Aplanarity.KtDR.ZCut12", +"AntiKt10UFOCHSSoftDropBeta100Zcut10JetsAux.Parent.DetectorEta.DetectorY", +"AntiKt10UFOCHSSoftDropBeta100Zcut10JetsAux.R10TruthLabel_R21Consolidated", +"AntiKt10UFOCHSJets", +"AntiKt10UFOCHSJetsAux.NumTrkPt500", +"AntiKt10TruthSoftDropBeta100Zcut10Jets.pt.eta.phi.m.ECF1.ECF2.ECF3.Tau2_wta.Tau3_wta.Qw.GhostBHadronsFinalCount", +] diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10UFOCHSTrimmedPtFrac5SmallR20JetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10UFOCHSTrimmedPtFrac5SmallR20JetsCPContent.py new file mode 100644 index 0000000000000000000000000000000000000000..d1f9a68e357f20eefa342c2f7e66b77102e793bd --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10UFOCHSTrimmedPtFrac5SmallR20JetsCPContent.py @@ -0,0 +1,12 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + +AntiKt10UFOCHSTrimmedPtFrac5SmallR20JetsCPContent = [ +"AntiKt10UFOCHSTrimmedPtFrac5SmallR20Jets", +"AntiKt10UFOCHSTrimmedPtFrac5SmallR20JetsAux.JetConstitScaleMomentum_pt.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_m", +"AntiKt10UFOCHSTrimmedPtFrac5SmallR20JetsAux.ECF1.ECF2.ECF3.Tau1_wta.Tau2_wta.Tau3_wta.Split12.Split23.Qw.PlanarFlow.FoxWolfram2.FoxWolfram0.Angularity.Aplanarity.KtDR.ZCut12", +"AntiKt10UFOCHSTrimmedPtFrac5SmallR20JetsAux.NTrimSubjets.Parent.DetectorEta.DetectorY", +"AntiKt10UFOCHSTrimmedPtFrac5SmallR20JetsAux.R10TruthLabel_R21Consolidated", +"AntiKt10UFOCHSJets", +"AntiKt10UFOCHSJetsAux.NumTrkPt500", +"AntiKt10TruthTrimmedPtFrac5SmallR20Jets.pt.eta.phi.m.ECF1.ECF2.ECF3.Tau2_wta.Tau3_wta.Qw.GhostBHadronsFinalCount", +] diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10UFOCSSKBottomUpSoftDropBeta100Zcut5JetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10UFOCSSKBottomUpSoftDropBeta100Zcut5JetsCPContent.py new file mode 100644 index 0000000000000000000000000000000000000000..027cd8ee0cc52645aa09b0b71e90de1b3c8ceb96 --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10UFOCSSKBottomUpSoftDropBeta100Zcut5JetsCPContent.py @@ -0,0 +1,12 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + +AntiKt10UFOCSSKBottomUpSoftDropBeta100Zcut5JetsCPContent = [ +"AntiKt10UFOCSSKBottomUpSoftDropBeta100Zcut5Jets", +"AntiKt10UFOCSSKBottomUpSoftDropBeta100Zcut5JetsAux.JetConstitScaleMomentum_pt.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_m", +"AntiKt10UFOCSSKBottomUpSoftDropBeta100Zcut5JetsAux.ECF1.ECF2.ECF3.Tau1_wta.Tau2_wta.Tau3_wta.Split12.Split23.Qw.PlanarFlow.FoxWolfram2.FoxWolfram0.Angularity.Aplanarity.KtDR.ZCut12", +"AntiKt10UFOCSSKBottomUpSoftDropBeta100Zcut5JetsAux.Parent.DetectorEta.DetectorY", +"AntiKt10UFOCSSKBottomUpSoftDropBeta100Zcut5JetsAux.R10TruthLabel_R21Consolidated", +"AntiKt10UFOCSSKJets", +"AntiKt10UFOCSSKJetsAux.NumTrkPt500", +"AntiKt10TruthBottomUpSoftDropBeta100Zcut5Jets.pt.eta.phi.m.ECF1.ECF2.ECF3.Tau2_wta.Tau3_wta.Qw.GhostBHadronsFinalCount", +] diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10UFOCSSKJetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10UFOCSSKJetsCPContent.py new file mode 100644 index 0000000000000000000000000000000000000000..1cb9c1ad2e1b229177b16a21863eae03b72241d2 --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10UFOCSSKJetsCPContent.py @@ -0,0 +1,10 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + +AntiKt10UFOCSSKJetsCPContent = [ +"AntiKt10UFOCSSKJets", +"AntiKt10UFOCSSKJetsAux.JetConstitScaleMomentum_pt.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_m", +"AntiKt10UFOCSSKJetsAux.PartonTruthLabelID.DetectorEta.DetectorY", +"AntiKt10UFOCSSKJetsAux.GhostBHadronsFinalCount.GhostHBosonsCount.GhostTQuarksFinalCount.GhostTrack.GhostWBosonsCount.GhostZBosonsCount", +"AntiKt10UFOCSSKJetsAux.GhostVR30Rmax4Rmin02TrackJet.GhostVR30Rmax4Rmin02TrackJetGhostTag.GhostVR30Rmax4Rmin02TrackJet_BTagging201810.GhostVR30Rmax4Rmin02TrackJet_BTagging201810GhostTag.GhostVR30Rmax4Rmin02TrackJet_BTagging201903", +"AntiKt10UFOCSSKJetsAux.HadronConeExclExtendedTruthLabelID.HadronConeExclTruthLabelID.NumTrkPt500.SumPtTrkPt500", +] diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10UFOCSSKRecursiveSoftDropBeta100Zcut5NinfJetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10UFOCSSKRecursiveSoftDropBeta100Zcut5NinfJetsCPContent.py new file mode 100644 index 0000000000000000000000000000000000000000..05af8c71cd1670c770038dd91c81d348f854bee8 --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10UFOCSSKRecursiveSoftDropBeta100Zcut5NinfJetsCPContent.py @@ -0,0 +1,12 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + +AntiKt10UFOCSSKRecursiveSoftDropBeta100Zcut5NinfJetsCPContent = [ +"AntiKt10UFOCSSKRecursiveSoftDropBeta100Zcut5NinfJets", +"AntiKt10UFOCSSKRecursiveSoftDropBeta100Zcut5NinfJetsAux.JetConstitScaleMomentum_pt.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_m", +"AntiKt10UFOCSSKRecursiveSoftDropBeta100Zcut5NinfJetsAux.ECF1.ECF2.ECF3.Tau1_wta.Tau2_wta.Tau3_wta.Split12.Split23.Qw.PlanarFlow.FoxWolfram2.FoxWolfram0.Angularity.Aplanarity.KtDR.ZCut12", +"AntiKt10UFOCSSKRecursiveSoftDropBeta100Zcut5NinfJetsAux.Parent.DetectorEta.DetectorY", +"AntiKt10UFOCSSKRecursiveSoftDropBeta100Zcut5NinfJetsAux.R10TruthLabel_R21Consolidated", +"AntiKt10UFOCSSKJets", +"AntiKt10UFOCSSKJetsAux.NumTrkPt500", +"AntiKt10TruthRecursiveSoftDropBeta100Zcut5NinfJets.pt.eta.phi.m.ECF1.ECF2.ECF3.Tau2_wta.Tau3_wta.Qw.GhostBHadronsFinalCount", +] diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10UFOCSSKSoftDropBeta100Zcut10JetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10UFOCSSKSoftDropBeta100Zcut10JetsCPContent.py new file mode 100644 index 0000000000000000000000000000000000000000..fe124c35e316f50bb6dfd9d90d4aba5b0242a95b --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10UFOCSSKSoftDropBeta100Zcut10JetsCPContent.py @@ -0,0 +1,12 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + +AntiKt10UFOCSSKSoftDropBeta100Zcut10JetsCPContent = [ +"AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets", +"AntiKt10UFOCSSKSoftDropBeta100Zcut10JetsAux.JetConstitScaleMomentum_pt.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_m", +"AntiKt10UFOCSSKSoftDropBeta100Zcut10JetsAux.ECF1.ECF2.ECF3.Tau1_wta.Tau2_wta.Tau3_wta.Split12.Split23.Qw.PlanarFlow.FoxWolfram2.FoxWolfram0.Angularity.Aplanarity.KtDR.ZCut12", +"AntiKt10UFOCSSKSoftDropBeta100Zcut10JetsAux.Parent.DetectorEta.DetectorY", +"AntiKt10UFOCSSKSoftDropBeta100Zcut10JetsAux.R10TruthLabel_R21Consolidated", +"AntiKt10UFOCSSKJets", +"AntiKt10UFOCSSKJetsAux.NumTrkPt500", +"AntiKt10TruthSoftDropBeta100Zcut10Jets.pt.eta.phi.m.ECF1.ECF2.ECF3.Tau2_wta.Tau3_wta.Qw.GhostBHadronsFinalCount", +] diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10UFOCSSKTrimmedPtFrac5SmallR20JetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10UFOCSSKTrimmedPtFrac5SmallR20JetsCPContent.py new file mode 100644 index 0000000000000000000000000000000000000000..fe78c2a57b489fd9d2e90a467682811607fa44e7 --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt10UFOCSSKTrimmedPtFrac5SmallR20JetsCPContent.py @@ -0,0 +1,12 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + +AntiKt10UFOCSSKTrimmedPtFrac5SmallR20JetsCPContent = [ +"AntiKt10UFOCSSKTrimmedPtFrac5SmallR20Jets", +"AntiKt10UFOCSSKTrimmedPtFrac5SmallR20JetsAux.JetConstitScaleMomentum_pt.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_m", +"AntiKt10UFOCSSKTrimmedPtFrac5SmallR20JetsAux.ECF1.ECF2.ECF3.Tau1_wta.Tau2_wta.Tau3_wta.Split12.Split23.Qw.PlanarFlow.FoxWolfram2.FoxWolfram0.Angularity.Aplanarity.KtDR.ZCut12", +"AntiKt10UFOCSSKTrimmedPtFrac5SmallR20JetsAux.NTrimSubjets.Parent.DetectorEta.DetectorY", +"AntiKt10UFOCSSKTrimmedPtFrac5SmallR20JetsAux.R10TruthLabel_R21Consolidated", +"AntiKt10UFOCSSKJets", +"AntiKt10UFOCSSKJetsAux.NumTrkPt500", +"AntiKt10TruthTrimmedPtFrac5SmallR20Jets.pt.eta.phi.m.ECF1.ECF2.ECF3.Tau2_wta.Tau3_wta.Qw.GhostBHadronsFinalCount", +] diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt2LCTopoJetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt2LCTopoJetsCPContent.py new file mode 100644 index 0000000000000000000000000000000000000000..0cfdc2899869749953553a9c21741bd4fb7e112e --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt2LCTopoJetsCPContent.py @@ -0,0 +1,12 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +AntiKt2LCTopoJetsCPContent = [ +"Kt4LCTopoOriginEventShape", +"Kt4LCTopoOriginEventShapeAux.Density", +"AntiKt2LCTopoJets", +"AntiKt2LCTopoJetsAux.pt.eta.phi.m.JetConstitScaleMomentum_pt.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_m.NumTrkPt500.SumPtTrkPt500.EnergyPerSampling.ActiveArea4vec_eta.ActiveArea4vec_m.ActiveArea4vec_phi.ActiveArea4vec_pt.DetectorEta.DetectorY.FracSamplingMax.FracSamplingMaxIndex.GhostTrack.Jvt.JVFCorr.JvtRpt.NumTrkPt1000.TrackWidthPt1000.GhostMuonSegmentCount.PartonTruthLabelID.ConeTruthLabelID.HadronConeExclExtendedTruthLabelID.HadronConeExclTruthLabelID.TrueFlavor.Timing", +"MET_Track", +"MET_TrackAux.name.mpx.mpy", +"PrimaryVertices", +"PrimaryVerticesAux.vertexType" +] diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt2TruthJetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt2TruthJetsCPContent.py new file mode 100644 index 0000000000000000000000000000000000000000..68a6e7236bef65ffb77944ff6e417533911895e8 --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt2TruthJetsCPContent.py @@ -0,0 +1,7 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +AntiKt2TruthJetsCPContent = [ +"AntiKt2TruthJets", +"AntiKt2TruthJetsAux.pt.eta.phi.m.PartonTruthLabelID.ConeTruthLabelID.HadronConeExclExtendedTruthLabelID.HadronConeExclTruthLabelID.TrueFlavor" +] + diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt3LCTopoJetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt3LCTopoJetsCPContent.py new file mode 100644 index 0000000000000000000000000000000000000000..83dc6f81de641353ca6fb897ddddfa2c461f2bea --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt3LCTopoJetsCPContent.py @@ -0,0 +1,12 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +AntiKt3LCTopoJetsCPContent = [ +"Kt4LCTopoOriginEventShape", +"Kt4LCTopoOriginEventShapeAux.Density", +"AntiKt3LCTopoJets", +"AntiKt3LCTopoJetsAux.pt.eta.phi.m.JetConstitScaleMomentum_pt.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_m.NumTrkPt500.SumPtTrkPt500.EnergyPerSampling.ActiveArea4vec_eta.ActiveArea4vec_m.ActiveArea4vec_phi.ActiveArea4vec_pt.DetectorEta.DetectorY.FracSamplingMax.FracSamplingMaxIndex.GhostTrack.Jvt.JVFCorr.JvtRpt.NumTrkPt1000.TrackWidthPt1000.GhostMuonSegmentCount.PartonTruthLabelID.ConeTruthLabelID.HadronConeExclExtendedTruthLabelID.HadronConeExclTruthLabelID.TrueFlavor.Timing", +"MET_Track", +"MET_TrackAux.name.mpx.mpy", +"PrimaryVertices", +"PrimaryVerticesAux.vertexType" +] diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt4EMPFlowJetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt4EMPFlowJetsCPContent.py index 5f62fae4d0356e3653dcbedbb8843bf6dc3be304..0da5fdcb3a28c4fa26366eaf5f1cd91c68d2aacf 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt4EMPFlowJetsCPContent.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt4EMPFlowJetsCPContent.py @@ -4,11 +4,9 @@ AntiKt4EMPFlowJetsCPContent = [ "Kt4EMPFlowEventShape", "Kt4EMPFlowEventShapeAux.Density", "AntiKt4EMPFlowJets", -"AntiKt4EMPFlowJetsAux.pt.eta.phi.m.JetConstitScaleMomentum_pt.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_m.NumTrkPt500.SumPtTrkPt500.NumChargedPFOPt500.SumPtChargedPFOPt500.EnergyPerSampling.EMFrac.ActiveArea4vec_eta.ActiveArea4vec_m.ActiveArea4vec_phi.ActiveArea4vec_pt.AverageLArQF.DetectorEta.FracSamplingMax.FracSamplingMaxIndex.GhostTrack.HECFrac.HECQuality.JetPileupScaleMomentum_eta.JetPileupScaleMomentum_m.JetPileupScaleMomentum_phi.JetPileupScaleMomentum_pt.Jvt.JVFCorr.JvtRpt.LArQuality.NegativeE.NumTrkPt1000.NumChargedPFOPt1000.OriginCorrected.PileupCorrected.TrackWidthPt1000.ChargedPFOWidthPt1000.GhostMuonSegment.GhostMuonSegmentCount.JetOriginConstitScaleMomentum_eta.JetOriginConstitScaleMomentum_m.JetOriginConstitScaleMomentum_phi.JetOriginConstitScaleMomentum_pt", +"AntiKt4EMPFlowJetsAux.pt.eta.phi.m.JetConstitScaleMomentum_pt.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_m.NumTrkPt500.SumPtTrkPt500.NumChargedPFOPt500.SumPtChargedPFOPt500.EnergyPerSampling.ActiveArea4vec_eta.ActiveArea4vec_m.ActiveArea4vec_phi.ActiveArea4vec_pt.DetectorEta.DetectorY.FracSamplingMax.FracSamplingMaxIndex.GhostTrack.Jvt.JVFCorr.JvtRpt.NumTrkPt1000.NumChargedPFOPt1000.TrackWidthPt1000.ChargedPFOWidthPt1000.GhostMuonSegmentCount.PartonTruthLabelID.ConeTruthLabelID.HadronConeExclExtendedTruthLabelID.HadronConeExclTruthLabelID.TrueFlavor.Timing.DFCommonJets_fJvt", "MET_Track", "MET_TrackAux.name.mpx.mpy", -"MuonSegments", -"MuonSegmentsAux.", "PrimaryVertices", "PrimaryVerticesAux.vertexType" ] diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt4EMTopoJetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt4EMTopoJetsCPContent.py index 8afc08bf1d07492b48abf29d46fa5ed79601dcee..ab944beb88551fd15d4bcb4a2d4bf20e2eeb2789 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt4EMTopoJetsCPContent.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt4EMTopoJetsCPContent.py @@ -1,14 +1,14 @@ # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +AntiKt4EMTopoJetsCPContentAux = "AntiKt4EMTopoJetsAux.pt.eta.phi.m.JetConstitScaleMomentum_pt.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_m.NumTrkPt500.SumPtTrkPt500.EnergyPerSampling.ActiveArea4vec_eta.ActiveArea4vec_m.ActiveArea4vec_phi.ActiveArea4vec_pt.DetectorEta.DetectorY.FracSamplingMax.FracSamplingMaxIndex.GhostTrack.Jvt.JVFCorr.JvtRpt.NumTrkPt1000.TrackWidthPt1000.GhostMuonSegmentCount.PartonTruthLabelID.ConeTruthLabelID.HadronConeExclExtendedTruthLabelID.HadronConeExclTruthLabelID.TrueFlavor.DFCommonJets_jetClean_LooseBad.DFCommonJets_jetClean_TightBad.Timing.DFCommonJets_MVfJVT" + AntiKt4EMTopoJetsCPContent = [ "Kt4EMTopoOriginEventShape", "Kt4EMTopoOriginEventShapeAux.Density", "AntiKt4EMTopoJets", -"AntiKt4EMTopoJetsAux.pt.eta.phi.m.JetConstitScaleMomentum_pt.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_m.NumTrkPt500.SumPtTrkPt500.EnergyPerSampling.EMFrac.ActiveArea4vec_eta.ActiveArea4vec_m.ActiveArea4vec_phi.ActiveArea4vec_pt.AverageLArQF.DetectorEta.FracSamplingMax.FracSamplingMaxIndex.GhostTrack.HECFrac.HECQuality.JetPileupScaleMomentum_eta.JetPileupScaleMomentum_m.JetPileupScaleMomentum_phi.JetPileupScaleMomentum_pt.Jvt.JVFCorr.JvtRpt.LArQuality.NegativeE.NumTrkPt1000.OriginCorrected.PileupCorrected.TrackWidthPt1000.GhostMuonSegment.GhostMuonSegmentCount.JetOriginConstitScaleMomentum_eta.JetOriginConstitScaleMomentum_m.JetOriginConstitScaleMomentum_phi.JetOriginConstitScaleMomentum_pt", +AntiKt4EMTopoJetsCPContentAux, "MET_Track", "MET_TrackAux.name.mpx.mpy", -"MuonSegments", -"MuonSegmentsAux.", "PrimaryVertices", "PrimaryVerticesAux.vertexType" ] diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt4LCTopoJetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt4LCTopoJetsCPContent.py index 1cbdc3c0794f848d11b27064df32d1f105a030d9..b93530571bf03d802250d76e572d8acb1ba070ca 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt4LCTopoJetsCPContent.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt4LCTopoJetsCPContent.py @@ -4,11 +4,9 @@ AntiKt4LCTopoJetsCPContent = [ "Kt4LCTopoOriginEventShape", "Kt4LCTopoOriginEventShapeAux.Density", "AntiKt4LCTopoJets", -"AntiKt4LCTopoJetsAux.pt.eta.phi.m.JetConstitScaleMomentum_pt.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_m.NumTrkPt500.SumPtTrkPt500.EnergyPerSampling.EMFrac.ActiveArea4vec_eta.ActiveArea4vec_m.ActiveArea4vec_phi.ActiveArea4vec_pt.AverageLArQF.DetectorEta.FracSamplingMax.FracSamplingMaxIndex.GhostTrack.HECFrac.HECQuality.JetPileupScaleMomentum_eta.JetPileupScaleMomentum_m.JetPileupScaleMomentum_phi.JetPileupScaleMomentum_pt.Jvt.JVFCorr.JvtRpt.LArQuality.NegativeE.NumTrkPt1000.OriginCorrected.PileupCorrected.TrackWidthPt1000.GhostMuonSegment.GhostMuonSegmentCount.JetOriginConstitScaleMomentum_eta.JetOriginConstitScaleMomentum_m.JetOriginConstitScaleMomentum_phi.JetOriginConstitScaleMomentum_pt", +"AntiKt4LCTopoJetsAux.pt.eta.phi.m.JetConstitScaleMomentum_pt.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_m.NumTrkPt500.SumPtTrkPt500.EnergyPerSampling.ActiveArea4vec_eta.ActiveArea4vec_m.ActiveArea4vec_phi.ActiveArea4vec_pt.DetectorEta.DetectorY.FracSamplingMax.FracSamplingMaxIndex.GhostTrack.Jvt.JVFCorr.JvtRpt.NumTrkPt1000.TrackWidthPt1000.GhostMuonSegmentCount.PartonTruthLabelID.ConeTruthLabelID.HadronConeExclExtendedTruthLabelID.HadronConeExclTruthLabelID.TrueFlavor.Timing", "MET_Track", "MET_TrackAux.name.mpx.mpy", -"MuonSegments", -"MuonSegmentsAux.", "PrimaryVertices", "PrimaryVerticesAux.vertexType" ] diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt4TruthDressedWZJetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt4TruthDressedWZJetsCPContent.py new file mode 100644 index 0000000000000000000000000000000000000000..9531c437c4d1b9d923016ce96630167ad7072c65 --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt4TruthDressedWZJetsCPContent.py @@ -0,0 +1,7 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +AntiKt4TruthDressedWZJetsCPContent = [ +"AntiKt4TruthDressedWZJets", +"AntiKt4TruthDressedWZJetsAux.pt.eta.phi.m.PartonTruthLabelID.ConeTruthLabelID.HadronConeExclExtendedTruthLabelID.HadronConeExclTruthLabelID.TrueFlavor.GhostBHadronsFinalCount.GhostBHadronsFinal" +] + diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt4TruthJetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt4TruthJetsCPContent.py new file mode 100644 index 0000000000000000000000000000000000000000..5ce6ea129344b77c8cf9681a160d83237db4da12 --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt4TruthJetsCPContent.py @@ -0,0 +1,7 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +AntiKt4TruthJetsCPContent = [ +"AntiKt4TruthJets", +"AntiKt4TruthJetsAux.pt.eta.phi.m.PartonTruthLabelID.ConeTruthLabelID.HadronConeExclExtendedTruthLabelID.HadronConeExclTruthLabelID.TrueFlavor" +] + diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt4TruthWZJetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt4TruthWZJetsCPContent.py new file mode 100644 index 0000000000000000000000000000000000000000..ac42966e07979211cd62cd1be885d938f2247044 --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt4TruthWZJetsCPContent.py @@ -0,0 +1,7 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +AntiKt4TruthWZJetsCPContent = [ +"AntiKt4TruthWZJets", +"AntiKt4TruthWZJetsAux.pt.eta.phi.m.PartonTruthLabelID.ConeTruthLabelID.HadronConeExclExtendedTruthLabelID.HadronConeExclTruthLabelID.TrueFlavor.GhostBHadronsFinalCount.GhostBHadronsFinal" +] + diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt5LCTopoJetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt5LCTopoJetsCPContent.py new file mode 100644 index 0000000000000000000000000000000000000000..57d4e1159c72ac1c00a20171518d0c6a72da81d5 --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt5LCTopoJetsCPContent.py @@ -0,0 +1,12 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +AntiKt5LCTopoJetsCPContent = [ +"Kt4LCTopoOriginEventShape", +"Kt4LCTopoOriginEventShapeAux.Density", +"AntiKt5LCTopoJets", +"AntiKt5LCTopoJetsAux.pt.eta.phi.m.JetConstitScaleMomentum_pt.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_m.NumTrkPt500.SumPtTrkPt500.EnergyPerSampling.ActiveArea4vec_eta.ActiveArea4vec_m.ActiveArea4vec_phi.ActiveArea4vec_pt.DetectorEta.DetectorY.FracSamplingMax.FracSamplingMaxIndex.GhostTrack.Jvt.JVFCorr.JvtRpt.NumTrkPt1000.TrackWidthPt1000.GhostMuonSegmentCount.PartonTruthLabelID.ConeTruthLabelID.HadronConeExclExtendedTruthLabelID.HadronConeExclTruthLabelID.TrueFlavor.Timing", +"MET_Track", +"MET_TrackAux.name.mpx.mpy", +"PrimaryVertices", +"PrimaryVerticesAux.vertexType" +] diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt6LCTopoJetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt6LCTopoJetsCPContent.py new file mode 100644 index 0000000000000000000000000000000000000000..c88b609afbe6629269b1636751d0ea0476694fd9 --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt6LCTopoJetsCPContent.py @@ -0,0 +1,12 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +AntiKt6LCTopoJetsCPContent = [ +"Kt4LCTopoOriginEventShape", +"Kt4LCTopoOriginEventShapeAux.Density", +"AntiKt6LCTopoJets", +"AntiKt6LCTopoJetsAux.pt.eta.phi.m.JetConstitScaleMomentum_pt.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_m.NumTrkPt500.SumPtTrkPt500.EnergyPerSampling.ActiveArea4vec_eta.ActiveArea4vec_m.ActiveArea4vec_phi.ActiveArea4vec_pt.DetectorEta.DetectorY.FracSamplingMax.FracSamplingMaxIndex.GhostTrack.Jvt.JVFCorr.JvtRpt.NumTrkPt1000.TrackWidthPt1000.GhostMuonSegmentCount.PartonTruthLabelID.ConeTruthLabelID.HadronConeExclExtendedTruthLabelID.HadronConeExclTruthLabelID.TrueFlavor.Timing", +"MET_Track", +"MET_TrackAux.name.mpx.mpy", +"PrimaryVertices", +"PrimaryVerticesAux.vertexType" +] diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt7LCTopoJetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt7LCTopoJetsCPContent.py new file mode 100644 index 0000000000000000000000000000000000000000..b7160ed89058677e2dad45b1500d0c6deb083c15 --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt7LCTopoJetsCPContent.py @@ -0,0 +1,12 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +AntiKt7LCTopoJetsCPContent = [ +"Kt4LCTopoOriginEventShape", +"Kt4LCTopoOriginEventShapeAux.Density", +"AntiKt7LCTopoJets", +"AntiKt7LCTopoJetsAux.pt.eta.phi.m.JetConstitScaleMomentum_pt.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_m.NumTrkPt500.SumPtTrkPt500.EnergyPerSampling.ActiveArea4vec_eta.ActiveArea4vec_m.ActiveArea4vec_phi.ActiveArea4vec_pt.DetectorEta.DetectorY.FracSamplingMax.FracSamplingMaxIndex.GhostTrack.Jvt.JVFCorr.JvtRpt.NumTrkPt1000.TrackWidthPt1000.GhostMuonSegmentCount.PartonTruthLabelID.ConeTruthLabelID.HadronConeExclExtendedTruthLabelID.HadronConeExclTruthLabelID.TrueFlavor.Timing", +"MET_Track", +"MET_TrackAux.name.mpx.mpy", +"PrimaryVertices", +"PrimaryVerticesAux.vertexType" +] diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt8EMPFlowExKt2GASubJetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt8EMPFlowExKt2GASubJetsCPContent.py new file mode 100644 index 0000000000000000000000000000000000000000..43bee234718b3e08d764f0dbfead2701cb6ad999 --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt8EMPFlowExKt2GASubJetsCPContent.py @@ -0,0 +1,6 @@ +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + +AntiKt8EMPFlowExKt2GASubJetsCPContent = [ +"AntiKt8EMPFlowExKt2GASubJets", +"AntiKt8EMPFlowExKt2GASubJetsAux.pt.eta.phi.m", +] diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt8EMPFlowExKt2SubJetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt8EMPFlowExKt2SubJetsCPContent.py new file mode 100644 index 0000000000000000000000000000000000000000..2144e99039121209812d97e5442bc5059ed8af17 --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt8EMPFlowExKt2SubJetsCPContent.py @@ -0,0 +1,6 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +AntiKt8EMPFlowExKt2SubJetsCPContent = [ +"AntiKt8EMPFlowExKt2SubJets", +"AntiKt8EMPFlowExKt2SubJetsAux.pt.eta.phi.m", +] diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt8EMPFlowExKt3GASubJetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt8EMPFlowExKt3GASubJetsCPContent.py new file mode 100644 index 0000000000000000000000000000000000000000..16e8ad9de2806d504926a48319a59ae26e52e5e0 --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt8EMPFlowExKt3GASubJetsCPContent.py @@ -0,0 +1,6 @@ +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + +AntiKt8EMPFlowExKt3GASubJetsCPContent = [ +"AntiKt8EMPFlowExKt3GASubJets", +"AntiKt8EMPFlowExKt3GASubJetsAux.pt.eta.phi.m", +] diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt8EMPFlowExKt3SubJetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt8EMPFlowExKt3SubJetsCPContent.py new file mode 100644 index 0000000000000000000000000000000000000000..eb3a376c11c7e8086f68edf5b43b12b1f2c87973 --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt8EMPFlowExKt3SubJetsCPContent.py @@ -0,0 +1,6 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +AntiKt8EMPFlowExKt3SubJetsCPContent = [ +"AntiKt8EMPFlowExKt3SubJets", +"AntiKt8EMPFlowExKt3SubJetsAux.pt.eta.phi.m", +] diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt8EMPFlowJetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt8EMPFlowJetsCPContent.py new file mode 100644 index 0000000000000000000000000000000000000000..085000ec2a04709f1629d3b68c21a03bc686f67b --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt8EMPFlowJetsCPContent.py @@ -0,0 +1,6 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +AntiKt8EMPFlowJetsCPContent = [ +"AntiKt8EMPFlowJets", +"AntiKt8EMPFlowJetsAux.pt.eta.phi.m.GhostTrack.ExKt2SubJets.ExKt3SubJets.ExKt2GASubJets.ExKt3GASubJets.constituentLinks.Parent", +] diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt8EMTopoExKt2SubJetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt8EMTopoExKt2SubJetsCPContent.py new file mode 100644 index 0000000000000000000000000000000000000000..431526d5074ce8954dfa2be5c2f22031eb019386 --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt8EMTopoExKt2SubJetsCPContent.py @@ -0,0 +1,6 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +AntiKt8EMTopoExKt2SubJetsCPContent = [ +"AntiKt8EMTopoExKt2SubJets", +"AntiKt8EMTopoExKt2SubJetsAux.pt.eta.phi.m", +] diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt8EMTopoExKt3SubJetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt8EMTopoExKt3SubJetsCPContent.py new file mode 100644 index 0000000000000000000000000000000000000000..45eb8d5a70d4005a2c981dc28a354cb303b71193 --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt8EMTopoExKt3SubJetsCPContent.py @@ -0,0 +1,6 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +AntiKt8EMTopoExKt3SubJetsCPContent = [ +"AntiKt8EMTopoExKt3SubJets", +"AntiKt8EMTopoExKt3SubJetsAux.pt.eta.phi.m", +] diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt8EMTopoJetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt8EMTopoJetsCPContent.py new file mode 100644 index 0000000000000000000000000000000000000000..c203201a33e758c5a395a09e2238bae90634ee9f --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt8EMTopoJetsCPContent.py @@ -0,0 +1,6 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +AntiKt8EMTopoJetsCPContent = [ +"AntiKt8EMTopoJets", +"AntiKt8EMTopoJetsAux.pt.eta.phi.m.GhostTrack.ExKt2SubJets.ExKt3SubJets", +] diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt8LCTopoJetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt8LCTopoJetsCPContent.py new file mode 100644 index 0000000000000000000000000000000000000000..25cb857d52b8de133e313e11ac3228f12fdcf963 --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt8LCTopoJetsCPContent.py @@ -0,0 +1,12 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +AntiKt8LCTopoJetsCPContent = [ +"Kt4LCTopoOriginEventShape", +"Kt4LCTopoOriginEventShapeAux.Density", +"AntiKt8LCTopoJets", +"AntiKt8LCTopoJetsAux.pt.eta.phi.m.JetConstitScaleMomentum_pt.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_m.NumTrkPt500.SumPtTrkPt500.EnergyPerSampling.ActiveArea4vec_eta.ActiveArea4vec_m.ActiveArea4vec_phi.ActiveArea4vec_pt.DetectorEta.DetectorY.FracSamplingMax.FracSamplingMaxIndex.GhostTrack.Jvt.JVFCorr.JvtRpt.NumTrkPt1000.TrackWidthPt1000.GhostMuonSegmentCount.PartonTruthLabelID.ConeTruthLabelID.HadronConeExclExtendedTruthLabelID.HadronConeExclTruthLabelID.TrueFlavor.Timing", +"MET_Track", +"MET_TrackAux.name.mpx.mpy", +"PrimaryVertices", +"PrimaryVerticesAux.vertexType" +] diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/ExtendedJetCommon.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/ExtendedJetCommon.py index ba0c393d802f2a5d464fa6d9ef0692944206e3c9..e205b87b638aadb378e9f0fec5ba9a8b2bec5627 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/ExtendedJetCommon.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/ExtendedJetCommon.py @@ -8,19 +8,57 @@ from DerivationFrameworkCore.DerivationFrameworkMaster import * from DerivationFrameworkJetEtMiss.JetCommon import * from JetRec.JetRecFlags import jetFlags +from JetJvtEfficiency.JetJvtEfficiencyToolConfig import (getJvtEffTool, getJvtEffToolName) from AthenaCommon import Logging extjetlog = Logging.logging.getLogger('ExtendedJetCommon') +def nameJetsFromAlg(alg): + """ Name a jet collection from its algorithm + + The jet code likes to pass around the algorithm name (e.g. + AntiKt4EMTopo) rather than the jet collection. This was previously fine + as all that was needed to do was to append 'Jets' to the name, however + now that we have date-stamped b-tagging containers, this simple rule is + not so simple... + """ + if "_BTagging" in alg: + return alg.replace("_BTagging", "Jets_BTagging") + else: + return alg+"Jets" + + +################################################################## +# Jet helpers for large-radius groomed jets ################################################################## def addDefaultTrimmedJets(sequence,outputlist,dotruth=True,writeUngroomed=False): if DerivationFrameworkIsMonteCarlo and dotruth: - addTrimmedJets('AntiKt', 1.0, 'Truth', rclus=0.2, ptfrac=0.05, algseq=sequence, outputGroup=outputlist, writeUngroomed=writeUngroomed) - addTrimmedJets('AntiKt', 1.0, 'LCTopo', rclus=0.2, ptfrac=0.05, algseq=sequence, outputGroup=outputlist, writeUngroomed=writeUngroomed) + addTrimmedJets('AntiKt', 1.0, 'Truth', rclus=0.2, ptfrac=0.05, mods="truth_groomed", + algseq=sequence, outputGroup=outputlist, writeUngroomed=writeUngroomed) + addTrimmedJets('AntiKt', 1.0, 'LCTopo', rclus=0.2, ptfrac=0.05, mods="lctopo_groomed", + algseq=sequence, outputGroup=outputlist, writeUngroomed=writeUngroomed) + +def addTCCTrimmedJets(sequence,outputlist,dotruth=True,writeUngroomed=False): + addTrimmedJets('AntiKt', 1.0, 'TrackCaloCluster', rclus=0.2, ptfrac=0.05, mods="tcc_groomed", + algseq=sequence, outputGroup=outputlist, writeUngroomed=writeUngroomed) + +def addCSSKSoftDropJets(sequence, seq_name, logger=extjetlog): + vrJetName, vrGhostLabel = buildVRJets( + sequence, do_ghost=True, logger=logger) + + addVRJets(sequence, do_ghost=True, logger=logger) + + addConstModJets("AntiKt", 1.0, "LCTopo", ["CS", "SK"], sequence, seq_name, + ptmin=40000, ptminFilter=50000, mods="lctopo_ungroomed", + addGetters=[vrGhostLabel.lower()]) + addSoftDropJets("AntiKt", 1.0, "LCTopo", beta=1.0, zcut=0.1, + algseq=sequence, outputGroup=seq_name, + writeUngroomed=True, mods="lctopo_groomed", + constmods=["CS", "SK"]) ################################################################## -# Add AntiKt jets +# Jet helpers for ungroomed jets (removed in xAOD reduction) ################################################################## from BTagging.BTaggingFlags import BTaggingFlags @@ -37,17 +75,20 @@ def addAntiKt10LCTopoJets(sequence, outputlist): addStandardJets("AntiKt", 1.0, "LCTopo", ptmin=40000, ptminFilter=50000, mods="lctopo_ungroomed", algseq=sequence, outputGroup=outputlist) def addAntiKt2PV0TrackJets(sequence, outputlist): - btag_akt2trk = ConfInst.setupJetBTaggerTool(ToolSvc, JetCollection="AntiKt2Track", AddToToolSvc=True, - Verbose=True, - options={"name" : "btagging_antikt2track", - "BTagName" : "BTagging_AntiKt2Track", - "BTagJFVtxName": "JFVtx", - "BTagSVName" : "SecVtx", - }, - SetupScheme = "", - TaggerList = ['IP2D', 'IP3D', 'MultiSVbb1', 'MultiSVbb2', 'SV1', 'JetFitterNN', 'SoftMu', 'MV2c10', 'MV2c10mu', 'MV2c10rnn', 'JetVertexCharge', 'MV2cl100' , 'MVb', 'DL1', 'DL1rnn', 'DL1mu', 'RNNIP', 'MV2c10Flip'] - ) - jtm.modifiersMap["akt2track"] = jtm.modifiersMap["track_ungroomed"] + [btag_akt2trk] + + #To be fixed by FTAG + #btag_akt2trk = ConfInst.setupJetBTaggerTool(ToolSvc, JetCollection="AntiKt2Track", AddToToolSvc=True, + # Verbose=True, + # options={"name" : "btagging_antikt2track", + # "BTagName" : "BTagging_AntiKt2Track", + # "BTagJFVtxName": "JFVtx", + # "BTagSVName" : "SecVtx", + # }, + # SetupScheme = "", + # TaggerList = ['IP2D', 'IP3D', 'MultiSVbb1', 'MultiSVbb2', 'SV1', 'JetFitterNN', 'SoftMu', 'MV2c10', 'MV2c10mu', 'MV2c10rnn', 'JetVertexCharge', 'MV2cl100' , 'MVb', 'DL1', 'DL1rnn', 'DL1mu', 'RNNIP', 'MV2c10Flip'] + #) + #jtm.modifiersMap["akt2track"] = jtm.modifiersMap["track_ungroomed"] + [btag_akt2trk] + jtm.modifiersMap["akt2track"] = jtm.modifiersMap["track_ungroomed"] addStandardJets("AntiKt", 0.2, "PV0Track", ptmin=2000, mods="akt2track", algseq=sequence, outputGroup=outputlist) @@ -57,6 +98,10 @@ def addAntiKt4PV0TrackJets(sequence, outputlist): def addAntiKt10PV0TrackJets(sequence, outputlist): addStandardJets("AntiKt", 1.0, "PV0Track", ptmin=2000, ptminFilter=40000, mods="track_ungroomed", algseq=sequence, outputGroup=outputlist) +def addAntiKt2TruthJets(sequence,outputlist): + if DerivationFrameworkIsMonteCarlo: + addStandardJets("AntiKt", 0.2, "Truth", ptmin=5000, mods="truth_ungroomed", algseq=sequence, outputGroup=outputlist) + def addAntiKt4TruthJets(sequence,outputlist): if DerivationFrameworkIsMonteCarlo: addStandardJets("AntiKt", 0.4, "Truth", ptmin=5000, mods="truth_ungroomed", algseq=sequence, outputGroup=outputlist) @@ -65,6 +110,10 @@ def addAntiKt4TruthWZJets(sequence,outputlist): if DerivationFrameworkIsMonteCarlo: addStandardJets("AntiKt", 0.4, "TruthWZ", ptmin=5000, mods="truth_ungroomed", algseq=sequence, outputGroup=outputlist) +def addAntiKt4TruthDressedWZJets(sequence,outputlist): + if DerivationFrameworkIsMonteCarlo: + addStandardJets("AntiKt", 0.4, "TruthDressedWZ", ptmin=5000, mods="truth_ungroomed", algseq=sequence, outputGroup=outputlist) + def addAntiKt10TruthJets(sequence,outputlist): if DerivationFrameworkIsMonteCarlo: addStandardJets("AntiKt", 1.0, "Truth", ptmin=40000, mods="truth_ungroomed", algseq=sequence, outputGroup=outputlist) @@ -73,6 +122,8 @@ def addAntiKt10TruthWZJets(sequence,outputlist): if DerivationFrameworkIsMonteCarlo: addStandardJets("AntiKt", 1.0, "TruthWZ", ptmin=40000, mods="truth_ungroomed", algseq=sequence, outputGroup=outputlist) +################################################################## + def replaceAODReducedJets(jetlist,sequence,outputlist): extjetlog.info( "Replacing AOD-reduced jet collections: {0}".format(",".join(jetlist))) if "AntiKt2PV0TrackJets" in jetlist: @@ -81,6 +132,8 @@ def replaceAODReducedJets(jetlist,sequence,outputlist): addAntiKt4PV0TrackJets(sequence,outputlist) if "AntiKt10PV0TrackJets" in jetlist: addAntiKt10PV0TrackJets(sequence,outputlist) + if "AntiKt2TruthJets" in jetlist: + addAntiKt2TruthJets(sequence,outputlist) if "AntiKt4TruthJets" in jetlist: addAntiKt4TruthJets(sequence,outputlist) if "AntiKt4TruthWZJets" in jetlist: @@ -89,9 +142,38 @@ def replaceAODReducedJets(jetlist,sequence,outputlist): addAntiKt10TruthJets(sequence,outputlist) if "AntiKt10TruthWZJets" in jetlist: addAntiKt10TruthWZJets(sequence,outputlist) + if "AntiKt2LCTopoJets" in jetlist: + addAntiKt2LCTopoJets(sequence,outputlist) if "AntiKt10LCTopoJets" in jetlist: addAntiKt10LCTopoJets(sequence,outputlist) +################################################################## +# Jet helpers for adding low-pt jets needed for calibration +################################################################## + +# 2 GeV cut after pileup suppression for in-situ Z +def addAntiKt4LowPtJets(sequence,outputlist): + addStandardJets("AntiKt", 0.4, "EMTopo", namesuffix="LowPt", ptmin=2000, ptminFilter=2000, + mods="emtopo_ungroomed", algseq=sequence, outputGroup=outputlist,calibOpt="ar") + addStandardJets("AntiKt", 0.4, "LCTopo", namesuffix="LowPt", ptmin=2000, ptminFilter=2000, + mods="lctopo_ungroomed", algseq=sequence, outputGroup=outputlist,calibOpt="ar") + + addCHSPFlowObjects() + addStandardJets("AntiKt", 0.4, "EMPFlow", namesuffix="LowPt", ptmin=2000, ptminFilter=2000, + mods="pflow_ungroomed", algseq=sequence, outputGroup=outputlist,calibOpt="ar:pflow") + +################################################################## + +# 1 MeV cut at constituent level for MCJES +def addAntiKt4NoPtCutJets(sequence,outputlist): + addStandardJets("AntiKt", 0.4, "EMTopo", namesuffix="NoPtCut", ptmin=0, ptminFilter=1, + mods="emtopo_ungroomed", algseq=sequence, outputGroup=outputlist,calibOpt="none") + addStandardJets("AntiKt", 0.4, "LCTopo", namesuffix="NoPtCut", ptmin=0, ptminFilter=1, + mods="lctopo_ungroomed", algseq=sequence, outputGroup=outputlist,calibOpt="none") + addCHSPFlowObjects() + addStandardJets("AntiKt", 0.4, "EMPFlow", namesuffix="NoPtCut", ptmin=0, ptminFilter=1, + mods="pflow_ungroomed", algseq=sequence, outputGroup=outputlist,calibOpt="none") + ################################################################## def applyJetAugmentation(jetalg,algname,sequence,jetaugtool): @@ -104,19 +186,24 @@ def applyJetAugmentation(jetalg,algname,sequence,jetaugtool): if not jetaugtool in jetaug.AugmentationTools: jetaug.AugmentationTools.append(jetaugtool) -def getJetAugmentationTool(jetalg): - jetaugtoolname = 'DFJetAug_'+jetalg +def getJetAugmentationTool(jetalg, suffix=''): + jetaugtoolname = 'DFJetAug_'+jetalg+suffix jetaugtool = None from AthenaCommon.AppMgr import ToolSvc if hasattr(ToolSvc,jetaugtoolname): jetaugtool = getattr(ToolSvc,jetaugtoolname) else: + inJets = jetalg+'Jets' + if '_BTagging' in jetalg: + inJets = jetalg.replace('_BTagging','Jets_BTagging') jetaugtool = CfgMgr.DerivationFramework__JetAugmentationTool(jetaugtoolname, - InputJets=jetalg+'Jets') + InputJets=inJets) ToolSvc += jetaugtool return jetaugtool +################################################################## + def getJetExternalAssocTool(jetalg, extjetalg, **options): jetassoctoolname = 'DFJetExternalAssoc_%s_From_%s' % (jetalg, extjetalg) jetassoctool = None @@ -124,49 +211,89 @@ def getJetExternalAssocTool(jetalg, extjetalg, **options): if hasattr(ToolSvc,jetassoctoolname): jetassoctool = getattr(ToolSvc,jetassoctoolname) else: + extjetname = extjetalg + 'Jets' if 'BTagging' not in extjetalg else extjetalg.replace('_BTagging','Jets_BTagging') jetassoctool = CfgMgr.DerivationFramework__JetExternalAssocTool(jetassoctoolname, InputJets=jetalg+'Jets', - ExternalJetCollectionName = extjetalg+'Jets', + ExternalJetCollectionName = extjetname, **options) ToolSvc += jetassoctool return jetassoctool -def applyJetCalibration(jetalg,algname,sequence): +################################################################## +# Calibration related functions +################################################################## + +def applyJetCalibration(jetalg,algname,sequence,largeRjetconfig = 'comb', suffix = ''): + calibtoolname = 'DFJetCalib_'+jetalg - jetaugtool = getJetAugmentationTool(jetalg) + jetaugtool = getJetAugmentationTool(jetalg, suffix) + + rhoKey = 'auto' + if '_BTagging' in jetalg: + jetalg_basename = jetalg[:jetalg.find('_BTagging')] + elif 'PFlowCustomVtx' in jetalg: + jetalg_basename = 'AntiKt4EMPFlow' + rhoKey = 'Kt4PFlowCustomVtxEventShape' + else: + jetalg_basename = jetalg from AthenaCommon.AppMgr import ToolSvc + + from LumiBlockComps.LumiBlockMuWriterDefault import LumiBlockMuWriterDefault + LumiBlockMuWriterDefault() + if hasattr(ToolSvc,calibtoolname): jetaugtool.JetCalibTool = getattr(ToolSvc,calibtoolname) else: isdata=False + #largeRconfig selects config file for AntiKt10LCTopoTrimmedPtFrac5SmallR20, default is JES_MC16recommendation_FatJet_JMS_comb_19Jan2018.config + if not largeRjetconfig in ['comb','calo','TA']: + extjetlog.warning('*** Wrong value for fatjetconfig! Only \'comb\' (default), \'calo\' or \'TA\' can be used. ***') + + #Warning: these are quite outdated ... leaving for validation purposes for now configdict = {'AntiKt4EMTopo':('JES_data2016_data2015_Recommendation_Dec2016_rel21.config', 'JetArea_Residual_EtaJES_GSC'), 'AntiKt4LCTopo':('JES_data2016_data2015_Recommendation_Dec2016_rel21.config', 'JetArea_Residual_EtaJES_GSC'), - 'AntiKt4EMPFlow':('JES_MC15Prerecommendation_PFlow_Aug2016.config', - 'JetArea_Residual_EtaJES_GSC'), + 'AntiKt4EMPFlow':('JES_MC16Recommendation_Consolidated_PFlow_Apr2019_Rel21.config', + 'JetArea_Residual_EtaJES_GSC_Smear'), 'AntiKt10LCTopoTrimmedPtFrac5SmallR20':('JES_MC15recommendation_FatJet_Nov2016_QCDCombinationUncorrelatedWeights.config', 'EtaJES_JMS'), + 'AntiKt2LCTopo':('JES_2015_2016_data_Rscan2LC_18Dec2018_R21.config', + 'JetArea_Residual_EtaJES_GSC'), } + + if largeRjetconfig=='calo': #Choose JES_MC16recommendation_FatJet_JMS_calo_29Nov2017.config for AntiKt10LCTopoTrimmedPtFrac5SmallR20 + configdict.update({'AntiKt10LCTopoTrimmedPtFrac5SmallR20':('JES_MC16recommendation_FatJet_JMS_calo_29Nov2017.config', + 'EtaJES_JMS') + }) + if largeRjetconfig=='TA': #Choose JES_MC16recommendation_FatJet_JMS_TA_29Nov2017.config for AntiKt10LCTopoTrimmedPtFrac5SmallR20 + configdict.update({'AntiKt10LCTopoTrimmedPtFrac5SmallR20':('JES_MC16recommendation_FatJet_JMS_TA_29Nov2017.config', + 'EtaJES_JMS') + }) isMC = DerivationFrameworkIsMonteCarlo isAF2 = False if isMC: isAF2 = 'ATLFASTII' in inputFileSummary['metadata']['/Simulation/Parameters']['SimulationFlavour'].upper() if isMC and isAF2: + ## Warning: these are quite outdated ... leaving for validation purposes for now configdict['AntiKt4EMTopo'] = ('JES_MC15Prerecommendation_AFII_June2015.config', 'JetArea_Residual_EtaJES_GSC') + configdict['AntiKt4EMPFlow'] = ('JES_MC16Recommendation_AFII_PFlow_Apr2019_Rel21.config', + 'JetArea_Residual_EtaJES_GSC_Smear') + + config,calibseq = configdict[jetalg_basename] - config,calibseq = configdict[jetalg] - if (not isMC) and jetalg in ['AntiKt4EMTopo','AntiKt4LCTopo']: - calibseq+='_Insitu' + if (not isMC) and jetalg_basename in ['AntiKt4EMTopo','AntiKt4LCTopo','AntiKt4EMPFlow']: isdata=True + if not jetalg_basename=='AntiKt4LCTopo': calibseq = calibseq[:-6]+'_Insitu' calibtool = CfgMgr.JetCalibrationTool( calibtoolname, - JetCollection=jetalg, + JetCollection=jetalg_basename, + RhoKey=rhoKey, ConfigFile=config, CalibSequence=calibseq, IsData=isdata @@ -177,50 +304,147 @@ def applyJetCalibration(jetalg,algname,sequence): extjetlog.info('Applying calibration to jet collection: '+jetalg+'Jets') applyJetAugmentation(jetalg,algname,sequence,jetaugtool) +################################################################## + def applyJetCalibration_xAODColl(jetalg='AntiKt4EMTopo',sequence=DerivationFrameworkJob): - supportedJets = ['AntiKt4EMTopo','AntiKt4LCTopo','AntiKt4EMPFlow'] + supportedJets = ['AntiKt4EMTopo','AntiKt4LCTopo','AntiKt4EMPFlow','AntiKt4EMTopo_BTagging201810','AntiKt4EMPFlow_BTagging201810'] if not jetalg in supportedJets: extjetlog.warning('*** Calibration requested for unsupported jet collection '+jetalg+'! ***') return else: - applyJetCalibration(jetalg,'JetCommonKernel_xAODJets',sequence) + applyJetCalibration(jetalg,'JetCommonKernel_{0}'.format(jetalg),sequence) + +################################################################## def applyJetCalibration_CustomColl(jetalg='AntiKt10LCTopoTrimmedPtFrac5SmallR20',sequence=None): - supportedJets = ['AntiKt10LCTopoTrimmedPtFrac5SmallR20'] + supportedJets = ['AntiKt10LCTopoTrimmedPtFrac5SmallR20','AntiKt2LCTopo'] if not jetalg in supportedJets: extjetlog.warning('*** Calibration requested for unsupported jet collection! ***') extjetlog.warning('Supported custom jets: '+supportedJets) return else: - applyJetCalibration(jetalg,'JetCommonKernel_OTFJets',sequence) + applyJetCalibration(jetalg,'JetCommonKernel_{0}'.format(jetalg),sequence) -def updateJVT(jetalg,algname,sequence): - jetaugtool = getJetAugmentationTool(jetalg) +################################################################## +# JVT +################################################################## + +def updateJVT(jetalg,algname,sequence, suffix = '',customVxColl = 'PrimaryVertices'): + jetaugtool = getJetAugmentationTool(jetalg, suffix) if(jetaugtool==None or jetaugtool.JetCalibTool==''): extjetlog.warning('*** JVT update called but corresponding augmentation tool does not exist! ***') extjetlog.warning('*** You must apply jet calibration before scheduling JVT! ***') jvttoolname = 'DFJetJvt_'+jetalg + + pvxName = customVxColl + + if '_BTagging' in jetalg: + jetalg_basename = jetalg[:jetalg.find('_BTagging')] + elif 'PFlowCustomVtx' in jetalg: + jetalg_basename = 'AntiKt4EMPFlow' + else: + jetalg_basename = jetalg + + #use the standard name defined by the config helper + jvtefftoolname = getJvtEffToolName(jetalg_basename) + from AthenaCommon.AppMgr import ToolSvc + + #setup the jvt updating tools if not already done if hasattr(ToolSvc,jvttoolname): jetaugtool.JetJvtTool = getattr(ToolSvc,jvttoolname) else: - jvttool = CfgMgr.JetVertexTaggerTool() + jvttool = CfgMgr.JetVertexTaggerTool(jvttoolname,JetContainer=jetalg_basename+'Jets',VertexContainer=pvxName) ToolSvc += jvttool jetaugtool.JetJvtTool = jvttool + #now do the same for the efftool, but this has an auto-config function + + if hasattr(ToolSvc,jvtefftoolname): + jetaugtool.JetJvtEffTool = getattr(ToolSvc,jvtefftoolname) + extjetlog.info('Setup the jvt eff tool {}'.format(jvtefftoolname)) + else: + extjetlog.info('Setting up the jvt eff tool {}'.format(jvtefftoolname)) + jvtefftool = getJvtEffTool(jetalg_basename) + ToolSvc += jvtefftool + jetaugtool.JetJvtEffTool = jvtefftool + extjetlog.info('ExtendedJetCommon: Updating JVT for jet collection: '+jetalg+'Jets') applyJetAugmentation(jetalg,algname,sequence,jetaugtool) +################################################################## + def updateJVT_xAODColl(jetalg='AntiKt4EMTopo',sequence=DerivationFrameworkJob): - supportedJets = ['AntiKt4EMTopo'] + supportedJets = ['AntiKt4EMTopo','AntiKt4EMPFlow','AntiKt4EMTopo_BTagging201810','AntiKt4EMPFlow_BTagging201810'] if not jetalg in supportedJets: - extjetlog.warning('*** JVT update requested for unsupported jet collection! ***') + extjetlog.warning('*** JVT update requested for unsupported jet collection {}! ***'.format(jetalg)) return else: - updateJVT(jetalg,'JetCommonKernel_xAODJets',sequence) + updateJVT(jetalg,'JetCommonKernel_{0}'.format(jetalg),sequence) + +################################################################## + +def addJetPtAssociation(jetalg, truthjetalg, sequence, algname): + jetaugtool = getJetAugmentationTool(jetalg, '_PtAssoc') + if(jetaugtool==None): + extjetlog.warning('*** addJetPtAssociation called but corresponding augmentation tool does not exist! ***') + + jetptassociationtoolname = 'DFJetPtAssociation_'+truthjetalg + from AthenaCommon.AppMgr import ToolSvc + if hasattr(ToolSvc,jetptassociationtoolname): + jetaugtool.JetPtAssociationTool = getattr(ToolSvc,jetptassociationtoolname) + else: + jetptassociationtool = CfgMgr.JetPtAssociationTool(jetptassociationtoolname, InputContainer=truthjetalg, AssociationName="GhostTruth") + ToolSvc += jetptassociationtool + jetaugtool.JetPtAssociationTool = jetptassociationtool + + extjetlog.info('ExtendedJetCommon: Adding JetPtAssociationTool for jet collection: '+jetalg+'Jets') + applyJetAugmentation(jetalg,algname,sequence,jetaugtool) + +################################################################## + +def addJetTruthLabel(jetalg,algname,labelname,sequence): + supportedLabelNames = ['R10TruthLabel_R21Consolidated'] + supportedTruthJets = ['AntiKt10TruthTrimmedPtFrac5SmallR20'] + supportedRecoJets = ['AntiKt10LCTopoTrimmedPtFrac5SmallR20','AntiKt10TrackCaloClusterTrimmedPtFrac5SmallR20','AntiKt10UFOCSSKTrimmedPtFrac5SmallR20','AntiKt10UFOCSSKSoftDropBeta100Zcut10','AntiKt10UFOCSSKBottomUpSoftDropBeta100Zcut5','AntiKt10UFOCSSKRecursiveSoftDropBeta100Zcut5Ninf','AntiKt10UFOCHSTrimmedPtFrac5SmallR20'] + supportedJets = supportedRecoJets + supportedTruthJets + if not jetalg in supportedJets: + extjetlog.warning('*** JetTruthLabeling augmentation requested for unsupported jet collection {}! ***'.format(jetalg)) + return + elif not labelname in supportedLabelNames: + extjetlog.warning('*** JetTruthLabeling augmentation requested for unsupported label definition {}! ***'.format(labelname)) + return + else: + isTruthJet = False + if jetalg in supportedTruthJets: + isTruthJet = True + + jetaugtool = getJetAugmentationTool(jetalg) + + if(jetaugtool==None): + extjetlog.warning('*** addJetTruthLabel called but corresponding augmentation tool does not exist! ***') + return + + jettruthlabeltoolname = 'DFJetTruthLabel_'+jetalg+'_'+labelname + + from AthenaCommon.AppMgr import ToolSvc + + if hasattr(ToolSvc,jettruthlabeltoolname): + jetaugtool.JetTruthLabelingTool = getattr(ToolSvc,jettruthlabeltoolname) + else: + jettruthlabeltool = CfgMgr.JetTruthLabelingTool(jettruthlabeltoolname,IsTruthJetCollection=isTruthJet,TruthLabelName=labelname) + ToolSvc += jettruthlabeltool + jetaugtool.JetTruthLabelingTool = jettruthlabeltool -def applyBTaggingAugmentation(jetalg,algname='JetCommonKernel_xAODJets',sequence=DerivationFrameworkJob,btagtooldict={}): + extjetlog.info('ExtendedJetCommon: Applying JetTruthLabel augmentation to jet collection: ' + jetalg + 'Jets' + ' using ' + labelname +' definition') + applyJetAugmentation(jetalg,algname,sequence,jetaugtool) + +################################################################## + +def applyBTaggingAugmentation(jetalg,algname='default',sequence=DerivationFrameworkJob,btagtooldict={}): + if algname == 'default': + algname = 'JetCommonKernel_{0}'.format(jetalg) jetaugtool = getJetAugmentationTool(jetalg) if(jetaugtool==None or jetaugtool.JetCalibTool=='' or jetaugtool.JetJvtTool==''): @@ -235,9 +459,67 @@ def applyBTaggingAugmentation(jetalg,algname='JetCommonKernel_xAODJets',sequence jetaugtool.JetBtagTools = btagtools jetaugtool.JetBtagWPs = btagWPs - extjetlog.info('ExtendedJetCommon: Applying b-tagging working points for jet collection: '+jetalg+'Jets') + inJets = jetalg+'Jets' + if '_BTagging' in jetalg: + inJets = jetalg.replace('_BTagging','Jets_BTagging') + extjetlog.info('ExtendedJetCommon: Applying b-tagging working points for jet collection: '+inJets) applyJetAugmentation(jetalg,algname,sequence,jetaugtool) +################################################################# +### Schedule Q/G-tagging decorations ### QGTaggerTool ##### +################################################################# +def addQGTaggerTool(jetalg, sequence, algname, truthjetalg=None ): + jetaugtool = getJetAugmentationTool(jetalg,'_qgTag') + if(jetaugtool==None): + extjetlog.warning('*** addQGTaggerTool called but corresponding augmentation tool does not exist! ***') + + from AthenaCommon.AppMgr import ToolSvc + + if truthjetalg!=None: + jetptassociationtoolname = 'DFJetPtAssociation_'+truthjetalg+'_'+jetalg + if hasattr(ToolSvc,jetptassociationtoolname): + jetaugtool.JetPtAssociationTool = getattr(ToolSvc,jetptassociationtoolname) + else: + jetptassociationtool = CfgMgr.JetPtAssociationTool(jetptassociationtoolname, InputContainer=truthjetalg, AssociationName="GhostTruth") + ToolSvc += jetptassociationtool + jetaugtool.JetPtAssociationTool = jetptassociationtool + + #Track selection tool + TrackSelectionToolName = 'DFQGTaggerTool' + '_InDetTrackSelectionTool_' + jetalg + if hasattr(ToolSvc, TrackSelectionToolName): + jetaugtool.TrackSelectionTool = getattr(ToolSvc, TrackSelectionToolName) + else: + trackselectiontool = CfgMgr.InDet__InDetTrackSelectionTool( TrackSelectionToolName ) + trackselectiontool.CutLevel = "Loose" + ToolSvc += trackselectiontool + jetaugtool.TrackSelectionTool = trackselectiontool + + #Track-vertex association tool + TrackVertexAssociationToolName = 'DFQGTaggerTool' + '_InDetTrackVertexAssosciationTool_' + jetalg + if hasattr(ToolSvc, TrackVertexAssociationToolName): + jetaugtool.TrackVertexAssociationTool = getattr(ToolSvc, TrackVertexAssociationToolName) + else: + trackvertexassoctool = CfgMgr.CP__TrackVertexAssociationTool(TrackVertexAssociationToolName) + trackvertexassoctool.WorkingPoint = "Loose" + ToolSvc += trackvertexassoctool + jetaugtool.TrackVertexAssociationTool = trackvertexassoctool + + QGTaggerToolName = 'DFQGTaggerTool_' + jetalg + pvxName = "PrimaryVertices" + + #calculate variables for q/g tagging + if hasattr(ToolSvc,QGTaggerToolName): + jetaugtool.JetQGTaggerTool = getattr(ToolSvc,QGTaggerToolName) + else: + qgtool = CfgMgr.JetQGTaggerVariableTool(QGTaggerToolName,JetContainer=jetalg+'Jets',VertexContainer=pvxName,TVATool=trackvertexassoctool,TrkSelTool=trackselectiontool) + ToolSvc += qgtool + jetaugtool.JetQGTaggerTool = qgtool + + extjetlog.info('ExtendedJetCommon: Adding QGTaggerTool for jet collection: '+jetalg) + applyJetAugmentation(jetalg, algname, sequence, jetaugtool) + +################################################################## + def applyOverlapRemoval(sequence=DerivationFrameworkJob): from AssociationUtils.config import recommended_tools from AssociationUtils.AssociationUtilsConf import OverlapRemovalGenUseAlg @@ -258,4 +540,180 @@ def applyOverlapRemoval(sequence=DerivationFrameworkJob): DFCommonMuonJetTools.append(MuonJetDrTool) sequence += CfgMgr.DerivationFramework__CommonAugmentation("DFCommonMuonsKernel2",AugmentationTools = DFCommonMuonJetTools) +################################################################## +# Jet cleaning tool +################################################################## + +def getJetCleaningTool(cleaningLevel): + jetcleaningtoolname = 'JetCleaningTool_'+cleaningLevel + jetcleaningtool = None + from AthenaCommon.AppMgr import ToolSvc + if hasattr(ToolSvc,jetcleaningtoolname): + jetcleaningtool = getattr(ToolSvc,jetcleaningtoolname) + else: + jetcleaningtool = CfgMgr.JetCleaningTool(jetcleaningtoolname,CutLevel=cleaningLevel) + jetcleaningtool.UseDecorations = False + ToolSvc += jetcleaningtool + + return jetcleaningtool + +################################################################## +# Event cleaning variables +################################################################## +def eventCleanLoose_xAODColl(jetalg='AntiKt4EMTopo',sequence=DerivationFrameworkJob): + from JetSelectorTools.JetSelectorToolsConf import ECUtils__EventCleaningTool as EventCleaningTool + from JetSelectorTools.JetSelectorToolsConf import EventCleaningTestAlg + jetcleaningtoolname = "EventCleaningTool_Loose" + prefix = "DFCommonJets_" + ecToolLoose = EventCleaningTool('EventCleaningTool_Loose',CleaningLevel='LooseBad') + ecToolLoose.JetCleanPrefix = prefix + ecToolLoose.JetCleaningTool = getJetCleaningTool("LooseBad") + algCleanLoose = EventCleaningTestAlg('EventCleaningTestAlg_Loose', + EventCleaningTool=ecToolLoose, + JetCollectionName="AntiKt4EMTopoJets", + EventCleanPrefix=prefix) + sequence += algCleanLoose + +################################################################## + +def eventCleanTight_xAODColl(jetalg='AntiKt4EMTopo',sequence=DerivationFrameworkJob): + from JetSelectorTools.JetSelectorToolsConf import ECUtils__EventCleaningTool as EventCleaningTool + from JetSelectorTools.JetSelectorToolsConf import EventCleaningTestAlg + jetcleaningtoolname = "EventCleaningTool_Tight" + prefix = "DFCommonJets_" + ecToolTight = EventCleaningTool('EventCleaningTool_Tight',CleaningLevel='TightBad') + ecToolTight.JetCleanPrefix = prefix + ecToolTight.JetCleaningTool = getJetCleaningTool("TightBad") + algCleanTight = EventCleaningTestAlg('EventCleaningTestAlg_Tight', + EventCleaningTool=ecToolTight, + JetCollectionName="AntiKt4EMTopoJets", + EventCleanPrefix=prefix, + CleaningLevel="TightBad", + doEvent=False) + sequence += algCleanTight + +################################################################## + +def eventCleanLooseLLP_xAODColl(jetalg='AntiKt4EMTopo',sequence=DerivationFrameworkJob): + from JetSelectorTools.JetSelectorToolsConf import ECUtils__EventCleaningTool as EventCleaningTool + from JetSelectorTools.JetSelectorToolsConf import EventCleaningTestAlg + jetcleaningtoolname = "EventCleaningTool_LooseLLP" + prefix = "DFCommonJets_" + ecToolLooseLLP = EventCleaningTool('EventCleaningTool_LooseLLP',CleaningLevel='LooseBadLLP') + ecToolLooseLLP.JetCleanPrefix = prefix + ecToolLooseLLP.JetCleaningTool = getJetCleaningTool("LooseBadLLP") + algCleanLooseLLP = EventCleaningTestAlg('EventCleaningTestAlg_LooseLLP', + EventCleaningTool=ecToolLooseLLP, + JetCollectionName="AntiKt4EMTopoJets", + EventCleanPrefix=prefix, + CleaningLevel="LooseBadLLP", + doEvent=True) #Save the event level decoration + sequence += algCleanLooseLLP + +################################################################## + +def eventCleanVeryLooseLLP_xAODColl(jetalg='AntiKt4EMTopo',sequence=DerivationFrameworkJob): + from JetSelectorTools.JetSelectorToolsConf import ECUtils__EventCleaningTool as EventCleaningTool + from JetSelectorTools.JetSelectorToolsConf import EventCleaningTestAlg + jetcleaningtoolname = "EventCleaningTool_VeryLooseLLP" + prefix = "DFCommonJets_" + #Do not save decorations, which are anyway not listed in AntiKt4EMTopoJetsCPContent.py + ecToolVeryLooseLLP = EventCleaningTool('EventCleaningTool_VeryLooseLLP',CleaningLevel='VeryLooseBadLLP') + ecToolVeryLooseLLP.JetCleanPrefix = prefix + ecToolVeryLooseLLP.JetCleaningTool = getJetCleaningTool("VeryLooseBadLLP") + algCleanVeryLooseLLP = EventCleaningTestAlg('EventCleaningTestAlg_VeryLooseLLP', + EventCleaningTool=ecToolVeryLooseLLP, + JetCollectionName="AntiKt4EMTopoJets", + EventCleanPrefix=prefix, + CleaningLevel="VeryLooseBadLLP", + doEvent=False) #Save the event level decoration + sequence += algCleanVeryLooseLLP + +################################################################## + +def eventCleanSuperLooseLLP_xAODColl(jetalg='AntiKt4EMTopo',sequence=DerivationFrameworkJob): + from JetSelectorTools.JetSelectorToolsConf import ECUtils__EventCleaningTool as EventCleaningTool + from JetSelectorTools.JetSelectorToolsConf import EventCleaningTestAlg + jetcleaningtoolname = "EventCleaningTool_SuperLooseLLP" + prefix = "DFCommonJets_" + #Do not save decorations, which are anyway not listed in AntiKt4EMTopoJetsCPContent.py + ecToolSuperLooseLLP = EventCleaningTool('EventCleaningTool_SuperLooseLLP',CleaningLevel='SuperLooseBadLLP') + ecToolSuperLooseLLP.JetCleanPrefix = prefix + ecToolSuperLooseLLP.JetCleaningTool = getJetCleaningTool("SuperLooseBadLLP") + algCleanSuperLooseLLP = EventCleaningTestAlg('EventCleaningTestAlg_SuperLooseLLP', + EventCleaningTool=ecToolSuperLooseLLP, + JetCollectionName="AntiKt4EMTopoJets", + EventCleanPrefix=prefix, + CleaningLevel="SuperLooseBadLLP", + doEvent=False) #Save the event level decoration + sequence += algCleanSuperLooseLLP + +################################################################## + +def addRscanJets(jetalg,radius,inputtype,sequence,outputlist): + jetname = "{0}{1}{2}Jets".format(jetalg,int(radius*10),inputtype) + algname = "jetalg"+jetname + + if not hasattr(sequence,algname): + if inputtype == "Truth": + addStandardJets(jetalg, radius, "Truth", mods="truth_ungroomed", ptmin=5000, algseq=sequence, outputGroup=outputlist) + if inputtype == "TruthWZ": + addStandardJets(jetalg, radius, "TruthWZ", mods="truth_ungroomed", ptmin=5000, algseq=sequence, outputGroup=outputlist) + elif inputtype == "LCTopo": + addStandardJets(jetalg, radius, "LCTopo", mods="lctopo_ungroomed", + ghostArea=0.01, ptmin=2000, ptminFilter=7000, calibOpt="none", algseq=sequence, outputGroup=outputlist) + +################################################################## +# Helper to add origin corrected clusters +################################################################## +def addOriginCorrectedClusters(slimhelper,writeLC=False,writeEM=False): + + slimhelper.ExtraVariables.append('CaloCalTopoClusters.calE.calEta.calPhi.calM') + + if writeLC: + if not slimhelper.AppendToDictionary.has_key("LCOriginTopoClusters"): + slimhelper.AppendToDictionary["LCOriginTopoClusters"]='xAOD::CaloClusterContainer' + slimhelper.AppendToDictionary["LCOriginTopoClustersAux"]='xAOD::ShallowAuxContainer' + slimhelper.ExtraVariables.append('LCOriginTopoClusters.calEta.calPhi') + + if writeEM: + if not slimhelper.AppendToDictionary.has_key("EMOriginTopoClusters"): + slimhelper.AppendToDictionary["EMOriginTopoClusters"]='xAOD::CaloClusterContainer' + slimhelper.AppendToDictionary["EMOriginTopoClustersAux"]='xAOD::ShallowAuxContainer' + slimhelper.ExtraVariables.append('EMOriginTopoClusters.calE.calEta.calPhi') + +################################################################## +# Helper to manually schedule PFO constituent modifications +# Only use this while the automatic addition in JetAlgorithm.py +# is disabled +################################################################## +def addCHSPFlowObjects(): + # Only act if the collection does not already exist + from RecExConfig.AutoConfiguration import IsInInputFile + if not IsInInputFile("xAOD::PFOContainer","CHSParticleFlowObjects"): + # Check that an alg doing this has not already been inserted + from AthenaCommon.AlgSequence import AlgSequence + job = AlgSequence() + from JetRec.JetRecStandard import jtm + if not hasattr(job,"jetalgCHSPFlow") and not hasattr(jtm,"jetconstitCHSPFlow"): + from JetRec.JetRecConf import JetToolRunner + jtm += JetToolRunner("jetconstitCHSPFlow", + EventShapeTools=[], + Tools=[jtm.JetConstitSeq_PFlowCHS]) + # Add this tool runner to the JetAlgorithm instance "jetalg" + # which runs all preparatory tools + # This was added by JetCommon + job.jetalg.Tools.append(jtm.jetconstitCHSPFlow) + extjetlog.info("Added CHS PFlow sequence to \'jetalg\'") + extjetlog.info(job.jetalg.Tools) ################################################################## +applyJetCalibration_xAODColl("AntiKt4EMTopo") +updateJVT_xAODColl("AntiKt4EMTopo") + +# Need DFCommonElectronsLHLoose for these to work +#applyOverlapRemoval() +#eventCleanLoose_xAODColl("AntiKt4EMTopo") +#eventCleanTight_xAODColl("AntiKt4EMTopo") +#eventCleanLooseLLP_xAODColl("AntiKt4EMTopo") +#eventCleanSuperLooseLLP_xAODColl("AntiKt4EMTopo") +#eventCleanVeryLooseLLP_xAODColl("AntiKt4EMTopo") diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/JetCommon.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/JetCommon.py index 12c597b5fa801c1397ea0be7cf2ce4ac9f8ff2a9..cc2dd97d61949111caf1928968077e239e908de3 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/JetCommon.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/JetCommon.py @@ -25,6 +25,34 @@ addJetRecoToAlgSequence(DerivationFrameworkJob,eventShapeTools=None) DFJetAlgs = {} +################################################################## +# Schedule the augmentation of a flag to label events with large +# EMEC-IW Noise based on the presence of many bad quality clusters +################################################################## + +if hasattr(DerivationFrameworkJob,"BadBatmanAugmentation"): + dfjetlog.warning( "BadBatmanAugmentation: BadBatmanAugmentation already scheduled on sequence "+DerivationFrameworkJob.name ) +else: + # Check if we have clusters. If we don't then this cannot run + from RecExConfig.ObjKeyStore import objKeyStore + if objKeyStore.isInInput( "xAOD::CaloClusterContainer", "CaloCalTopoClusters" ): + # schedule it + batmanaug = CfgMgr.DerivationFramework__CommonAugmentation("BadBatmanAugmentation") + DerivationFrameworkJob += batmanaug + batmanaugtool = None + from AthenaCommon.AppMgr import ToolSvc + # create and add the tool to the alg if needed + if hasattr(ToolSvc,"BadBatmanAugmentationTool"): + batmanaugtool = getattr(ToolSvc,"BadBatmanAugmentationTool") + else: + batmanaugtool = CfgMgr.DerivationFramework__BadBatmanAugmentationTool("BadBatmanAugmentationTool") + ToolSvc += batmanaugtool + if not batmanaugtool in batmanaug.AugmentationTools: + batmanaug.AugmentationTools.append(batmanaugtool) + else: + if not objKeyStore.isInInput( "McEventCollection", "GEN_EVENT" ): + dfjetlog.warning('Could not schedule BadBatmanAugmentation (fine if running on EVNT)') + ################################################################## # Definitions of helper functions ################################################################## @@ -72,7 +100,7 @@ def addGhostAssociation(DerivationFrameworkJob): ################################################################## -def reCreatePseudoJets(jetalg, rsize, inputtype, variableRMassScale=-1.0, variableRMinRadius=-1.0): +def reCreatePseudoJets(jetalg, rsize, inputtype, variableRMassScale=-1.0, variableRMinRadius=-1.0, algseq=None): """Return a list of tools (possibly empty) to be run in a jetalg. These tools will make sure PseudoJets will be associated to the container specified by the input arguments. """ @@ -139,6 +167,12 @@ def reCreatePseudoJets(jetalg, rsize, inputtype, variableRMassScale=-1.0, variab # map the input to the jtm code for PseudoJetGetter getterMap = dict( LCTopo = 'lctopo', EMTopo = 'emtopo', EMPFlow = 'empflow', EMCPFlow = 'emcpflow', Truth='truth', TruthWZ='truthwz', PV0Track='pv0track') # create the finder for the temporary collection. + + for getter in jtm.gettersMap[getterMap[inputtype]]: + if getter not in jtm.allGetters: + algseq += getter + jtm.allGetters += getter + tmpFinderTool= jtm.addJetFinder(tmpName, jetalg, rsize, getterMap[inputtype] , **finderArgs # pass the prepared arguments ) @@ -170,14 +204,16 @@ def buildGenericGroomAlg(jetalg, rsize, inputtype, groomedName, jetToolBuilder, from JetRec.JetRecConf import JetAlgorithm # return if the alg is already scheduled here : if hasattr(algseq,ungroomedalgname): + finderalg = getattr(algseq, ungroomedalgname) dfjetlog.warning( "Algsequence "+algseq.name()+" already has an instance of "+ungroomedalgname ) elif ungroomedalgname in DFJetAlgs: dfjetlog.info( "Added jet finder"+ ungroomedalgname+" to sequence"+ algseq.name() ) + finderalg = DFJetAlgs[ungroomedalgname] algseq += DFJetAlgs[ungroomedalgname] else: # 1. make sure we have pseudo-jet in our original container # this returns a list of the needed tools to do so. - jetalgTools = reCreatePseudoJets(jetalg, rsize, inputtype, variableRMassScale, variableRMinRadius) + jetalgTools = reCreatePseudoJets(jetalg, rsize, inputtype, variableRMassScale, variableRMinRadius, algseq) if includePreTools: # enable track ghost association and JVF jetalgTools = [jtm.tracksel, jtm.tvassoc] + jetalgTools @@ -189,7 +225,10 @@ def buildGenericGroomAlg(jetalg, rsize, inputtype, groomedName, jetToolBuilder, # 2nd step run the trimming alg. We can re-use the original largeR jet since we reassociated the PseudoJet already. fatjet_groom = jetToolBuilder(groomedName, ungroomedName) - + fatjet_rectool = [t for t in finderalg.Tools if t.name() == ungroomedName][0] + fatjet_groom.InputPseudoJets = fatjet_rectool.InputPseudoJets # recopy the InputPseudoJets so tools know how to map fastjet constituents with xAOD constituents + + dfjetlog.info( "Added jet groomer "+algname+" to sequence "+algseq.name() ) groomeralg = JetAlgorithm(algname, Tools = [fatjet_groom]) DFJetAlgs[algname] = groomeralg; @@ -260,8 +299,10 @@ def addFilteredJets(jetalg, rsize, inputtype, mumax=1.0, ymin=0.15, mods="groome def addStandardJets(jetalg, rsize, inputtype, ptmin=0., ptminFilter=0., mods="default", calibOpt="none", ghostArea=0.01, - algseq=None, outputGroup="CustomJets"): - jetnamebase = "{0}{1}{2}".format(jetalg,int(rsize*10),inputtype) + algseq=None, namesuffix="", + outputGroup="CustomJets"): + + jetnamebase = "{0}{1}{2}{3}".format(jetalg,int(rsize*10),inputtype,namesuffix) jetname = jetnamebase+"Jets" algname = "jetalg"+jetnamebase OutputJets.setdefault(outputGroup , [] ).append(jetname) @@ -308,6 +349,12 @@ def addStandardJets(jetalg, rsize, inputtype, ptmin=0., ptminFilter=0., # map the input to the jtm code for PseudoJetGetter getterMap = dict( LCTopo = 'lctopo', EMTopo = 'emtopo', EMPFlow = 'empflow', EMCPFlow = 'emcpflow', Truth='truth', TruthWZ='truthwz', PV0Track='pv0track') # create the finder for the temporary collection. + + for getter in jtm.gettersMap[getterMap[inputtype]]: + if getter not in jtm.allGetters: + algseq += getter + jtm.allGetters += getter + finderTool= jtm.addJetFinder(jetname, jetalg, rsize, getterMap[inputtype] , **finderArgs # pass the prepared arguments ) @@ -318,6 +365,40 @@ def addStandardJets(jetalg, rsize, inputtype, ptmin=0., ptminFilter=0., algseq += alg DFJetAlgs[algname] = alg; +################################################################## +# Schedule the adding of BCID info +################################################################## +def addDistanceInTrain(sequence=DerivationFrameworkJob): + # simple set up -- either the alg exists and contains the tool, in which case we exit + if hasattr(sequence,"DistanceInTrainAugmentation"): + dfjetlog.warning( "DistanceInTrainAugmentation: DistanceInTrainAugmentation already scheduled on sequence"+sequence.name ) + return + else: + isMC = False + if globalflags.DataSource() == 'geant4': + isMC = True + + distanceintrainaug = CfgMgr.DerivationFramework__CommonAugmentation("DistanceInTrainAugmentation") + sequence += distanceintrainaug + + distanceintrainaugtool = None + from AthenaCommon.AppMgr import ToolSvc + # create and add the tool to the alg if needed + if hasattr(ToolSvc,"DistanceInTrainAugmentationTool"): + distanceintrainaugtool = getattr(ToolSvc,"DistanceInTrainAugmentationTool") + else: + distanceintrainaugtool = CfgMgr.DerivationFramework__DistanceInTrainAugmentationTool("DistanceInTrainAugmentationTool") + from TrigBunchCrossingTool.BunchCrossingTool import BunchCrossingTool + if isMC: + ToolSvc += BunchCrossingTool( "MC" ) + distanceintrainaugtool.BCTool = "Trig::MCBunchCrossingTool/BunchCrossingTool" + else: + ToolSvc += BunchCrossingTool( "LHC" ) + distanceintrainaugtool.BCTool = "Trig::LHCBunchCrossingTool/BunchCrossingTool" + ToolSvc += distanceintrainaugtool + if not distanceintrainaugtool in distanceintrainaug.AugmentationTools: + distanceintrainaug.AugmentationTools.append(distanceintrainaugtool) + ################################################################## # Set up helpers for adding jets to the output streams ################################################################## diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/MET_Baseline_AntiKt4EMPFlowCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/MET_Baseline_AntiKt4EMPFlowCPContent.py new file mode 100644 index 0000000000000000000000000000000000000000..5a178382203135b380b8d580d733f50c5a1bcdf7 --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/MET_Baseline_AntiKt4EMPFlowCPContent.py @@ -0,0 +1,18 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + +MET_Baseline_AntiKt4EMPFlowCPContent = [ +"AntiKt4EMPFlowJets", +"AntiKt4EMPFlowJetsAux.pt.eta.phi.m.JetConstitScaleMomentum_pt.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_m.GhostTrack.NumTrkPt500.SumPtTrkPt500.Width.EMFrac.EnergyPerSampling.PSFrac", +"Electrons", +"InDetTrackParticles", +"METAssoc_AntiKt4EMPFlow", +"METAssoc_AntiKt4EMPFlowAux.", +"MET_Core_AntiKt4EMPFlow", +"MET_Core_AntiKt4EMPFlowAux.name.mpx.mpy.sumet.source", +"MET_Truth", +"MET_TruthAux.name.mpx.mpy.sumet.source", +"Muons", +"MuonsAux.EnergyLoss.energyLossType.muonType", +"Photons", +"TauJets", +] diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/MET_Baseline_AntiKt4EMTopoCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/MET_Baseline_AntiKt4EMTopoCPContent.py new file mode 100644 index 0000000000000000000000000000000000000000..e6361def02c793c1523d5d9ee65a70cc8d15a5a6 --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/MET_Baseline_AntiKt4EMTopoCPContent.py @@ -0,0 +1,18 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + +MET_Baseline_AntiKt4EMTopoCPContent = [ +"AntiKt4EMTopoJets", +"AntiKt4EMTopoJetsAux.pt.eta.phi.m.JetConstitScaleMomentum_pt.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_m.GhostTrack.NumTrkPt500.SumPtTrkPt500.Width.EMFrac.EnergyPerSampling", +"Electrons", +"InDetTrackParticles", +"METAssoc_AntiKt4EMTopo", +"METAssoc_AntiKt4EMTopoAux.", +"MET_Core_AntiKt4EMTopo", +"MET_Core_AntiKt4EMTopoAux.name.mpx.mpy.sumet.source", +"MET_Truth", +"MET_TruthAux.name.mpx.mpy.sumet.source", +"Muons", +"MuonsAux.EnergyLoss.energyLossType.muonType", +"Photons", +"TauJets", +] diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/MET_Reference_AntiKt4EMTopoCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/MET_Reference_AntiKt4EMTopoCPContent.py index 63a7eb9eb064ba1f7e7a378cf0f4a9108fd0021d..d7e9ede32acf8162621927e6ee938ae7a191dccb 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/MET_Reference_AntiKt4EMTopoCPContent.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/MET_Reference_AntiKt4EMTopoCPContent.py @@ -2,7 +2,7 @@ MET_Reference_AntiKt4EMTopoCPContent = [ "AntiKt4EMTopoJets", -"AntiKt4EMTopoJetsAux.pt.eta.phi.m.JetConstitScaleMomentum_pt.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_m.GhostTrack.JetLCScaleMomentum_pt.JetLCScaleMomentum_eta.JetLCScaleMomentum_phi.JetLCScaleMomentum_m.NumTrkPt500.SumPtTrkPt500.Width.EMFrac.EnergyPerSampling", +"AntiKt4EMTopoJetsAux.pt.eta.phi.m.JetConstitScaleMomentum_pt.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_m.GhostTrack.NumTrkPt500.SumPtTrkPt500.Width.EMFrac.EnergyPerSampling", "Electrons", "InDetTrackParticles", "METAssoc_AntiKt4EMTopo", diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM1.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM1.py index 59b9db20f5438c18c4d6b02600bf13d6d1ec1e8c..bce4f64e4c828cd4b2cd2d86f190f3e90abf1394 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM1.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM1.py @@ -1,37 +1,59 @@ #==================================================================== -# JETM1.py -# reductionConf flag JETM1 in Reco_tf.py +# JETM1.py +# reductionConf flag JETM1 in Reco_tf.py #==================================================================== from DerivationFrameworkCore.DerivationFrameworkMaster import * from DerivationFrameworkJetEtMiss.JetCommon import * from DerivationFrameworkJetEtMiss.ExtendedJetCommon import * -#from DerivationFrameworkJetEtMiss.METCommon import * +from DerivationFrameworkInDet.InDetCommon import * + +# Include TRUTH3 containers +if DerivationFrameworkIsMonteCarlo: + from DerivationFrameworkMCTruth.MCTruthCommon import addStandardTruthContents + addStandardTruthContents() #==================================================================== -# SKIMMING TOOL +# SKIMMING TOOL #==================================================================== -from DerivationFrameworkJetEtMiss.TriggerLists import * -triggers = jetTriggers +from DerivationFrameworkJetEtMiss import TriggerLists +triggers = TriggerLists.jetTrig() # NOTE: need to be able to OR isSimulated as an OR with the trigger -orstr =' || ' -trigger = '('+orstr.join(triggers)+')' -expression = trigger+' || (EventInfo.eventTypeBitmask==1)' +expression = ' (EventInfo.eventTypeBitmask==1) || HLT_xe120_pufit_L1XE50' + +from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__TriggerSkimmingTool +JETM1TrigSkimmingTool = DerivationFramework__TriggerSkimmingTool( name = "JETM1TrigSkimmingTool1", + TriggerListOR = triggers ) +ToolSvc += JETM1TrigSkimmingTool + from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__xAODStringSkimmingTool -JETM1SkimmingTool = DerivationFramework__xAODStringSkimmingTool(name = "JETM1SkimmingTool1", +JETM1OfflineSkimmingTool = DerivationFramework__xAODStringSkimmingTool(name = "JETM1OfflineSkimmingTool1", expression = expression) -ToolSvc += JETM1SkimmingTool +ToolSvc += JETM1OfflineSkimmingTool + +# OR of the above two selections +from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__FilterCombinationOR +JETM1ORTool = DerivationFramework__FilterCombinationOR(name="JETM1ORTool", FilterList=[JETM1TrigSkimmingTool,JETM1OfflineSkimmingTool] ) +ToolSvc+=JETM1ORTool + +#======================================= +# CREATE PRIVATE SEQUENCE +#======================================= + +jetm1Seq = CfgMgr.AthSequencer("JETM1Sequence") +DerivationFrameworkJob += jetm1Seq #==================================================================== -# SET UP STREAM +# SET UP STREAM #==================================================================== streamName = derivationFlags.WriteDAOD_JETM1Stream.StreamName fileName = buildFileName( derivationFlags.WriteDAOD_JETM1Stream ) JETM1Stream = MSMgr.NewPoolRootStream( streamName, fileName ) JETM1Stream.AcceptAlgs(["JETM1Kernel"]) + #======================================= # ESTABLISH THE THINNING HELPER #======================================= @@ -40,7 +62,7 @@ JETM1ThinningHelper = ThinningHelper( "JETM1ThinningHelper" ) JETM1ThinningHelper.AppendToStream( JETM1Stream ) #==================================================================== -# THINNING TOOLS +# THINNING TOOLS #==================================================================== thinningTools = [] @@ -62,51 +84,94 @@ JETM1ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning(n ToolSvc += JETM1ElectronTPThinningTool thinningTools.append(JETM1ElectronTPThinningTool) -# Truth particle thinning -doTruthThinning = True -preserveAllDescendants = False -from AthenaCommon.GlobalFlags import globalflags -if doTruthThinning and DerivationFrameworkIsMonteCarlo: - truth_cond_WZH = "((abs(TruthParticles.pdgId) >= 23) && (abs(TruthParticles.pdgId) <= 25))" # W, Z and Higgs - truth_cond_Lepton = "((abs(TruthParticles.pdgId) >= 11) && (abs(TruthParticles.pdgId) <= 16) && (TruthParticles.barcode < 200000))" # Leptons - truth_cond_Quark = "((abs(TruthParticles.pdgId) <= 5 && (TruthParticles.pt > 10000.)) || (abs(TruthParticles.pdgId) == 6))" # Quarks - truth_cond_Gluon = "((abs(TruthParticles.pdgId) == 21) && (TruthParticles.pt > 10000.))" # Gluons - truth_cond_Photon = "((abs(TruthParticles.pdgId) == 22) && (TruthParticles.pt > 10000.) && (TruthParticles.barcode < 200000))" # Photon - truth_expression = '('+truth_cond_WZH+' || '+truth_cond_Lepton +' || '+truth_cond_Quark+'||'+truth_cond_Gluon+' || '+truth_cond_Photon+')' - - from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning - JETM1TruthThinningTool = DerivationFramework__GenericTruthThinning( name = "JETM1TruthThinningTool", - StreamName = streamName, - ParticlesKey = "TruthParticles", - VerticesKey = "TruthVertices", - ParticleSelectionString = truth_expression, - PreserveDescendants = preserveAllDescendants, - PreserveGeneratorDescendants = not preserveAllDescendants, - PreserveAncestors = True) - - ToolSvc += JETM1TruthThinningTool - thinningTools.append(JETM1TruthThinningTool) +# TrackParticles associated with small-R jets +from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning +JETM1Akt4JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = "JETM1Akt4JetTPThinningTool", + StreamName = streamName, + JetKey = "AntiKt4EMTopoJets", + SelectionString = "AntiKt4EMTopoJets.pt > 18*GeV", + InDetTrackParticlesKey = "InDetTrackParticles", + ApplyAnd = False) +ToolSvc += JETM1Akt4JetTPThinningTool +thinningTools.append(JETM1Akt4JetTPThinningTool) + +JETM1Akt4PFlowJetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = "JETM1Akt4PFlowJetTPThinningTool", + StreamName = streamName, + JetKey = "AntiKt4EMPFlowJets", + SelectionString = "AntiKt4EMPFlowJets.pt > 18*GeV", + InDetTrackParticlesKey = "InDetTrackParticles", + ApplyAnd = False) +ToolSvc += JETM1Akt4PFlowJetTPThinningTool +thinningTools.append(JETM1Akt4PFlowJetTPThinningTool) + +thinning_expression = "InDetTrackParticles.JETM1DFLoose && ( abs(InDetTrackParticles.d0) < 3.0 ) && ( abs(DFCommonInDetTrackZ0AtPV*sin(InDetTrackParticles.theta)) < 4.0 )" +from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning +JETM1TPThinningTool = DerivationFramework__TrackParticleThinning( name = "JETM1TPThinningTool", + StreamName = streamName, + SelectionString = thinning_expression, + InDetTrackParticlesKey = "InDetTrackParticles", + ApplyAnd = True) +ToolSvc += JETM1TPThinningTool +thinningTools.append(JETM1TPThinningTool) #======================================= -# CREATE PRIVATE SEQUENCE +# Augmentation tools #======================================= -jetm1Seq = CfgMgr.AthSequencer("JETM1Sequence") -DerivationFrameworkJob += jetm1Seq +augmentationTools = [] + +from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__InDetTrackSelectionToolWrapper +JETM1TrackSelectionTool = DerivationFramework__InDetTrackSelectionToolWrapper(name = "JETM1TrackSelectionTool", + ContainerName = "InDetTrackParticles", + DecorationName = "JETM1DFLoose" ) + +JETM1TrackSelectionTool.TrackSelectionTool.CutLevel = "Loose" +ToolSvc += JETM1TrackSelectionTool +augmentationTools.append(JETM1TrackSelectionTool) + #======================================= -# CREATE THE DERIVATION KERNEL ALGORITHM +# CREATE THE DERIVATION KERNEL ALGORITHM #======================================= from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel jetm1Seq += CfgMgr.DerivationFramework__DerivationKernel("JETM1Kernel" , - SkimmingTools = [JETM1SkimmingTool], + AugmentationTools = augmentationTools, + SkimmingTools = [JETM1ORTool], ThinningTools = thinningTools) #==================================================================== # Special jets #==================================================================== +from TrackCaloClusterRecTools.TrackCaloClusterConfig import runUFOReconstruction +emufoAlg = runUFOReconstruction(jetm1Seq,ToolSvc, PFOPrefix="CHS") +emcsskufoAlg = runUFOReconstruction(jetm1Seq,ToolSvc, PFOPrefix="CSSK") + +from JetRec.JetRecConf import PseudoJetGetter + +csskufopjgetter = PseudoJetGetter("csskufoPJGetter", InputContainer="CSSKUFO", OutputContainer="CSSKUFOPJ", Label="UFO", SkipNegativeEnergy=True) +jtm+=csskufopjgetter + +ufopjgetter = PseudoJetGetter("ufoPJGetter", InputContainer="CHSUFO", OutputContainer="CHSUFOPJ", Label="UFO", SkipNegativeEnergy=True) +jtm+=ufopjgetter + +# Augment AntiKt4 jets with QG tagging variables +from DerivationFrameworkJetEtMiss.ExtendedJetCommon import addQGTaggerTool +addQGTaggerTool(jetalg="AntiKt4EMTopo",sequence=jetm1Seq,algname="QGTaggerToolAlg") +addQGTaggerTool(jetalg="AntiKt4EMPFlow",sequence=jetm1Seq,algname="QGTaggerToolPFAlg") + +# Add alternative rho definitions +from DerivationFrameworkJetEtMiss.ExtendedJetCommon import addCHSPFlowObjects +addCHSPFlowObjects() +from DerivationFrameworkJetEtMiss.JetCommon import defineEDAlg +jetm1Seq += defineEDAlg(R=0.4, inputtype="EMPFlowPUSB") +jetm1Seq += defineEDAlg(R=0.4, inputtype="EMPFlowNeut") + +#SCHEDULE BTAGGING FOR PFLOW JETS +from DerivationFrameworkFlavourTag.FlavourTagCommon import FlavorTagInit +FlavorTagInit(JetCollections=['AntiKt4EMPFlowJets'], Sequencer=jetm1Seq) + OutputJets["JETM1"] = [] #======================================= @@ -117,82 +182,143 @@ reducedJetList = ["AntiKt2PV0TrackJets", "AntiKt4TruthJets"] replaceAODReducedJets(reducedJetList,jetm1Seq,"JETM1") + +############################################################################################################################################# +addCHSPFlowObjects() +addConstModJets("AntiKt", 1.0, "EMPFlow", ["CS", "SK"], jetm1Seq, "JETM1", ptmin=40000, ptminFilter=50000) +csskufogetters = [csskufopjgetter]+list(jtm.gettersMap["tcc"])[1:] +chsufogetters = [ufopjgetter]+list(jtm.gettersMap["tcc"])[1:] +addStandardJets("AntiKt", 1.0, "UFOCSSK", ptmin=40000, ptminFilter=50000, algseq=jetm1Seq, outputGroup="JETM1", customGetters = csskufogetters, constmods=["CSSK"]) +addStandardJets("AntiKt", 1.0, "UFOCHS", ptmin=40000, ptminFilter=50000, algseq=jetm1Seq, outputGroup="JETM1", customGetters = chsufogetters, constmods=["CHS"]) + # AntiKt10*PtFrac5Rclus20 addDefaultTrimmedJets(jetm1Seq,"JETM1") +addTrimmedJets("AntiKt", 1.0, "EMPFlow", rclus=0.2, ptfrac=0.05, algseq=jetm1Seq, outputGroup="JETM1", writeUngroomed=False, mods="pflow_groomed") +addTrimmedJets("AntiKt", 1.0, "UFOCHS", rclus=0.2, ptfrac=0.05, algseq=jetm1Seq, outputGroup="JETM1", writeUngroomed=False, mods="tcc_groomed") +addTrimmedJets("AntiKt", 1.0, "UFOCSSK", rclus=0.2, ptfrac=0.05, algseq=jetm1Seq, outputGroup="JETM1", writeUngroomed=False, mods="tcc_groomed") + +if DerivationFrameworkIsMonteCarlo: + addSoftDropJets('AntiKt', 1.0, 'Truth', beta=1.0, zcut=0.1, mods="truth_groomed", algseq=jetm1Seq, outputGroup="JETM1", writeUngroomed=True) + addRecursiveSoftDropJets('AntiKt', 1.0, 'Truth', beta=1.0, zcut=0.05, N=-1, mods="truth_groomed", algseq=jetm1Seq, outputGroup="JETM1", writeUngroomed=True) + addBottomUpSoftDropJets('AntiKt', 1.0, 'Truth', beta=1.0, zcut=0.05, mods="truth_groomed", algseq=jetm1Seq, outputGroup="JETM1", writeUngroomed=True) + + + +addSoftDropJets("AntiKt", 1.0, "UFOCHS", beta=1.0, zcut=0.1, algseq=jetm1Seq, outputGroup="JETM1", writeUngroomed=False, mods="tcc_groomed") +addSoftDropJets("AntiKt", 1.0, "UFOCSSK", beta=1.0, zcut=0.1, algseq=jetm1Seq, outputGroup="JETM1", writeUngroomed=False, mods="tcc_groomed") +addRecursiveSoftDropJets('AntiKt', 1.0, 'UFOCSSK', beta=1.0, zcut=0.05, N=-1, mods="tcc_groomed", algseq=jetm1Seq, outputGroup="JETM1", writeUngroomed=False) +addBottomUpSoftDropJets('AntiKt', 1.0, 'UFOCSSK', beta=1.0, zcut=0.05, mods="tcc_groomed", algseq=jetm1Seq, outputGroup="JETM1", writeUngroomed=False) + + +############################################################################################################################################# + +# Add jets with constituent-level pileup suppression +addConstModJets("AntiKt",0.4,"EMTopo",["CS","SK"],jetm1Seq,"JETM1", + ptmin=2000,ptminFilter=2000) +addConstModJets("AntiKt",0.4,"EMPFlow",["CS","SK"],jetm1Seq,"JETM1", + ptmin=2000,ptminFilter=2000) + +# Add the BCID info +addDistanceInTrain(jetm1Seq) + +#add pFlow fJVT and MVfJVT for EMTopo +applyMVfJvtAugmentation(jetalg='AntiKt4EMTopo',sequence=jetm1Seq, algname='JetForwardJvtToolBDTAlg') +getPFlowfJVT(jetalg='AntiKt4EMPFlow',sequence=jetm1Seq, algname='JetForwardPFlowJvtToolAlg') #======================================= # SCHEDULE SMALL-R JETS WITH LOW PT CUT #======================================= if DerivationFrameworkIsMonteCarlo: - from JetRec.JetRecStandard import jtm - #EMTopo - lowptjetalg = None - if "jetalgAntiKt4EMTopoLowPtJets" in DFJetAlgs.keys(): - lowptjetalg = DFJetAlgs["jetalgAntiKt4EMTopoLowPtJets"] - else: - jtm.addJetFinder("AntiKt4EMTopoLowPtJets", "AntiKt", 0.4, "emtopo", "emtopo_ungroomed", ghostArea=0.01, ptmin= 2000, ptminFilter= 2000, calibOpt="ar") - lowptjetalg = CfgMgr.JetAlgorithm("jetalgAntiKt4EMTopoLowPtJets", Tools = [jtm.AntiKt4EMTopoLowPtJets]) - DFJetAlgs["jetalgAntiKt4EMTopoLowPtJets"] = lowptjetalg; - jetm1Seq += lowptjetalg - OutputJets["JETM1"].append("AntiKt4EMTopoLowPtJets") - #LCTopo - if "jetalgAntiKt4LCTopoLowPtJets" in DFJetAlgs.keys(): - lowptjetalg = DFJetAlgs["jetalgAntiKt4LCTopoLowPtJets"] - else: - jtm.addJetFinder("AntiKt4LCTopoLowPtJets", "AntiKt", 0.4, "lctopo", "lctopo_ungroomed", ghostArea=0.01, ptmin= 2000, ptminFilter= 2000, calibOpt="ar") - lowptjetalg = CfgMgr.JetAlgorithm("jetalgAntiKt4LCTopoLowPtJets", Tools = [jtm.AntiKt4LCTopoLowPtJets]) - DFJetAlgs["jetalgAntiKt4LCTopoLowPtJets"] = lowptjetalg; - jetm1Seq += lowptjetalg - OutputJets["JETM1"].append("AntiKt4LCTopoLowPtJets") - #EMPFlow - if "jetalgAntiKt4EMPFlowLowPtJets" in DFJetAlgs.keys(): - lowptjetalg = DFJetAlgs["jetalgAntiKt4EMPFlowLowPtJets"] - else: - jtm.addJetFinder("AntiKt4EMPFlowLowPtJets", "AntiKt", 0.4, "empflow", "pflow_ungroomed", ghostArea=0.01, ptmin= 2000, ptminFilter= 2000, calibOpt="ar:pflow") - lowptjetalg = CfgMgr.JetAlgorithm("jetalgAntiKt4EMPFlowLowPtJets", Tools = [jtm.AntiKt4EMPFlowLowPtJets]) - DFJetAlgs["jetalgAntiKt4EMPFlowLowPtJets"] = lowptjetalg; - jetm1Seq += lowptjetalg - OutputJets["JETM1"].append("AntiKt4EMPFlowLowPtJets") - -if jetFlags.useTruth: - # CamKt R=1.2 jets - #addFilteredJets("CamKt", 1.2, "Truth", mumax=1.0, ymin=0.15, algseq=jetm1Seq, outputGroup="JETM1") - #addFilteredJets("CamKt", 1.2, "Truth", mumax=1.0, ymin=0.04, algseq=jetm1Seq, outputGroup="JETM1") - pass - -# CamKt R=1.2 jets -#addFilteredJets("CamKt", 1.2, "LCTopo", mumax=1.0, ymin=0.15, algseq=jetm1Seq, outputGroup="JETM1") -#addFilteredJets("CamKt", 1.2, "LCTopo", mumax=1.0, ymin=0.04, algseq=jetm1Seq, outputGroup="JETM1") + addAntiKt4NoPtCutJets(jetm1Seq,"JETM1") + ## Add GhostTruthAssociation information ## + addJetPtAssociation(jetalg="AntiKt4EMTopo", truthjetalg="AntiKt4TruthJets", sequence=jetm1Seq, algname="JetPtAssociationAlg") + addJetPtAssociation(jetalg="AntiKt4LCTopo", truthjetalg="AntiKt4TruthJets", sequence=jetm1Seq, algname="JetPtAssociationAlg") + addJetPtAssociation(jetalg="AntiKt4EMPFlow", truthjetalg="AntiKt4TruthJets", sequence=jetm1Seq, algname="JetPtAssociationAlg") + addJetPtAssociation(jetalg="AntiKt4EMTopoNoPtCut", truthjetalg="AntiKt4TruthJets", sequence=jetm1Seq, algname="JetPtAssociationAlgNoPtCut") + #Commenting for now as if disabled the building of this jet container in addAntiKt4NoPtCutJets, working on the reoptimisation of LCW at the moment + #addJetPtAssociation(jetalg="AntiKt4LCTopoNoPtCut", truthjetalg="AntiKt4TruthJets", sequence=jetm1Seq, algname="JetPtAssociationAlgNoPtCut") + addJetPtAssociation(jetalg="AntiKt4EMPFlowNoPtCut", truthjetalg="AntiKt4TruthJets", sequence=jetm1Seq, algname="JetPtAssociationAlgNoPtCut") + addJetPtAssociation(jetalg="AntiKt4EMTopoCSSK", truthjetalg="AntiKt4TruthJets", sequence=jetm1Seq, algname="JetPtAssociationAlgCSSK") + addJetPtAssociation(jetalg="AntiKt4EMPFlowCSSK", truthjetalg="AntiKt4TruthJets", sequence=jetm1Seq, algname="JetPtAssociationAlgCSSK") #==================================================================== # Add the containers to the output stream - slimming done here #==================================================================== from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper JETM1SlimmingHelper = SlimmingHelper("JETM1SlimmingHelper") +JETM1SlimmingHelper.AppendToDictionary = { + "Kt4EMPFlowPUSBEventShape": "xAOD::EventShape" , + "Kt4EMPFlowPUSBEventShapeAux": "xAOD::AuxInfoBase" , + "Kt4EMPFlowNeutEventShape": "xAOD::EventShape" , + "Kt4EMPFlowNeutEventShapeAux": "xAOD::AuxInfoBase" , + +} + JETM1SlimmingHelper.SmartCollections = ["Electrons", "Photons", "Muons", "PrimaryVertices", "AntiKt4EMTopoJets","AntiKt4LCTopoJets","AntiKt4EMPFlowJets", + "AntiKt10UFOCSSKJets", + "AntiKt10UFOCHSJets", "AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets", - "BTagging_AntiKt4EMTopo", - "BTagging_AntiKt2Track", + "AntiKt10EMPFlowTrimmedPtFrac5SmallR20Jets", + "AntiKt10UFOCHSTrimmedPtFrac5SmallR20Jets", + "AntiKt10UFOCSSKTrimmedPtFrac5SmallR20Jets", + "AntiKt10UFOCHSSoftDropBeta100Zcut10Jets", + "AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets", + "AntiKt10UFOCSSKBottomUpSoftDropBeta100Zcut5Jets", + "AntiKt10UFOCSSKRecursiveSoftDropBeta100Zcut5NinfJets", + "AntiKt4EMPFlowJets_BTagging201810", + "AntiKt4EMPFlowJets_BTagging201903", + "AntiKt4EMTopoJets_BTagging201810", + "BTagging_AntiKt4EMPFlow_201810", + "BTagging_AntiKt4EMPFlow_201903", + "BTagging_AntiKt4EMTopo_201810", ] -JETM1SlimmingHelper.AllVariables = [ "MuonTruthParticles", "egammaTruthParticles", - "TruthParticles", "TruthEvents", "TruthVertices", - "MuonSegments", - "Kt4EMTopoOriginEventShape","Kt4LCTopoOriginEventShape","Kt4EMPFlowEventShape", - ] -#JETM1SlimmingHelper.ExtraVariables = [] + +# Add QG tagger variables +JETM1SlimmingHelper.ExtraVariables += ["AntiKt4EMTopoJets.DFCommonJets_QGTagger_NTracks.DFCommonJets_QGTagger_TracksWidth.DFCommonJets_QGTagger_TracksC1", + "AntiKt4EMPFlowJets.DFCommonJets_QGTagger_NTracks.DFCommonJets_QGTagger_TracksWidth.DFCommonJets_QGTagger_TracksC1"] +JETM1SlimmingHelper.ExtraVariables += ["InDetTrackParticles.truthMatchProbability"] + +JETM1SlimmingHelper.ExtraVariables += ["AntiKt10UFOCSSKTrimmedPtFrac5SmallR20Jets.zg.rg.NumTrkPt1000.TrackWidthPt1000.GhostMuonSegmentCount.EnergyPerSampling.GhostTrack", + "AntiKt10UFOCSSKRecursiveSoftDropBeta100Zcut5NinfJets.zg.rg.NumTrkPt1000.TrackWidthPt1000.GhostMuonSegmentCount.EnergyPerSampling.GhostTrack", + "AntiKt10UFOCHSTrimmedPtFrac5SmallR20Jets.zg.rg", + "AntiKt10EMPFlowTrimmedPtFrac5SmallR20Jets.zg.rg", + "AntiKt10UFOCHSSoftDropBeta100Zcut10Jets.zg.rg", + "AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets.zg.rg.NumTrkPt1000.TrackWidthPt1000.GhostMuonSegmentCount.EnergyPerSampling.GhostTrack", + "AntiKt10UFOCSSKBottomUpSoftDropBeta100Zcut5Jets.zg.rg.NumTrkPt1000.TrackWidthPt1000.GhostMuonSegmentCount.EnergyPerSampling.GhostTrack", + "AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets.zg.rg", + "AntiKt10UFOCSSKJets.NumTrkPt1000.TrackWidthPt1000.GhostMuonSegmentCount.EnergyPerSampling.GhostTrack"] + +JETM1SlimmingHelper.AllVariables = [ "MuonSegments", "TruthVertices", + "Kt4EMTopoOriginEventShape","Kt4LCTopoOriginEventShape","Kt4EMPFlowEventShape","Kt4EMPFlowPUSBEventShape","Kt4EMPFlowNeutEventShape"] # Trigger content JETM1SlimmingHelper.IncludeJetTriggerContent = True # Add the jet containers to the stream -addJetOutputs(JETM1SlimmingHelper,["SmallR","JETM1"],[], # smart list +addJetOutputs(JETM1SlimmingHelper,["SmallR","JETM1"],["AntiKt10UFOCSSKJets", + "AntiKt10UFOCHSJets", + "AntiKt10EMPFlowTrimmedPtFrac5SmallR20Jets", + "AntiKt10UFOCHSTrimmedPtFrac5SmallR20Jets", + "AntiKt10UFOCSSKTrimmedPtFrac5SmallR20Jets", + "AntiKt10UFOCHSSoftDropBeta100Zcut10Jets", + "AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets", + "AntiKt10UFOCSSKBottomUpSoftDropBeta100Zcut5Jets", + "AntiKt10UFOCSSKRecursiveSoftDropBeta100Zcut5NinfJets", + ], # smart list [ - "AntiKt4TruthWZJets", - ]# veto list + "AntiKt4TruthWZJets", "AntiKt10EMPFlowJets", "AntiKt10EMPFlowCSSKJets" + ]# veto list, ) +if DerivationFrameworkIsMonteCarlo: + JETM1SlimmingHelper.AllVariables += ["TruthMuons", "TruthElectrons", "TruthPhotons"] + for truthc in ["TruthTop", "TruthBoson"]: + JETM1SlimmingHelper.StaticContent.append("xAOD::TruthParticleContainer#"+truthc) + JETM1SlimmingHelper.StaticContent.append("xAOD::TruthParticleAuxContainer#"+truthc+"Aux.") + + JETM1SlimmingHelper.AppendContentToStream(JETM1Stream) JETM1Stream.RemoveItem("xAOD::TrigNavigation#*") JETM1Stream.RemoveItem("xAOD::TrigNavigationAuxInfo#*") diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM10.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM10.py index 077de8c1ca5dc74b161401fb067300a8fb25e5ad..a26e1625ddd2d31bb152fbb30e18436ebfc52c6a 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM10.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM10.py @@ -6,27 +6,16 @@ from DerivationFrameworkCore.DerivationFrameworkMaster import * from DerivationFrameworkJetEtMiss.JetCommon import * from DerivationFrameworkJetEtMiss.ExtendedJetCommon import * from DerivationFrameworkJetEtMiss.METCommon import * +from DerivationFrameworkJetEtMiss.METTriggerDerivationContent import METTriggerDerivationContentManager #====================================================================================================================== # SKIMMING TOOL #====================================================================================================================== from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__TriggerSkimmingTool JETM10SkimmingTool = DerivationFramework__TriggerSkimmingTool( name = "JETM10SkimmingTool", - TriggerListOR = ["HLT_noalg_L1XE30", "HLT_noalg_L1XE40", "HLT_noalg_L1XE45"] ) + TriggerListOR = ["HLT_noalg_L1XE.*"] ) ToolSvc += JETM10SkimmingTool -#====================================================================================================================== -# AUGMENTATION TOOL -#====================================================================================================================== -from DerivationFrameworkJetEtMiss.DerivationFrameworkJetEtMissConf import DerivationFramework__METTriggerAugmentationTool -JETM10KFData15AugmentationTool = DerivationFramework__METTriggerAugmentationTool(name = "JETM10KFData15AugmentationTool", #NB: data15 refers to the dataset used to form the look up table, not the intended target - OutputName = "LVL1EnergySumRoI_KFMETData15", - LUTFile = "LUT_data15.root") -ToolSvc += JETM10KFData15AugmentationTool -JETM10KFmc12AugmentationTool = DerivationFramework__METTriggerAugmentationTool(name = "JETM10KFmc12AugmentationTool", #NB: mc12 refers to the dataset used to form the look up table, not the intended target - OutputName = "LVL1EnergySumRoI_KFMETmc12", - LUTFile = "LUT_mc12.root") -ToolSvc += JETM10KFmc12AugmentationTool #====================================================================================================================== # SET UP STREAM @@ -36,66 +25,8 @@ fileName = buildFileName( derivationFlags.WriteDAOD_JETM10Stream ) JETM10Stream = MSMgr.NewPoolRootStream( streamName, fileName ) JETM10Stream.AcceptAlgs(['JETM10Kernel']) -#======================================= -# ESTABLISH THE THINNING HELPER -#======================================= -from DerivationFrameworkCore.ThinningHelper import ThinningHelper -JETM10ThinningHelper = ThinningHelper( "JETM10ThinningHelper" ) -# JETM10ThinningHelper.TriggerChains = ('L1_XE.*|L1_XS.*|L1_TE.*|HLT_xe.*|HLT_xs.*|HLT_te.*|' -# 'HLT_e26_lhvloose_L1EM20VH.*|HLT_e\\d\\d_(lhvloose|vloose)|' -# 'HLT_mu20_iloose.*|HLT_mu50|HLT_e24_lhmedium_iloose_L1_EM20VH|' -# 'HLT_e60_lhmedium|L1_J.*XE.*|HLT_j.*xe.*') -JETM10ThinningHelper.AppendToStream( JETM10Stream ) - -#====================================================================================================================== -# THINNING TOOLS -#====================================================================================================================== -thinningTools = [] - -# TrackParticles directly -from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning -JETM10TPThinningTool = DerivationFramework__TrackParticleThinning(name = "JETM10TPThinningTool", - StreamName = streamName, - SelectionString = "InDetTrackParticles.pt > 10*GeV", - InDetTrackParticlesKey = "InDetTrackParticles") -ToolSvc += JETM10TPThinningTool -thinningTools.append(JETM10TPThinningTool) - -# TrackParticles associated with Muons -from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning -JETM10MuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning(name = "JETM10MuonTPThinningTool", - StreamName = streamName, - MuonKey = "Muons", - InDetTrackParticlesKey = "InDetTrackParticles") -ToolSvc += JETM10MuonTPThinningTool -thinningTools.append(JETM10MuonTPThinningTool) - -# TrackParticles associated with electrons -from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning -JETM10ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning(name = "JETM10ElectronTPThinningTool", - StreamName = streamName, - SGKey = "Electrons", - InDetTrackParticlesKey = "InDetTrackParticles") -ToolSvc += JETM10ElectronTPThinningTool -thinningTools.append(JETM10ElectronTPThinningTool) - -# TrackParticles associated with photons -from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning -JETM10PhotonTPThinningTool = DerivationFramework__EgammaTrackParticleThinning(name = "JETM10PhotonTPThinningTool", - StreamName = streamName, - SGKey = "Photons", - InDetTrackParticlesKey = "InDetTrackParticles") -ToolSvc += JETM10PhotonTPThinningTool -thinningTools.append(JETM10PhotonTPThinningTool) - -# TrackParticles associated with taus -from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TauTrackParticleThinning -JETM10TauTPThinningTool = DerivationFramework__TauTrackParticleThinning( name = "JETM10TauTPThinningTool", - StreamName = streamName, - TauKey = "TauJets", - InDetTrackParticlesKey = "InDetTrackParticles") -ToolSvc += JETM10TauTPThinningTool -thinningTools.append(JETM10TauTPThinningTool) +content_manager = METTriggerDerivationContentManager.make_loose_manager( + "JETM10", JETM10Stream) #====================================================================================================================== # CREATE PRIVATE SEQUENCE @@ -106,37 +37,5 @@ DerivationFrameworkJob += jetm10Seq #======================================= # CREATE THE DERIVATION KERNEL ALGORITHM #======================================= -from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel -jetm10Seq += CfgMgr.DerivationFramework__DerivationKernel('JETM10Kernel', - SkimmingTools = [JETM10SkimmingTool], - AugmentationTools = [JETM10KFData15AugmentationTool, JETM10KFmc12AugmentationTool], - ThinningTools = thinningTools) - -#====================================================================================================================== -# Content list for slimming -#====================================================================================================================== -from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper -JETM10SlimmingHelper = SlimmingHelper('JETM10SlimmingHelper') -JETM10SlimmingHelper.SmartCollections = ["Electrons", "Muons", "Photons", "TauJets", - "AntiKt4EMTopoJets", "PrimaryVertices", "BTagging_AntiKt4EMTopo"] -JETM10SlimmingHelper.AllVariables = ["HLT_xAOD__TrigMissingETContainer_TrigEFMissingET_topocl_PS", - "HLT_xAOD__TrigMissingETContainer_TrigEFMissingET_mht", - "HLT_xAOD__TrigMissingETContainer_TrigEFMissingET_topocl_PUC", - "HLT_xAOD__TrigMissingETContainer_TrigEFMissingET_topocl", - "HLT_xAOD__TrigMissingETContainer_TrigEFMissingET", - "HLT_xAOD__JetContainer_a4tclcwsubjesFS", - "LVL1JetRoIs", - "LVL1JetEtRoI", - "LVL1EnergySumRoI_KFMETData15", - "LVL1EnergySumRoI_KFMETmc12", - "MET_Core_AntiKt4EMTopo", - "METAssoc_AntiKt4EMTopo"] -JETM10SlimmingHelper.IncludeJetTriggerContent = True -JETM10SlimmingHelper.IncludeEtMissTriggerContent = True -JETM10SlimmingHelper.AppendContentToStream(JETM10Stream) - -#====================================================================================================================== -# Content Definition -#====================================================================================================================== -#JETM10Stream.AddItem("std::vector<float>#JETM10KFEx"); -#JETM10Stream.AddItem("std::vector<float>#JETM10KFEy"); +jetm10Seq += content_manager.make_kernel(JETM10SkimmingTool) +content_manager.slimming_helper.AppendContentToStream(JETM10Stream) diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM11.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM11.py index f462f769330b749908cbc1f0e8b33882f6a70004..fd2b32de69acb8bd2377b2c860b545c56c866f19 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM11.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM11.py @@ -6,8 +6,10 @@ from DerivationFrameworkCore.DerivationFrameworkMaster import * from DerivationFrameworkJetEtMiss.JetCommon import * from DerivationFrameworkJetEtMiss.ExtendedJetCommon import * from DerivationFrameworkJetEtMiss.METCommon import * +from DerivationFrameworkJetEtMiss import TriggerLists from DerivationFrameworkEGamma.EGammaCommon import* from DerivationFrameworkMuons.MuonsCommon import* +from DerivationFrameworkJetEtMiss.METTriggerDerivationContent import METTriggerDerivationContentManager #====================================================================================================================== # SET UP STREAM @@ -17,91 +19,27 @@ fileName = buildFileName( derivationFlags.WriteDAOD_JETM11Stream ) JETM11Stream = MSMgr.NewPoolRootStream( streamName, fileName ) JETM11Stream.AcceptAlgs(['JETM11Kernel']) - #====================================================================================================================== # SKIMMING TOOL #====================================================================================================================== -cutExpression = ("(count(Electrons.DFCommonElectronsLHLoose && Electrons.pt > (10*GeV) && abs(Electrons.eta) < 2.47) + " + - "count(Muons.DFCommonMuonsPreselection && Muons.pt > (10*GeV) && abs(Muons.eta) < 2.47)) >=1") from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__xAODStringSkimmingTool -JETM11StringSkimmingTool = DerivationFramework__xAODStringSkimmingTool(name = "JETM11StringSkimmingTool", - expression = cutExpression) +from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__TriggerSkimmingTool +# cutExpression = "(count(Electrons.DFCommonElectronsLHLoose && Electrons.DFCommonElectrons_pt > (20 * GeV) && abs(Electrons.DFCommonElectrons_eta) < 2.47) + count(Muons.DFCommonMuonsPreselection && Muons.pt > (20*GeV) && abs(Muon.eta) < 2.47) ) >= 1" +singleElTriggers = TriggerLists.single_el_Trig() +singleMuTriggers = TriggerLists.single_mu_Trig() +cutExpression = "(count(Electrons.DFCommonElectronsLHLoose && Electrons.pt > (24 * GeV) && abs(Electrons.eta) < 2.47) + count(Muons.DFCommonMuonsPreselection && Muons.pt > (24*GeV) && abs(Muons.eta) < 2.47) ) >= 1" +JETM11StringSkimmingTool = DerivationFramework__xAODStringSkimmingTool( + name = "JETM11StringSkimmingTool", + expression = cutExpression) +JETM11TriggerSkimmingTool = DerivationFramework__TriggerSkimmingTool( + name = "JETM11TriggerSkimmingTool", + TriggerListOR = singleElTriggers + singleMuTriggers) ToolSvc += JETM11StringSkimmingTool -printfunc (JETM11StringSkimmingTool) - -#====================================================================================================================== -# AUGMENTATION TOOL -#====================================================================================================================== -from DerivationFrameworkJetEtMiss.DerivationFrameworkJetEtMissConf import DerivationFramework__METTriggerAugmentationTool -JETM11KFData15AugmentationTool = DerivationFramework__METTriggerAugmentationTool(name = "JETM11KFData15AugmentationTool", #NB: data15 refers to the dataset used to form the look up table, not the intended target - OutputName = "LVL1EnergySumRoI_KFMETData15", - LUTFile = "LUT_data15.root") -ToolSvc += JETM11KFData15AugmentationTool -JETM11KFmc12AugmentationTool = DerivationFramework__METTriggerAugmentationTool(name = "JETM11KFmc12AugmentationTool", #NB: mc12 refers to the dataset used to form the look up table, not the intended target - OutputName = "LVL1EnergySumRoI_KFMETmc12", - LUTFile = "LUT_mc12.root") -ToolSvc += JETM11KFmc12AugmentationTool - -#======================================= -# ESTABLISH THE THINNING HELPER -#======================================= -from DerivationFrameworkCore.ThinningHelper import ThinningHelper -JETM11ThinningHelper = ThinningHelper( "JETM11ThinningHelper" ) -# JETM11ThinningHelper.TriggerChains = ('L1_XE.*|L1_XS.*|L1_TE.*|HLT_xe.*|HLT_xs.*|HLT_te.*|' -# 'HLT_e26_lhvloose_L1EM20VH.*|HLT_e\\d\\d_(lhvloose|vloose)|' -# 'HLT_mu20_iloose.*|HLT_mu50|HLT_e24_lhmedium_iloose_L1_EM20VH|' -# 'HLT_e60_lhmedium|L1_J.*XE.*|HLT_j.*xe.*') -JETM11ThinningHelper.AppendToStream( JETM11Stream ) - -#====================================================================================================================== -# THINNING TOOLS -#====================================================================================================================== -thinningTools = [] - -# TrackParticles directly -from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning -JETM11TPThinningTool = DerivationFramework__TrackParticleThinning(name = "JETM11TPThinningTool", - StreamName = streamName, - SelectionString = "InDetTrackParticles.pt > 10*GeV", - InDetTrackParticlesKey = "InDetTrackParticles") -ToolSvc += JETM11TPThinningTool -thinningTools.append(JETM11TPThinningTool) - -# TrackParticles associated with Muons -from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning -JETM11MuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning(name = "JETM11MuonTPThinningTool", - StreamName = streamName, - MuonKey = "Muons", - InDetTrackParticlesKey = "InDetTrackParticles") -ToolSvc += JETM11MuonTPThinningTool -thinningTools.append(JETM11MuonTPThinningTool) - -# TrackParticles associated with electrons -from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning -JETM11ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning(name = "JETM11ElectronTPThinningTool", - StreamName = streamName, - SGKey = "Electrons", - InDetTrackParticlesKey = "InDetTrackParticles") -ToolSvc += JETM11ElectronTPThinningTool -thinningTools.append(JETM11ElectronTPThinningTool) +ToolSvc += JETM11TriggerSkimmingTool -# TrackParticles associated with photons -from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning -JETM11PhotonTPThinningTool = DerivationFramework__EgammaTrackParticleThinning(name = "JETM11PhotonTPThinningTool", - StreamName = streamName, - SGKey = "Photons", - InDetTrackParticlesKey = "InDetTrackParticles") -ToolSvc += JETM11PhotonTPThinningTool -thinningTools.append(JETM11PhotonTPThinningTool) -# TrackParticles associated with taus -from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TauTrackParticleThinning -JETM11TauTPThinningTool = DerivationFramework__TauTrackParticleThinning( name = "JETM11TauTPThinningTool", - StreamName = streamName, - TauKey = "TauJets", - InDetTrackParticlesKey = "InDetTrackParticles") -ToolSvc += JETM11TauTPThinningTool -thinningTools.append(JETM11TauTPThinningTool) +content_manager = METTriggerDerivationContentManager.make_tight_manager( + "JETM11", JETM11Stream) #====================================================================================================================== # CREATE PRIVATE SEQUENCE @@ -112,38 +50,6 @@ DerivationFrameworkJob += jetm11Seq #======================================= # CREATE THE DERIVATION KERNEL ALGORITHM #======================================= -from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel -jetm11Seq += CfgMgr.DerivationFramework__DerivationKernel('JETM11Kernel', - SkimmingTools = [JETM11StringSkimmingTool], - AugmentationTools = [JETM11KFData15AugmentationTool, JETM11KFmc12AugmentationTool], - ThinningTools = thinningTools) +jetm11Seq += content_manager.make_kernel(JETM11StringSkimmingTool, JETM11TriggerSkimmingTool) -#====================================================================================================================== -# Content list for slimming -#====================================================================================================================== -from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper -JETM11SlimmingHelper = SlimmingHelper('JETM11SlimmingHelper') -JETM11SlimmingHelper.SmartCollections = ["Electrons", "Muons", "Photons", "TauJets", - "AntiKt4EMTopoJets", "PrimaryVertices", "BTagging_AntiKt4EMTopo"] -JETM11SlimmingHelper.AllVariables = ["HLT_xAOD__TrigMissingETContainer_TrigEFMissingET_topocl_PS", - "HLT_xAOD__TrigMissingETContainer_TrigEFMissingET_mht", - "HLT_xAOD__TrigMissingETContainer_TrigEFMissingET_topocl_PUC", - "HLT_xAOD__TrigMissingETContainer_TrigEFMissingET_topocl", - "HLT_xAOD__TrigMissingETContainer_TrigEFMissingET", - "HLT_xAOD__JetContainer_a4tclcwsubjesFS", - "LVL1JetRoIs", - "LVL1JetEtRoI", - "LVL1EnergySumRoI_KFMETData15", - "LVL1EnergySumRoI_KFMETmc12", - "MET_Core_AntiKt4EMTopo", - "METAssoc_AntiKt4EMTopo"] -JETM11SlimmingHelper.IncludeJetTriggerContent = True -JETM11SlimmingHelper.IncludeEtMissTriggerContent = True -JETM11SlimmingHelper.AppendContentToStream(JETM11Stream) - - -#====================================================================================================================== -# Content Definition -#====================================================================================================================== -# JETM11Stream.AddItem("std::vector<float>#JETM11KFEx"); -# JETM11Stream.AddItem("std::vector<float>#JETM11KFEy"); +content_manager.slimming_helper.AppendContentToStream(JETM11Stream) diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM12.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM12.py new file mode 100644 index 0000000000000000000000000000000000000000..c83d0322e54e348bd244ef99fc5215e2e6c6a886 --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM12.py @@ -0,0 +1,241 @@ +#==================================================================== +# JETM12.py +# reductionConf flag JETM12 in Reco_tf.py +#==================================================================== + +from DerivationFrameworkCore.DerivationFrameworkMaster import * +from DerivationFrameworkInDet.InDetCommon import * +from DerivationFrameworkJetEtMiss.JetCommon import * +from DerivationFrameworkJetEtMiss.ExtendedJetCommon import * +from DerivationFrameworkEGamma.EGammaCommon import * +from DerivationFrameworkMuons.MuonsCommon import * +from DerivationFrameworkJetEtMiss.METCommon import * +# + +#==================================================================== +# SKIMMING TOOL +#==================================================================== + +from DerivationFrameworkJetEtMiss import TriggerLists +metTriggers = TriggerLists.MET_Trig() +muTriggers = TriggerLists.single_mu_Trig() +orstr = ' || ' +andstr = ' && ' +trackRequirements = '(InDetTrackParticles.pt > 10.*GeV && InDetTrackParticles.TrkIsoPt1000_ptcone20 < 0.12*InDetTrackParticles.pt && InDetTrackParticles.DFCommonTightPrimary && abs(DFCommonInDetTrackZ0AtPV) < 3.0*mm )' +trackRequirementsMu = '(InDetTrackParticles.pt > 70.*GeV && InDetTrackParticles.TrkIsoPt1000_ptcone20 < 0.12*InDetTrackParticles.pt && InDetTrackParticles.DFCommonTightPrimary && abs(DFCommonInDetTrackZ0AtPV) < 3.0*mm )' +trackRequirementsTtbar = '(InDetTrackParticles.pt > 25.*GeV && InDetTrackParticles.TrkIsoPt1000_ptcone20 < 0.12*InDetTrackParticles.pt && InDetTrackParticles.DFCommonTightPrimary && abs(DFCommonInDetTrackZ0AtPV) < 3.0*mm )' +jetRequirementsTtbar = '( AntiKt4EMTopoJets.DFCommonJets_Calib_pt > 20*GeV && BTagging_AntiKt4EMTopo_201810.MV2c10_discriminant > 0.11 )' +expressionW = '( (' + orstr.join(metTriggers) + ' )' + andstr + '( count('+trackRequirements+') >=1 ) )' +expressionMu = '( (' + orstr.join(muTriggers) + ' )' + andstr + '( count('+trackRequirementsMu+') >=1 ) )' +expressionTtbar = '( (' + orstr.join(muTriggers) + ' )' + andstr + '( count('+trackRequirementsTtbar+') >=1 )' + andstr + '( count('+trackRequirements+') >=2 )' + andstr + '( count('+jetRequirementsTtbar+') >=1 ) )' +expression = '( '+expressionW+' || '+expressionMu+' || '+expressionTtbar+' )' + +from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__xAODStringSkimmingTool +JETM12SkimmingTool = DerivationFramework__xAODStringSkimmingTool( name = "JETM12SkimmingTool1", + expression = expression) +ToolSvc += JETM12SkimmingTool + +#==================================================================== +# SET UP STREAM +#==================================================================== +streamName = derivationFlags.WriteDAOD_JETM12Stream.StreamName +fileName = buildFileName( derivationFlags.WriteDAOD_JETM12Stream ) +JETM12Stream = MSMgr.NewPoolRootStream( streamName, fileName ) +JETM12Stream.AcceptAlgs(["JETM12Kernel"]) + +#======================================= +# ESTABLISH THE THINNING HELPER +#======================================= + +from DerivationFrameworkCore.ThinningHelper import ThinningHelper +JETM12ThinningHelper = ThinningHelper( "JETM12ThinningHelper" ) +JETM12ThinningHelper.AppendToStream( JETM12Stream ) + +thinningTools = [] +AugmentationToolsSkim = [] +AugmentationTools = [] + +#==================================================================== +# ISOLATION TOOL +#==================================================================== +#Track selection +from IsolationTool.IsolationToolConf import xAOD__TrackIsolationTool +TrackIsoTool = xAOD__TrackIsolationTool("TrackIsoTool") +TrackIsoTool.TrackSelectionTool.maxZ0SinTheta= 3. +TrackIsoTool.TrackSelectionTool.minPt= 1000. +TrackIsoTool.TrackSelectionTool.CutLevel= "Loose" +ToolSvc += TrackIsoTool + +TrackIsoTool500 = xAOD__TrackIsolationTool("TrackIsoTool500") +TrackIsoTool500.TrackSelectionTool.maxZ0SinTheta= 3. +TrackIsoTool500.TrackSelectionTool.minPt= 500. +TrackIsoTool500.TrackSelectionTool.CutLevel= "Loose" +ToolSvc += TrackIsoTool500 + +from DerivationFrameworkSUSY.DerivationFrameworkSUSYConf import DerivationFramework__trackIsolationDecorator +import ROOT, cppyy +cppyy.loadDictionary('xAODCoreRflxDict') +cppyy.loadDictionary('xAODPrimitivesDict') +isoPar = ROOT.xAOD.Iso +Pt1000IsoTrackDecorator = DerivationFramework__trackIsolationDecorator(name = "Pt1000IsoTrackDecorator", + TrackIsolationTool = TrackIsoTool, + TargetContainer = "InDetTrackParticles", + ptcones = [isoPar.ptcone40,isoPar.ptcone30,isoPar.ptcone20], + Prefix = 'TrkIsoPt1000_' + ) +Pt500IsoTrackDecorator = DerivationFramework__trackIsolationDecorator(name = "Pt500IsoTrackDecorator", + TrackIsolationTool = TrackIsoTool500, + TargetContainer = "InDetTrackParticles", + ptcones = [isoPar.ptcone40,isoPar.ptcone30,isoPar.ptcone20], + Prefix = 'TrkIsoPt500_' + ) +ToolSvc += Pt1000IsoTrackDecorator +ToolSvc += Pt500IsoTrackDecorator + +AugmentationToolsSkim.append(Pt1000IsoTrackDecorator) +AugmentationTools.append(Pt500IsoTrackDecorator) + +#==================================================================== +# THINNING TOOLS +#==================================================================== +# TrackParticles directly +from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning +JETM12TPThinningTool = DerivationFramework__TrackParticleThinning(name = "JETM12TPThinningTool", + StreamName = streamName, + SelectionString = "( InDetTrackParticles.pt > 10*GeV && InDetTrackParticles.DFCommonTightPrimary && abs(DFCommonInDetTrackZ0AtPV) < 3.0*mm )", + InDetTrackParticlesKey = "InDetTrackParticles") +ToolSvc += JETM12TPThinningTool +thinningTools.append(JETM12TPThinningTool) + +# TrackParticles associated with Muons +from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning +JETM12MuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning(name = "JETM12MuonTPThinningTool", + StreamName = streamName, + MuonKey = "Muons", + InDetTrackParticlesKey = "InDetTrackParticles") +ToolSvc += JETM12MuonTPThinningTool +thinningTools.append(JETM12MuonTPThinningTool) + +# TrackParticles associated with electrons +from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning +JETM12ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning(name = "JETM12ElectronTPThinningTool", + StreamName = streamName, + SGKey = "Electrons", + InDetTrackParticlesKey = "InDetTrackParticles") +ToolSvc += JETM12ElectronTPThinningTool +thinningTools.append(JETM12ElectronTPThinningTool) + +# TrackParticles associated with photons +JETM12PhotonTPThinningTool = DerivationFramework__EgammaTrackParticleThinning(name = "JETM12PhotonTPThinningTool", + StreamName = streamName, + SGKey = "Photons", + InDetTrackParticlesKey = "InDetTrackParticles") +ToolSvc += JETM12PhotonTPThinningTool +thinningTools.append(JETM12PhotonTPThinningTool) + +# TrackParticles associated with taus +from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TauTrackParticleThinning +JETM12TauTPThinningTool = DerivationFramework__TauTrackParticleThinning( name = "JETM12TauTPThinningTool", + StreamName = streamName, + TauKey = "TauJets", + InDetTrackParticlesKey = "InDetTrackParticles") +ToolSvc += JETM12TauTPThinningTool +thinningTools.append(JETM12TauTPThinningTool) + +################################## +# CaloCalTopoCluster thinning +from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__CaloClusterThinning +JETM12CaloClusterThinning = DerivationFramework__CaloClusterThinning(name = "JETM12CaloClusterThinning", + StreamName = streamName, + SGKey = "InDetTrackParticles", + TopoClCollectionSGKey = "CaloCalTopoClusters", + SelectionString = "( InDetTrackParticles.pt > 10*GeV && InDetTrackParticles.DFCommonTightPrimary && abs(DFCommonInDetTrackZ0AtPV) < 3.0*mm )", + ConeSize = 0.6, + ) +ToolSvc += JETM12CaloClusterThinning +thinningTools.append(JETM12CaloClusterThinning) +################################### + +# Truth particle thinning +doTruthThinning = True +from AthenaCommon.GlobalFlags import globalflags +if doTruthThinning and DerivationFrameworkIsMonteCarlo: + truth_cond_status = "( (TruthParticles.status == 1) && (TruthParticles.barcode < 200000) && (TruthParticles.pt > 8*GeV) )" # high pt pions for E/p + truth_cond_Lepton = "((abs(TruthParticles.pdgId) >= 11) && (abs(TruthParticles.pdgId) <= 16) && (TruthParticles.barcode < 200000))" # Leptons + truth_expression = '('+truth_cond_status+' || '+truth_cond_Lepton +')' + + from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning + JETM12TruthThinningTool = DerivationFramework__GenericTruthThinning( name = "JETM12TruthThinningTool", + StreamName = streamName, + ParticleSelectionString = truth_expression, + PreserveDescendants = False, + PreserveGeneratorDescendants = True, + PreserveAncestors = False) + + ToolSvc += JETM12TruthThinningTool + thinningTools.append(JETM12TruthThinningTool) + +#======================================= +# CREATE PRIVATE SEQUENCE +#======================================= + +jetm12Seq = CfgMgr.AthSequencer("JETM12Sequence") +DerivationFrameworkJob += jetm12Seq + +#======================================= +# CREATE THE DERIVATION KERNEL ALGORITHM +#======================================= +from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel +jetm12Seq += CfgMgr.DerivationFramework__DerivationKernel("JETM12KernelSkim", + SkimmingTools = [JETM12SkimmingTool], + AugmentationTools = AugmentationToolsSkim) +jetm12Seq += CfgMgr.DerivationFramework__DerivationKernel("JETM12Kernel", + ThinningTools = thinningTools, + AugmentationTools = AugmentationTools) + +#======================================= +# Re-tag PFlow jets so they have b-tagging info. +#======================================= +from DerivationFrameworkFlavourTag.FlavourTagCommon import * +FlavorTagInit(JetCollections = ['AntiKt4EMPFlowJets'], Sequencer = jetm12Seq) + +#======================================= +# SCHEDULE SMALL-R JETS WITH LOW PT CUT +#======================================= + +OutputJets["JETM12"] = [] + +#======================================= +# RESTORE AOD-REDUCED JET COLLECTIONS +# SCHEDULE CUSTOM MET RECONSTRUCTION +#======================================= + +if DerivationFrameworkIsMonteCarlo: + from DerivationFrameworkMCTruth.MCTruthCommon import addStandardTruthContents + addStandardTruthContents() + +#==================================================================== +# Add the containers to the output stream - slimming done here +#==================================================================== +from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper +JETM12SlimmingHelper = SlimmingHelper("JETM12SlimmingHelper") +JETM12SlimmingHelper.SmartCollections = ["Electrons", "Photons", "Muons", "TauJets", + "InDetTrackParticles", "PrimaryVertices", + "MET_Reference_AntiKt4EMTopo", + "MET_Reference_AntiKt4EMPFlow", + "AntiKt4EMTopoJets","AntiKt4EMPFlowJets","AntiKt4TruthJets", + "AntiKt4EMPFlowJets_BTagging201810", + "AntiKt4EMPFlowJets_BTagging201903", + "AntiKt4EMTopoJets_BTagging201810", + "BTagging_AntiKt4EMPFlow_201810", + "BTagging_AntiKt4EMPFlow_201903", + "BTagging_AntiKt4EMTopo_201810", + ] +JETM12SlimmingHelper.AllVariables = ["MuonTruthParticles","TruthParticles", "TruthVertices", + "MuonSegments","InDetTrackParticles", + "Kt4EMTopoOriginEventShape","Kt4LCTopoOriginEventShape","Kt4EMPFlowEventShape","MET_Truth","CaloCalTopoClusters", + "TruthMuons","TruthElectrons","TruthPhotons","TruthTaus","TruthNeutrinos", + ] +JETM12SlimmingHelper.ExtraVariables = ["InDetTrackParticles.TrkIsoPt1000_ptcone40.TrkIsoPt1000_ptcone30.TrkIsoPt1000_ptcone20.TrkIsoPt500_ptcone40.TrkIsoPt500_ptcone30.TrkIsoPt500_ptcone20"] + +JETM12SlimmingHelper.AppendContentToStream(JETM12Stream) diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM13.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM13.py new file mode 100644 index 0000000000000000000000000000000000000000..f4f8fd176d894ea602b3b9af0a52d67d442b33fe --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM13.py @@ -0,0 +1,168 @@ +#==================================================================== +# JETM13.py +# reductionConf flag JETM13 in Reco_tf.py +#==================================================================== + +from DerivationFrameworkCore.DerivationFrameworkMaster import * +from DerivationFrameworkJetEtMiss.JetCommon import * +from DerivationFrameworkJetEtMiss.ExtendedJetCommon import * +from DerivationFrameworkJetEtMiss.METCommon import * +from DerivationFrameworkEGamma.EGammaCommon import * +from DerivationFrameworkMuons.MuonsCommon import * + +# +if DerivationFrameworkIsMonteCarlo: + from DerivationFrameworkMCTruth import MCTruthCommon + MCTruthCommon.addStandardTruthContents() + MCTruthCommon.addBosonsAndDownstreamParticles(generations=4,rejectHadronChildren=True) + MCTruthCommon.addTopQuarkAndDownstreamParticles(generations=4,rejectHadronChildren=True) + +#==================================================================== +# SET UP STREAM +#==================================================================== +streamName = derivationFlags.WriteDAOD_JETM13Stream.StreamName +fileName = buildFileName( derivationFlags.WriteDAOD_JETM13Stream ) +JETM13Stream = MSMgr.NewPoolRootStream( streamName, fileName ) +JETM13Stream.AcceptAlgs(["JETM13MainKernel"]) +augStream = MSMgr.GetStream( streamName ) +evtStream = augStream.GetEventStream() + +#==================================================================== +# SKIMMING TOOL +#==================================================================== +# None for the moment + +#==================================================================== +# THINNING TOOLS +#==================================================================== +# Retain only stable truth particles, remove G4 +# We want to keep all truth jet constituents +# Also keep the first 10 particles mainly for the HS truth vertex +jetm13thin = [] +if DerivationFrameworkIsMonteCarlo: + + from DerivationFrameworkCore.ThinningHelper import ThinningHelper + JETM13ThinningHelper = ThinningHelper( "JETM13ThinningHelper" ) + JETM13ThinningHelper.AppendToStream( JETM13Stream ) + from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__MenuTruthThinning + TruthThinningTool = DerivationFramework__MenuTruthThinning(name = "JETM13TruthThinning", + StreamName = streamName, + WriteAllStable = True, + # Disable the flags that have been annoyingly + # defaulted to True + WritePartons = False, + WriteHadrons = False, + WriteBHadrons = True, + WriteCHadrons = False, + WriteGeant = False, + WriteFirstN = 10) + ToolSvc += TruthThinningTool + jetm13thin.append(TruthThinningTool) + +#======================================= +# CREATE PRIVATE SEQUENCE +#======================================= +# Here we run custom reconstruction + +jetm13Seq = CfgMgr.AthSequencer("JETM13Sequence") +DerivationFrameworkJob += jetm13Seq + + +from TrackCaloClusterRecTools.TrackCaloClusterConfig import runTCCReconstruction +runTCCReconstruction(jetm13Seq,ToolSvc, "LCOriginTopoClusters", outputTCCName="TrackCaloClustersCombinedAndNeutral") + + +# Add the necessary constituents for UFOs +from JetRecTools.ConstModHelpers import getConstModSeq, xAOD +addCHSPFlowObjects() +pflowCSSKSeq = getConstModSeq(["CS","SK"], "EMPFlow") + +# add the pflow cssk sequence to the main jetalg if not already there : +if pflowCSSKSeq.getFullName() not in [t.getFullName() for t in DerivationFrameworkJob.jetalg.Tools]: + DerivationFrameworkJob.jetalg.Tools += [pflowCSSKSeq] + +# Finally we can run the UFO building taking our unified PFlow container as input +from TrackCaloClusterRecTools.TrackCaloClusterConfig import runUFOReconstruction +emufoAlg = runUFOReconstruction(jetm13Seq,ToolSvc, PFOPrefix="CHS",caloClusterName="LCOriginTopoClusters") +emcsskufoAlg = runUFOReconstruction(jetm13Seq,ToolSvc, PFOPrefix="CSSK",caloClusterName="LCOriginTopoClusters") + + +#======================================= +# RESTORE AOD-REDUCED JET COLLECTIONS +#======================================= +OutputJets["JETM13"] = [] +reducedJetList = ["AntiKt4TruthJets","AntiKt10TruthJets",] +replaceAODReducedJets(reducedJetList,jetm13Seq,"JETM13") + +jetm13Seq += CfgMgr.DerivationFramework__DerivationKernel( name = "JETM13MainKernel", + SkimmingTools = [], + ThinningTools = jetm13thin) + +#==================================================================== +# Add the containers to the output stream - slimming done here +#==================================================================== +from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper +JETM13SlimmingHelper = SlimmingHelper("JETM13SlimmingHelper") +JETM13SlimmingHelper.SmartCollections = ["Electrons", "Photons", "Muons", "TauJets", + "InDetTrackParticles", "PrimaryVertices", + "MET_Reference_AntiKt4EMTopo", + "MET_Reference_AntiKt4EMPFlow", + "AntiKt4EMTopoJets","AntiKt4EMPFlowJets", + ] +JETM13SlimmingHelper.AllVariables = ["CaloCalTopoClusters", + "TrackCaloClustersCombinedAndNeutral", + "JetETMissChargedParticleFlowObjects", + "JetETMissNeutralParticleFlowObjects", + "Kt4EMTopoOriginEventShape","Kt4EMPFlowEventShape", + "TruthParticles", + "TruthVertices", + "TruthEvents", + ] +JETM13SlimmingHelper.ExtraVariables = [ + "InDetTrackParticles.particleHypothesis.vx.vy.vz", + "GSFTrackParticles.particleHypothesis.vx.vy.vz", + "PrimaryVertices.x.y.z", + "TauJets.clusterLinks", + "Muons.energyLossType.EnergyLoss.ParamEnergyLoss.MeasEnergyLoss.EnergyLossSigma.MeasEnergyLossSigma.ParamEnergyLossSigmaPlus.ParamEnergyLossSigmaMinus.clusterLinks.FSR_CandidateEnergy", + "MuonSegments.x.y.z.px.py.pz", + "AntiKt4LCTopoJets.pt.eta.phi.m", + ] + + +JETM13SlimmingHelper.AppendToDictionary["CHSUFO"] = 'xAOD::TrackCaloClusterContainer' +JETM13SlimmingHelper.AppendToDictionary['CHSUFOAux'] = 'xAOD::TrackCaloClusterAuxContainer' +JETM13SlimmingHelper.ExtraVariables +=[ 'CHSUFO.pt.eta.phi.m.taste' ] + +JETM13SlimmingHelper.AppendToDictionary["CSSKUFO"] = 'xAOD::TrackCaloClusterContainer' +JETM13SlimmingHelper.AppendToDictionary['CSSKUFOAux'] = 'xAOD::TrackCaloClusterAuxContainer' +JETM13SlimmingHelper.ExtraVariables +=[ 'CSSKUFO.pt.eta.phi.m.taste' ] + + +for truthc in [ + "TruthMuons", + "TruthElectrons", + "TruthPhotons", + "TruthTaus", + "TruthNeutrinos", + ]: + JETM13SlimmingHelper.StaticContent.append("xAOD::TruthParticleContainer#"+truthc) + JETM13SlimmingHelper.StaticContent.append("xAOD::TruthParticleAuxContainer#"+truthc+"Aux.") + +for truthc in [ + "TruthTopQuark", + "TruthBosons" + ]: + JETM13SlimmingHelper.StaticContent.append("xAOD::TruthParticleContainer#"+truthc+"WithDecayParticles") + JETM13SlimmingHelper.StaticContent.append("xAOD::TruthParticleAuxContainer#"+truthc+"WithDecayParticlesAux.") + JETM13SlimmingHelper.StaticContent.append("xAOD::TruthVertexContainer#"+truthc+"WithDecayVertices") + JETM13SlimmingHelper.StaticContent.append("xAOD::TruthVertexAuxContainer#"+truthc+"WithDecayVerticesAux.") + + +# Add the jet containers to the stream +addJetOutputs(JETM13SlimmingHelper,["JETM13"]) +# Add the MET containers to the stream +addMETOutputs(JETM13SlimmingHelper,["Track"]) + +JETM13SlimmingHelper.AppendContentToStream(JETM13Stream) +JETM13Stream.RemoveItem("xAOD::TrigNavigation#*") +JETM13Stream.RemoveItem("xAOD::TrigNavigationAuxInfo#*") diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM14.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM14.py new file mode 100644 index 0000000000000000000000000000000000000000..0d7e60d63616fb5747ba7c4ade48811e884ebc60 --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM14.py @@ -0,0 +1,52 @@ +#==================================================================== +# JETM14.py +# reductionConf flag JETM14 in Reco_tf.py +#==================================================================== +from DerivationFrameworkCore.DerivationFrameworkMaster import * +from DerivationFrameworkJetEtMiss.JetCommon import * +from DerivationFrameworkJetEtMiss.ExtendedJetCommon import * +from DerivationFrameworkJetEtMiss.METCommon import * +from DerivationFrameworkJetEtMiss import TriggerLists +from DerivationFrameworkEGamma.EGammaCommon import* +from DerivationFrameworkMuons.MuonsCommon import* +from DerivationFrameworkJetEtMiss.METTriggerDerivationContent import METTriggerDerivationContentManager + +#====================================================================================================================== +# SKIMMING TOOL +#====================================================================================================================== +from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__xAODStringSkimmingTool +from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__TriggerSkimmingTool +singleMuTriggers = TriggerLists.single_mu_Trig() +cutExpression = "(count(Muons.DFCommonMuonsPreselection && Muons.pt > (20*GeV) && abs(Muons.eta) < 2.7) ) >= 2" +JETM14StringSkimmingTool = DerivationFramework__xAODStringSkimmingTool( + name = "JETM14StringSkimmingTool", + expression = cutExpression) +JETM14TriggerSkimmingTool = DerivationFramework__TriggerSkimmingTool( + name = "JETM14TriggerSkimmingTool", + TriggerListOR = singleMuTriggers) +ToolSvc += JETM14StringSkimmingTool +ToolSvc += JETM14TriggerSkimmingTool + + +#====================================================================================================================== +# SET UP STREAM +#====================================================================================================================== +streamName = derivationFlags.WriteDAOD_JETM14Stream.StreamName +fileName = buildFileName( derivationFlags.WriteDAOD_JETM14Stream ) +JETM14Stream = MSMgr.NewPoolRootStream( streamName, fileName ) +JETM14Stream.AcceptAlgs(['JETM14Kernel']) + +content_manager = METTriggerDerivationContentManager.make_loose_manager( + "JETM14", JETM14Stream) + +#====================================================================================================================== +# CREATE PRIVATE SEQUENCE +#====================================================================================================================== +jetm14Seq = CfgMgr.AthSequencer("jetm14Seq") +DerivationFrameworkJob += jetm14Seq + +#======================================= +# CREATE THE DERIVATION KERNEL ALGORITHM +#======================================= +jetm14Seq += content_manager.make_kernel(JETM14StringSkimmingTool, JETM14TriggerSkimmingTool) +content_manager.slimming_helper.AppendContentToStream(JETM14Stream) diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM15.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM15.py new file mode 100644 index 0000000000000000000000000000000000000000..944ff38146d9507456e02776bcd08faeb14543c9 --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM15.py @@ -0,0 +1,492 @@ +#==================================================================== +# JETM15.py +# reductionConf flag JETM15 in Reco_tf.py +#==================================================================== + +from DerivationFrameworkCore.DerivationFrameworkMaster import * +from DerivationFrameworkJetEtMiss.JetCommon import * +from DerivationFrameworkJetEtMiss.ExtendedJetCommon import * +from DerivationFrameworkEGamma.EGammaCommon import * +from DerivationFrameworkMuons.MuonsCommon import * +from DerivationFrameworkJetEtMiss.METCommon import * +from DerivationFrameworkFlavourTag.HbbCommon import * +# +if DerivationFrameworkIsMonteCarlo: + from DerivationFrameworkMCTruth.MCTruthCommon import addStandardTruthContents + addStandardTruthContents() + # We probably don't need this since we aren't doing real systematics? + #import DerivationFrameworkCore.WeightMetadata + #import DerivationFrameworkCore.LHE3WeightMetadata + + from DerivationFrameworkMCTruth import MCTruthCommon + MCTruthCommon.addStandardTruthContents() + MCTruthCommon.addBosonsAndDownstreamParticles(generations=4,rejectHadronChildren=True) + MCTruthCommon.addTopQuarkAndDownstreamParticles(generations=4,rejectHadronChildren=True) + + +#==================================================================== +# SKIMMING TOOL +#==================================================================== + +from DerivationFrameworkJetEtMiss import TriggerLists +muonTriggers = TriggerLists.single_mu_Trig() +jetTriggers = TriggerLists.jetTrig() + +# Applying a pT cut of 300 GeV on ungroomed jets, which should be sufficient for the grooming scan studies +jetSelection = '((count( AntiKt10LCTopoJets.pt > 300.*GeV && abs(AntiKt10LCTopoJets.eta) < 2.5 ) >=1) || \ + (count( AntiKt10LCTopoCSSKJets.pt > 300.*GeV && abs(AntiKt10LCTopoCSSKJets.eta) < 2.5 ) >=1) || \ + (count( AntiKt10EMPFlowCSSKJets.pt > 300.*GeV && abs(AntiKt10EMPFlowCSSKJets.eta) < 2.5 ) >=1) || \ + (count( AntiKt10TrackCaloClusterJets.pt > 300.*GeV && abs(AntiKt10TrackCaloClusterJets.eta) < 2.5 ) >=1) || \ + (count( AntiKt10UFOCHSJets.pt > 300.*GeV && abs(AntiKt10UFOCHSJets.eta) < 2.5 ) >=1) || \ + (count( AntiKt10UFOCSSKJets.pt > 300.*GeV && abs(AntiKt10UFOCSSKJets.eta) < 2.5 ) >=1) \ + )' + +orstr = ' || ' +andstr = ' && ' + +mutrigsel = '(EventInfo.eventTypeBitmask==1) || '+orstr.join(muonTriggers) +muofflinesel = andstr.join(['count((Muons.pt > 20*GeV) && (Muons.DFCommonMuonsPreselection)) >= 1', + jetSelection]) +muonSelection = ' ( (' + mutrigsel + ') && (' + muofflinesel + ') ) ' + +from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__TriggerSkimmingTool +JETM15TrigSkimmingTool = DerivationFramework__TriggerSkimmingTool( name = "JETM15TrigSkimmingTool", + TriggerListOR = jetTriggers+muonTriggers ) +ToolSvc += JETM15TrigSkimmingTool + +from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__xAODStringSkimmingTool +JETM15OfflineSkimmingTool = DerivationFramework__xAODStringSkimmingTool( name = "JETM15OfflineSkimmingTool", + expression = jetSelection + ' || ' +muonSelection) +ToolSvc += JETM15OfflineSkimmingTool + +#Trigger matching decorations +from DerivationFrameworkCore.TriggerMatchingAugmentation import applyTriggerMatching +TrigMatchAug, NewTrigVars = applyTriggerMatching(ToolNamePrefix="JETM15", + ElectronTriggers=[], + MuonTriggers=muonTriggers, + PhotonTriggers=[]) + +#==================================================================== +# THINNING TOOLS +#==================================================================== +thinningTools = [] + +#Track particles associated to any of the large-R jet collections +from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning +JETM15Akt10JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = "JETM15Akt10JetLCTopoTPThinningTool", + StreamName = streamName, + JetKey = "AntiKt10LCTopoJets", + InDetTrackParticlesKey = "InDetTrackParticles", + ApplyAnd = False) +ToolSvc += JETM15Akt10JetTPThinningTool +thinningTools.append(JETM15Akt10JetTPThinningTool) + +JETM15Akt10JetTPThinningToolCSSK = DerivationFramework__JetTrackParticleThinning( name = "JETM15Akt10CSSKLCTopoJetTPThinningTool", + StreamName = streamName, + JetKey = "AntiKt10LCTopoCSSKJets", + InDetTrackParticlesKey = "InDetTrackParticles", + ApplyAnd = False) +ToolSvc += JETM15Akt10JetTPThinningToolCSSK +thinningTools.append(JETM15Akt10JetTPThinningToolCSSK) + +JETM15Akt10JetTPThinningToolPFO = DerivationFramework__JetTrackParticleThinning( name = "JETM15Akt10CSSKPFOJetTPThinningTool", + StreamName = streamName, + JetKey = "AntiKt10EMPFlowCSSKJets", + InDetTrackParticlesKey = "InDetTrackParticles", + ApplyAnd = False) +ToolSvc += JETM15Akt10JetTPThinningToolPFO +thinningTools.append(JETM15Akt10JetTPThinningToolPFO) + +JETM15Akt10JetTPThinningToolTCC = DerivationFramework__JetTrackParticleThinning( name = "JETM15Akt10TCCJetTPThinningTool", + StreamName = streamName, + JetKey = "AntiKt10TrackCaloClusterJets", + InDetTrackParticlesKey = "InDetTrackParticles", + ApplyAnd = False) +ToolSvc += JETM15Akt10JetTPThinningToolTCC +thinningTools.append(JETM15Akt10JetTPThinningToolTCC) + +JETM15Akt10JetEMUFOThinningToolTCC = DerivationFramework__JetTrackParticleThinning( name = "JETM15Akt10JetCHSUFOThinningTool", + StreamName = streamName, + JetKey = "AntiKt10UFOCHSJets", + InDetTrackParticlesKey = "InDetTrackParticles", + ApplyAnd = False) +ToolSvc += JETM15Akt10JetEMUFOThinningToolTCC +thinningTools.append(JETM15Akt10JetEMUFOThinningToolTCC) + +JETM15Akt10JetCSSKUFOThinningToolTCC = DerivationFramework__JetTrackParticleThinning( name = "JETM15Akt10JetCSSKUFOThinningTool", + StreamName = streamName, + JetKey = "AntiKt10UFOCSSKJets", + InDetTrackParticlesKey = "InDetTrackParticles", + ApplyAnd = False) +ToolSvc += JETM15Akt10JetCSSKUFOThinningToolTCC +thinningTools.append(JETM15Akt10JetCSSKUFOThinningToolTCC) + +# TrackParticles associated with Muons +from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning +JETM15MuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning(name = "JETM15MuonTPThinningTool", + StreamName = streamName, + MuonKey = "Muons", + InDetTrackParticlesKey = "InDetTrackParticles") +ToolSvc += JETM15MuonTPThinningTool +thinningTools.append(JETM15MuonTPThinningTool) + +# TrackParticles associated with electrons +from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning +JETM15ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning(name = "JETM15ElectronTPThinningTool", + StreamName = streamName, + SGKey = "Electrons", + InDetTrackParticlesKey = "InDetTrackParticles") +ToolSvc += JETM15ElectronTPThinningTool +thinningTools.append(JETM15ElectronTPThinningTool) + + +from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__JetCaloClusterThinning + +JETM15AKt10CSThinningTool = DerivationFramework__JetCaloClusterThinning(name = "JETM15AKt10CSThinningTool", + StreamName = streamName, + SGKey = "AntiKt10LCTopoCSSKJets", + TopoClCollectionSGKey = "CaloCalTopoClusters", + SelectionString = "AntiKt10LCTopoCSSKJets.pt > 300*GeV && abs(AntiKt10LCTopoCSSKJets.eta) < 2.8", + AdditionalClustersKey = ["LCOriginTopoClusters", "LCOriginCSSKTopoClusters"], + ApplyAnd = False) +ToolSvc += JETM15AKt10CSThinningTool +thinningTools.append(JETM15AKt10CSThinningTool) + +JETM15AKt10CCThinningTool = DerivationFramework__JetCaloClusterThinning(name = "JETM15AKt10CCThinningTool", + StreamName = streamName, + SGKey = "AntiKt10LCTopoJets", + TopoClCollectionSGKey = "CaloCalTopoClusters", + SelectionString = "(AntiKt10LCTopoJets.pt > 300*GeV && abs(AntiKt10LCTopoJets.eta) < 2.8)", + AdditionalClustersKey = ["LCOriginTopoClusters", "LCOriginCSSKTopoClusters"], + ApplyAnd = False) +ToolSvc += JETM15AKt10CCThinningTool +thinningTools.append(JETM15AKt10CCThinningTool) + + +# Tracks and CaloClusters associated with TCCs +from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TCCTrackParticleThinning +JETM15TCCTPThinningTool = DerivationFramework__TCCTrackParticleThinning(name = "JETM15TCCTPThinningTool", + StreamName = streamName, + JetKey = "AntiKt10TrackCaloClusterJets", + TCCKey = "TrackCaloClustersCombinedAndNeutral", + InDetTrackParticlesKey = "InDetTrackParticles", + CaloCalTopoClustersKey = "CaloCalTopoClusters", + ThinOriginCorrectedClusters = True, + OriginCaloCalTopoClustersKey = "LCOriginTopoClusters") +ToolSvc += JETM15TCCTPThinningTool +thinningTools.append(JETM15TCCTPThinningTool) + + +from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TCCTrackParticleThinning +JETM15TCCTPThinningToolCSSK = DerivationFramework__TCCTrackParticleThinning(name = "JETM15TCCTPThinningToolCSSK", + StreamName = streamName, + JetKey = "AntiKt10TrackCaloClusterJets", + TCCKey = "TrackCaloClustersCombinedAndNeutral", + InDetTrackParticlesKey = "InDetTrackParticles", + CaloCalTopoClustersKey = "CaloCalTopoClusters", + ThinOriginCorrectedClusters = True, + OriginCaloCalTopoClustersKey = "LCOriginCSSKTopoClusters") +ToolSvc += JETM15TCCTPThinningToolCSSK +thinningTools.append(JETM15TCCTPThinningToolCSSK) + +from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__UFOTrackParticleThinning + +JETM15EMUFOTPThinningTool = DerivationFramework__UFOTrackParticleThinning(name = "JETM15EMUFOTPThinningTool", + StreamName = streamName, + JetKey = "AntiKt10UFOCHSJets", + UFOKey = "CHSUFO", + InDetTrackParticlesKey = "InDetTrackParticles", + PFOCollectionSGKey = "JetETMiss", + AdditionalPFOKey = ["CSSK", "CHS"]) +ToolSvc += JETM15EMUFOTPThinningTool +thinningTools.append(JETM15EMUFOTPThinningTool) + +JETM15EMCSSKUFOTPThinningTool = DerivationFramework__UFOTrackParticleThinning(name = "JETM15CSSKUFOTPThinningTool", + StreamName = streamName, + JetKey = "AntiKt10UFOCSSKJets", + UFOKey = "CSSKUFO", + InDetTrackParticlesKey = "InDetTrackParticles", + PFOCollectionSGKey = "JetETMiss", + AdditionalPFOKey = ["CSSK", "CHS"]) +ToolSvc += JETM15EMCSSKUFOTPThinningTool +thinningTools.append(JETM15EMCSSKUFOTPThinningTool) + + + +from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__JetPFlowThinning +JETM15AKt10PFOThinningTool = DerivationFramework__JetPFlowThinning(name = "JETM15Ak10PFlowThinningTool", + StreamName = streamName, + SGKey = "AntiKt10EMPFlowCSSKJets", + PFOCollectionSGKey = "JetETMiss", + SelectionString = "AntiKt10EMPFlowCSSKJets.pt > 300*GeV && abs(AntiKt10EMPFlowCSSKJets.eta) < 2.8", + AdditionalPFOKey = ["CSSK", "CHS"], + ) +ToolSvc += JETM15AKt10PFOThinningTool +thinningTools.append(JETM15AKt10PFOThinningTool) + + +#======================================= +# CREATE PRIVATE SEQUENCE +#======================================= + +jetm15Seq = CfgMgr.AthSequencer("JETM15Sequence") +DerivationFrameworkJob += jetm15Seq + +#======================================= +# CREATE THE DERIVATION KERNEL ALGORITHM +#======================================= + +from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel +jetm15Seq += CfgMgr.DerivationFramework__DerivationKernel( name = "JETM15TrigSkimKernel", + AugmentationTools = [] , + SkimmingTools = [JETM15TrigSkimmingTool], + ThinningTools = []) + + +#==================================================================== +# Special jets +#==================================================================== + +# Add alternative rho definitions +from DerivationFrameworkJetEtMiss.ExtendedJetCommon import addCHSPFlowObjects +addCHSPFlowObjects() + +from DerivationFrameworkJetEtMiss.JetCommon import defineEDAlg +jetm15Seq += defineEDAlg(R=0.4, inputtype="EMPFlowPUSB") +jetm15Seq += defineEDAlg(R=0.4, inputtype="EMPFlowNeut") + +#SCHEDULE BTAGGING FOR PFLOW JETS +from DerivationFrameworkFlavourTag.FlavourTagCommon import FlavorTagInit +FlavorTagInit(JetCollections=['AntiKt4EMPFlowJets'], Sequencer=jetm15Seq) + +#======================================= +# RESTORE AOD-REDUCED JET COLLECTIONS +#======================================= +reducedJetList = ["AntiKt2PV0TrackJets", + "AntiKt4PV0TrackJets", + "AntiKt4TruthJets", + "AntiKt10TruthJets", + "AntiKt10LCTopoJets"] + +replaceAODReducedJets(reducedJetList,jetm15Seq,"JETM15") + +addDefaultTrimmedJets(jetm15Seq,"JETM15") + +addConstModJets("AntiKt", 1.0, "LCTopo", ["CS", "SK"], jetm15Seq, "JETM15", ptmin=40000, + ptminFilter=50000, mods="lctopo_ungroomed", addGetters=[]) + +addConstModJets("AntiKt", 1.0, "EMPFlow", ["CS", "SK"], jetm15Seq, "JETM15", ptmin=40000, + ptminFilter=50000) + +# add VR jets +addVRJets(jetm15Seq) +addVRJets(jetm15Seq,training='201903') + + + + +# Now we can run the UFO building taking our unified PFlow container as input +from TrackCaloClusterRecTools.TrackCaloClusterConfig import runUFOReconstruction +emufoAlg = runUFOReconstruction(jetm15Seq,ToolSvc, PFOPrefix="CHS",caloClusterName="LCOriginTopoClusters") +emcsskufoAlg = runUFOReconstruction(jetm15Seq,ToolSvc, PFOPrefix="CSSK", caloClusterName='LCOriginTopoClusters') + +from JetRec.JetRecConf import PseudoJetGetter + +csskufopjgetter = PseudoJetGetter("csskufoPJGetter", InputContainer="CSSKUFO", OutputContainer="CSSKUFOPJ", Label="UFO", SkipNegativeEnergy=True) +jtm+=csskufopjgetter +ufopjgetter = PseudoJetGetter("ufoPJGetter", InputContainer="CHSUFO", OutputContainer="CHSUFOPJ", Label="UFO", SkipNegativeEnergy=True) +jtm+=ufopjgetter + +# These lines make sure that we also retrieve all of the other getters, like track association +# addConstModJets doesn't have a good way of dealing with UFOs at the moment unfortunately +csskufogetters = [csskufopjgetter]+list(jtm.gettersMap["tcc"])[1:] +chsufogetters = [ufopjgetter]+list(jtm.gettersMap["tcc"])[1:] +addStandardJets("AntiKt", 1.0, "UFOCSSK", ptmin=40000, ptminFilter=50000, algseq=jetm15Seq, outputGroup="JETM15", customGetters = csskufogetters, constmods=["CSSK"]) +addStandardJets("AntiKt", 1.0, "UFOCHS", ptmin=40000, ptminFilter=50000, algseq=jetm15Seq, outputGroup="JETM15", customGetters = chsufogetters, constmods=["CHS"]) + +# Create TCC objects +from TrackCaloClusterRecTools.TrackCaloClusterConfig import runTCCReconstruction +# Set up geometry and BField +import AthenaCommon.AtlasUnixStandardJob +include("RecExCond/AllDet_detDescr.py") +runTCCReconstruction(jetm15Seq, ToolSvc, "LCOriginTopoClusters", "InDetTrackParticles",outputTCCName="TrackCaloClustersCombinedAndNeutral") +addTCCTrimmedJets(jetm15Seq,"JETM15") + + + +from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel +jetm15Seq += CfgMgr.DerivationFramework__DerivationKernel( name = "JETM15MainKernel", + AugmentationTools = [TrigMatchAug] , + SkimmingTools = [JETM15OfflineSkimmingTool], + ThinningTools = thinningTools) + +#==================================================================== +# SET UP STREAM +#==================================================================== +streamName = derivationFlags.WriteDAOD_JETM15Stream.StreamName +fileName = buildFileName( derivationFlags.WriteDAOD_JETM15Stream ) +JETM15Stream = MSMgr.NewPoolRootStream( streamName, fileName ) +JETM15Stream.AcceptAlgs(["JETM15MainKernel"]) +augStream = MSMgr.GetStream( streamName ) +evtStream = augStream.GetEventStream() + +# Truth particle thinning +doTruthThinning = True +preserveAllDescendants = False + +if DerivationFrameworkIsMonteCarlo: + + from DerivationFrameworkCore.ThinningHelper import ThinningHelper + JETM15ThinningHelper = ThinningHelper( "JETM15ThinningHelper" ) + JETM15ThinningHelper.AppendToStream( JETM15Stream ) + from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__MenuTruthThinning + TruthThinningTool = DerivationFramework__MenuTruthThinning(name = "JETM15TruthThinning", + StreamName = streamName, + WriteAllStable = True, + WritePartons = False, + WriteHadrons = False, + WriteBHadrons = True, + WriteCHadrons = False, + WriteGeant = False, + WriteFirstN = -1) + ToolSvc += TruthThinningTool + thinningTools.append(TruthThinningTool) + +#==================================================================== +# Add the containers to the output stream - slimming done here +#==================================================================== +from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper + +JETM15SlimmingHelper = SlimmingHelper("JETM15SlimmingHelper") +JETM15SlimmingHelper.AppendToDictionary = { + "Kt4EMPFlowNeutEventShape": "xAOD::EventShape", + "Kt4EMPFlowNeutEventShapeAux": "xAOD::AuxInfoBase", + "Kt4EMPFlowPUSBEventShape": "xAOD::EventShape", + "Kt4EMPFlowPUSBEventShapeAux": "xAOD::AuxInfoBase", + "AntiKt10LCTopoCSSKJets" : "xAOD::JetContainer" , + "AntiKt10LCTopoCSSKJetsAux.": "xAOD::JetAuxContainer" , + "AntiKt10LCTopoJets" : "xAOD::JetContainer" , + "AntiKt10LCTopoJetsAux.": "xAOD::JetAuxContainer" +} + +JETM15SlimmingHelper.SmartCollections = [ + "Electrons", + "Muons", + "InDetTrackParticles", + "PrimaryVertices", + "MET_Reference_AntiKt4EMTopo", + "MET_Reference_AntiKt4EMPFlow", + "AntiKt4EMTopoJets", + "AntiKt4EMPFlowJets", + "AntiKt4EMPFlowJets_BTagging201810", + "AntiKt4EMPFlowJets_BTagging201903", + "AntiKt4EMTopoJets_BTagging201810", + "BTagging_AntiKt4EMPFlow_201810", + "BTagging_AntiKt4EMPFlow_201903", + "BTagging_AntiKt4EMTopo_201810", + "BTagging_AntiKtVR30Rmax4Rmin02Track_201810", + "BTagging_AntiKtVR30Rmax4Rmin02Track_201903", + "AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets" +] + +JETM15SlimmingHelper.AllVariables = [ + "Kt4EMTopoOriginEventShape", + "Kt4LCTopoOriginEventShape", + "Kt4EMPFlowEventShape", + "Kt4EMPFlowPUSBEventShape", + "Kt4EMPFlowNeutEventShape", + "TruthParticles", + "TruthEvents", + "TruthVertices", +] + +#Do we need small-R truth jets? +if DerivationFrameworkIsMonteCarlo: + JETM15SlimmingHelper.AppendToDictionary["AntiKt10TruthJets"]="xAOD::JetContainer" + JETM15SlimmingHelper.AppendToDictionary["AntiKt10TruthJetsAux"]="xAOD::JetAuxContainer" + JETM15SlimmingHelper.AllVariables += ["AntiKt10TruthJets"] + +addOriginCorrectedClusters(JETM15SlimmingHelper,writeLC=True,writeEM=True) + +JETM15SlimmingHelper.AppendToDictionary["CaloCalTopoClusters"]='xAOD::CaloClusterContainer' +JETM15SlimmingHelper.AppendToDictionary["CaloCalTopoClustersAux"]='xAOD::CaloClusterAuxContainer' +JETM15SlimmingHelper.ExtraVariables.append('CaloCalTopoClusters.calEta.calPhi.calE.calM.rawEta.rawPhi.rawE.rawM') + +JETM15SlimmingHelper.AppendToDictionary["LCOriginTopoClusters"]='xAOD::CaloClusterContainer' +JETM15SlimmingHelper.AppendToDictionary["LCOriginTopoClustersAux"]='xAOD::ShallowAuxContainer' + +JETM15SlimmingHelper.AppendToDictionary["LCOriginCSSKTopoClusters"]='xAOD::CaloClusterContainer' +JETM15SlimmingHelper.AppendToDictionary["LCOriginCSSKTopoClustersAux"]='xAOD::ShallowAuxContainer' + +JETM15SlimmingHelper.AppendToDictionary["JetETMissNeutralParticleFlowObjects"]='xAOD::PFOContainer' +JETM15SlimmingHelper.AppendToDictionary["JetETMissNeutralParticleFlowObjectsAux"]='xAOD::PFOAuxContainer' +JETM15SlimmingHelper.ExtraVariables.append('JetETMissNeutralParticleFlowObjects.pt.eta.phi.m.e.charge') + +JETM15SlimmingHelper.AppendToDictionary["JetETMissChargedParticleFlowObjects"]='xAOD::PFOContainer' +JETM15SlimmingHelper.AppendToDictionary["JetETMissChargedParticleFlowObjectsAux"]='xAOD::PFOAuxContainer' +JETM15SlimmingHelper.ExtraVariables.append('JetETMissChargedParticleFlowObjects.pt.eta.phi.m.e.charge.matchedToPV') + +JETM15SlimmingHelper.AppendToDictionary["CSSKUFO"] = 'xAOD::TrackCaloClusterContainer' +JETM15SlimmingHelper.AppendToDictionary['CSSKUFOAux'] = 'xAOD::TrackCaloClusterAuxContainer' +JETM15SlimmingHelper.ExtraVariables +=[ 'CSSKUFO.pt.eta.phi.m.taste' ] + +JETM15SlimmingHelper.AppendToDictionary["CHSUFO"] = 'xAOD::TrackCaloClusterContainer' +JETM15SlimmingHelper.AppendToDictionary['CHSUFOAux'] = 'xAOD::TrackCaloClusterAuxContainer' +JETM15SlimmingHelper.ExtraVariables +=[ 'CHSUFO.pt.eta.phi.m.taste' ] + + +JETM15SlimmingHelper.AppendToDictionary["CSSKChargedParticleFlowObjects"]='xAOD::PFOContainer' +JETM15SlimmingHelper.AppendToDictionary["CSSKChargedParticleFlowObjectsAux"]='xAOD::ShallowAuxContainer' +JETM15SlimmingHelper.ExtraVariables.append('CSSKChargedParticleFlowObjects.pt.eta.phi.m.e.charge.matchedToPV') + +JETM15SlimmingHelper.AppendToDictionary["CSSKNeutralParticleFlowObjects"]='xAOD::PFOContainer' +JETM15SlimmingHelper.AppendToDictionary["CSSKNeutralParticleFlowObjectsAux"]='xAOD::ShallowAuxContainer' +JETM15SlimmingHelper.ExtraVariables.append('CSSKNeutralParticleFlowObjects.pt.eta.phi.m.e.charge') + +JETM15SlimmingHelper.AppendToDictionary["CHSChargedParticleFlowObjects"]='xAOD::PFOContainer' +JETM15SlimmingHelper.AppendToDictionary["CHSChargedParticleFlowObjectsAux"]='xAOD::ShallowAuxContainer' +JETM15SlimmingHelper.ExtraVariables.append('CHSChargedParticleFlowObjects.pt.eta.phi.m.e.charge.matchedToPV') + +JETM15SlimmingHelper.AppendToDictionary["CHSNeutralParticleFlowObjects"]='xAOD::PFOContainer' +JETM15SlimmingHelper.AppendToDictionary["CHSNeutralParticleFlowObjectsAux"]='xAOD::ShallowAuxContainer' +JETM15SlimmingHelper.ExtraVariables.append('CHSNeutralParticleFlowObjects.pt.eta.phi.m.e.charge') + +JETM15SlimmingHelper.AllVariables += ["LCOriginTopoClusters", "LCOriginCSSKTopoClusters", "CSSKNeutralParticleFlowObjects", "CSSKChargedParticleFlowObjects", "TrackCaloClustersCombinedAndNeutral", "CHSChargedParticleFlowObjects", "CHSNeutralParticleFlowObjects"] +JETM15SlimmingHelper.ExtraVariables.append("AntiKt4EMTopoJets.btaggingLink") +JETM15SlimmingHelper.ExtraVariables.append("BTagging_AntiKt4EMTopo.MSV_N2Tpair.MSV_badTracksIP.MSV_energyTrkInJet.MSV_normdist.MSV_nvsec.MSV_vertices.MV1_discriminant.MV2c00_discriminant.MV2c100_discriminant.MV2c10_discriminant.MV2c20_discriminant.MV2m_pb.MV2m_pc.MV2m_pu.MultiSVbb1_discriminant.MultiSVbb2_discriminant.SV0_N2Tpair.SV1_pb.SV1_pc.SV1_pu.IP3D_pb.IP3D_pc.IP3D_pu.DL1_pb.DL1_pc.DL1_pu.DL1mu_pb.DL1mu_pc.DL1mu_pu.DL1rnn_pb.DL1rnn_pc.DL1rnn_pu.JetVertexCharge_discriminant") + +# Check if we need truth muon collection +for truthc in [ + "TruthElectrons", + "TruthMuons", + ]: + JETM15SlimmingHelper.StaticContent.append("xAOD::TruthParticleContainer#"+truthc) + JETM15SlimmingHelper.StaticContent.append("xAOD::TruthParticleAuxContainer#"+truthc+"Aux.") + +for truthc in [ + "TruthTopQuark", + "TruthBosons" + ]: + JETM15SlimmingHelper.StaticContent.append("xAOD::TruthParticleContainer#"+truthc+"WithDecayParticles") + JETM15SlimmingHelper.StaticContent.append("xAOD::TruthParticleAuxContainer#"+truthc+"WithDecayParticlesAux.") + JETM15SlimmingHelper.StaticContent.append("xAOD::TruthVertexContainer#"+truthc+"WithDecayVertices") + JETM15SlimmingHelper.StaticContent.append("xAOD::TruthVertexAuxContainer#"+truthc+"WithDecayVerticesAux.") + +# Add the jet containers to the stream +# explicitely add the container we want : +addJetOutputs(JETM15SlimmingHelper,[ + "AntiKt10LCTopoJets", "AntiKt10LCTopoCSSKJets", "AntiKt10EMPFlowCSSKJets", "AntiKt10TrackCaloClusterJets", "AntiKt10UFOCHSJets", "AntiKt10UFOCSSKJets", + "JETM15", # jets defined in this file + ]) + + +JETM15SlimmingHelper.ExtraVariables += [ + NewTrigVars["Muons"][0], + ] + +JETM15SlimmingHelper.AppendContentToStream(JETM15Stream) + +JETM15Stream.RemoveItem("xAOD::TrigNavigation#*") +JETM15Stream.RemoveItem("xAOD::TrigNavigationAuxInfo#*") + + diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM2.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM2.py index a055bf17b77dfa411ead480ec9138b1d1a4d89e0..7c48fa50439b426ab5bdeea5719708f5d86415c9 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM2.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM2.py @@ -6,23 +6,23 @@ from DerivationFrameworkCore.DerivationFrameworkMaster import * from DerivationFrameworkInDet.InDetCommon import * from DerivationFrameworkJetEtMiss.JetCommon import * -#from DerivationFrameworkJetEtMiss.ExtendedJetCommon import * +from DerivationFrameworkJetEtMiss.ExtendedJetCommon import * from DerivationFrameworkEGamma.EGammaCommon import * from DerivationFrameworkMuons.MuonsCommon import * # from DerivationFrameworkJetEtMiss.METCommon import * # if DerivationFrameworkIsMonteCarlo: - from DerivationFrameworkMCTruth.MCTruthCommon import * - from DerivationFrameworkTau.TauTruthCommon import * + from DerivationFrameworkMCTruth.MCTruthCommon import addStandardTruthContents + addStandardTruthContents() #==================================================================== # SKIMMING TOOL #==================================================================== -from DerivationFrameworkJetEtMiss.TriggerLists import * -electronTriggers = singleElTriggers -muonTriggers = singleMuTriggers +from DerivationFrameworkJetEtMiss import TriggerLists +electronTriggers = TriggerLists.single_el_Trig() +muonTriggers = TriggerLists.single_mu_Trig() orstr = ' || ' andstr = ' && ' @@ -41,6 +41,11 @@ JETM2SkimmingTool = DerivationFramework__xAODStringSkimmingTool( name = "JETM2Sk expression = expression) ToolSvc += JETM2SkimmingTool +#Trigger matching decorations +from DerivationFrameworkCore.TriggerMatchingAugmentation import applyTriggerMatching +TrigMatchAug, NewTrigVars = applyTriggerMatching(ToolNamePrefix="JETM2", + ElectronTriggers=electronTriggers,MuonTriggers=muonTriggers) + #==================================================================== # SET UP STREAM #==================================================================== @@ -92,7 +97,7 @@ thinningTools.append(JETM2PhotonTPThinningTool) # TrackParticles associated with taus from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TauTrackParticleThinning JETM2TauTPThinningTool = DerivationFramework__TauTrackParticleThinning( name = "JETM2TauTPThinningTool", - StreamName = streamName, + StreamName = streamName, TauKey = "TauJets", InDetTrackParticlesKey = "InDetTrackParticles") ToolSvc += JETM2TauTPThinningTool @@ -137,7 +142,29 @@ DerivationFrameworkJob += jetm2Seq from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel jetm2Seq += CfgMgr.DerivationFramework__DerivationKernel("JETM2Kernel", SkimmingTools = [JETM2SkimmingTool], - ThinningTools = thinningTools) + ThinningTools = thinningTools, + AugmentationTools = [TrigMatchAug]) + +#======================================= +# SCHEDULE SMALL-R JETS WITH LOW PT CUT +#======================================= + +OutputJets["JETM2"] = [] + +#======================================= +# RESTORE AOD-REDUCED JET COLLECTIONS +#======================================= +reducedJetList = ["AntiKt2PV0TrackJets", + "AntiKt4PV0TrackJets", + "AntiKt4TruthJets"] +replaceAODReducedJets(reducedJetList,jetm2Seq,"JETM2") + + +#======================================= +# SCHEDUKE BTAGGING FOR PFLOW JETS +#======================================= +from DerivationFrameworkFlavourTag.FlavourTagCommon import FlavorTagInit +FlavorTagInit(JetCollections=['AntiKt4EMPFlowJets'], Sequencer=jetm2Seq) #======================================= # SCHEDULE CUSTOM MET RECONSTRUCTION @@ -161,15 +188,22 @@ JETM2SlimmingHelper.SmartCollections = ["Electrons", "Photons", "Muons", "TauJet "MET_Reference_AntiKt4LCTopo", "MET_Reference_AntiKt4EMPFlow", "AntiKt4EMTopoJets","AntiKt4LCTopoJets","AntiKt4EMPFlowJets", - "BTagging_AntiKt4EMTopo", + "AntiKt4EMPFlowJets_BTagging201810", + "AntiKt4EMPFlowJets_BTagging201903", + "AntiKt4EMTopoJets_BTagging201810", + "BTagging_AntiKt4EMPFlow_201810", + "BTagging_AntiKt4EMPFlow_201903", + "BTagging_AntiKt4EMTopo_201810", ] JETM2SlimmingHelper.AllVariables = ["MuonTruthParticles", "egammaTruthParticles", "TruthParticles", "TruthEvents", "TruthVertices", "MuonSegments", "Kt4EMTopoOriginEventShape","Kt4LCTopoOriginEventShape","Kt4EMPFlowEventShape", ] -JETM2SlimmingHelper.ExtraVariables = ["Muons.energyLossType.EnergyLoss.ParamEnergyLoss.MeasEnergyLoss.EnergyLossSigma.MeasEnergyLossSigma.ParamEnergyLossSigmaPlus.ParamEnergyLossSigmaMinus", +JETM2SlimmingHelper.ExtraVariables = ["Electrons."+NewTrigVars["Electrons"], + "Muons.energyLossType.EnergyLoss.ParamEnergyLoss.MeasEnergyLoss.EnergyLossSigma.MeasEnergyLossSigma.ParamEnergyLossSigmaPlus.ParamEnergyLossSigmaMinus."+NewTrigVars["Muons"], "TauJets.IsTruthMatched.truthParticleLink.truthJetLink"] + for truthc in [ "TruthMuons", "TruthElectrons", diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM3.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM3.py index 09c86d4ad4de3d7409460b39fc55f972303a91a7..e2be155c79b931d4914b192a0953a480139e6ccc 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM3.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM3.py @@ -1,6 +1,6 @@ -m#==================================================================== -# JETM3.py -# reductionConf flag JETM3 in Reco_tf.py +#==================================================================== +# JETM3.py +# reductionConf flag JETM3 in Reco_tf.py #==================================================================== from DerivationFrameworkCore.DerivationFrameworkMaster import * @@ -14,17 +14,17 @@ from DerivationFrameworkMuons.MuonsCommon import * from DerivationFrameworkJetEtMiss.METCommon import * # if DerivationFrameworkIsMonteCarlo: - from DerivationFrameworkMCTruth.MCTruthCommon import * - from DerivationFrameworkTau.TauTruthCommon import * + from DerivationFrameworkMCTruth.MCTruthCommon import addStandardTruthContents + addStandardTruthContents() # #==================================================================== -# SKIMMING TOOL +# SKIMMING TOOL #==================================================================== -from DerivationFrameworkJetEtMiss.TriggerLists import * -electronTriggers = singleElTriggers -muonTriggers = singleMuTriggers +from DerivationFrameworkJetEtMiss import TriggerLists +electronTriggers = TriggerLists.single_el_Trig() +muonTriggers = TriggerLists.single_mu_Trig() orstr = ' || ' andstr = ' && ' @@ -42,8 +42,13 @@ JETM3SkimmingTool = DerivationFramework__xAODStringSkimmingTool( name = "JETM3Sk expression = expression) ToolSvc += JETM3SkimmingTool +#Trigger matching decorations +from DerivationFrameworkCore.TriggerMatchingAugmentation import applyTriggerMatching +TrigMatchAug, NewTrigVars = applyTriggerMatching(ToolNamePrefix="JETM3", + ElectronTriggers=electronTriggers,MuonTriggers=muonTriggers) + #==================================================================== -# SET UP STREAM +# SET UP STREAM #==================================================================== streamName = derivationFlags.WriteDAOD_JETM3Stream.StreamName fileName = buildFileName( derivationFlags.WriteDAOD_JETM3Stream ) @@ -60,7 +65,7 @@ JETM3ThinningHelper = ThinningHelper( "JETM3ThinningHelper" ) JETM3ThinningHelper.AppendToStream( JETM3Stream ) #==================================================================== -# THINNING TOOLS +# THINNING TOOLS #==================================================================== thinningTools = [] @@ -119,9 +124,9 @@ if doTruthThinning and DerivationFrameworkIsMonteCarlo: truth_cond_Quark = "((abs(TruthParticles.pdgId) <= 5 && (TruthParticles.pt > 10000.)) || (abs(TruthParticles.pdgId) == 6))" # Quarks truth_cond_Gluon = "((abs(TruthParticles.pdgId) == 21) && (TruthParticles.pt > 10000.))" # Gluons truth_cond_Photon = "((abs(TruthParticles.pdgId) == 22) && (TruthParticles.pt > 10000.) && (TruthParticles.barcode < 200000))" # Photon - + truth_expression = '('+truth_cond_WZH+' || '+truth_cond_Lepton +' || '+truth_cond_Quark+'||'+truth_cond_Gluon+' || '+truth_cond_Photon+')' - + from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning JETM3TruthThinningTool = DerivationFramework__GenericTruthThinning( name = "JETM3TruthThinningTool", StreamName = streamName, @@ -129,9 +134,9 @@ if doTruthThinning and DerivationFrameworkIsMonteCarlo: PreserveDescendants = preserveAllDescendants, PreserveGeneratorDescendants = not preserveAllDescendants, PreserveAncestors = True) - + ToolSvc += JETM3TruthThinningTool - thinningTools.append(JETM3TruthThinningTool) + thinningTools.append(JETM3TruthThinningTool) #======================================= # CREATE PRIVATE SEQUENCE @@ -141,59 +146,77 @@ jetm3Seq = CfgMgr.AthSequencer("JETM3Sequence") DerivationFrameworkJob += jetm3Seq #======================================= -# CREATE THE DERIVATION KERNEL ALGORITHM +# CREATE THE DERIVATION KERNEL ALGORITHM #======================================= from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel jetm3Seq += CfgMgr.DerivationFramework__DerivationKernel( name = "JETM3Kernel", SkimmingTools = [JETM3SkimmingTool], - ThinningTools = thinningTools) -# PFlow augmentation -applyPFOAugmentation(jetm3Seq) + ThinningTools = thinningTools, + AugmentationTools = [TrigMatchAug]) + +OutputJets["JETM3"] = [] #======================================= -# SCHEDULE SMALL-R JETS WITH LOW PT CUT +# BUILD UFO INPUTS #======================================= -OutputJets["JETM3"] = [] +# Add PFlow constituents +from JetRecTools.ConstModHelpers import getConstModSeq, xAOD +pflowCSSKSeq = getConstModSeq(["CS","SK"], "EMPFlow") + +# add the pflow cssk sequence to the main jetalg if not already there : +if pflowCSSKSeq.getFullName() not in [t.getFullName() for t in DerivationFrameworkJob.jetalg.Tools]: + DerivationFrameworkJob.jetalg.Tools += [pflowCSSKSeq] + +# Add UFO constituents +from TrackCaloClusterRecTools.TrackCaloClusterConfig import runUFOReconstruction +emufoAlg = runUFOReconstruction(jetm3Seq,ToolSvc, PFOPrefix="CHS") +emcsskufoAlg = runUFOReconstruction(jetm3Seq, ToolSvc, PFOPrefix="CSSK") #======================================= # RESTORE AOD-REDUCED JET COLLECTIONS #======================================= reducedJetList = ["AntiKt2PV0TrackJets", "AntiKt4PV0TrackJets", - "AntiKt4TruthJets"] + "AntiKt4TruthJets", + "AntiKt10TruthJets", + "AntiKt10UFOCSSKJets", + "AntiKt10UFOCHSJets", + ] replaceAODReducedJets(reducedJetList,jetm3Seq,"JETM3") -from JetRec.JetRecStandard import jtm -#EMTopo -lowptjetalg = None -if "jetalgAntiKt4EMTopoLowPtJets" in DFJetAlgs.keys(): - lowptjetalg = DFJetAlgs["jetalgAntiKt4EMTopoLowPtJets"] -else: - jtm.addJetFinder("AntiKt4EMTopoLowPtJets", "AntiKt", 0.4, "emtopo", "emtopo_ungroomed", ghostArea=0.01, ptmin= 2000, ptminFilter= 2000, calibOpt="ar") - lowptjetalg = CfgMgr.JetAlgorithm("jetalgAntiKt4EMTopoLowPtJets", Tools = [jtm.AntiKt4EMTopoLowPtJets]) - DFJetAlgs["jetalgAntiKt4EMTopoLowPtJets"] = lowptjetalg; -jetm3Seq += lowptjetalg -OutputJets["JETM3"].append("AntiKt4EMTopoLowPtJets") -#LCTopo -if "jetalgAntiKt4LCTopoLowPtJets" in DFJetAlgs.keys(): - lowptjetalg = DFJetAlgs["jetalgAntiKt4LCTopoLowPtJets"] -else: - jtm.addJetFinder("AntiKt4LCTopoLowPtJets", "AntiKt", 0.4, "lctopo", "lctopo_ungroomed", ghostArea=0.01, ptmin= 2000, ptminFilter= 2000, calibOpt="ar") - lowptjetalg = CfgMgr.JetAlgorithm("jetalgAntiKt4LCTopoLowPtJets", Tools = [jtm.AntiKt4LCTopoLowPtJets]) - DFJetAlgs["jetalgAntiKt4LCTopoLowPtJets"] = lowptjetalg; -jetm3Seq += lowptjetalg -OutputJets["JETM3"].append("AntiKt4LCTopoLowPtJets") -#EMPFlow -if "jetalgAntiKt4EMPFlowLowPtJets" in DFJetAlgs.keys(): - lowptjetalg = DFJetAlgs["jetalgAntiKt4EMPFlowLowPtJets"] -else: - jtm.addJetFinder("AntiKt4EMPFlowLowPtJets", "AntiKt", 0.4, "empflow", "pflow_ungroomed", ghostArea=0.01, ptmin= 2000, ptminFilter= 2000, calibOpt="ar:pflow") - lowptjetalg = CfgMgr.JetAlgorithm("jetalgAntiKt4EMPFlowLowPtJets", Tools = [jtm.AntiKt4EMPFlowLowPtJets]) - DFJetAlgs["jetalgAntiKt4EMPFlowLowPtJets"] = lowptjetalg; -jetm3Seq += lowptjetalg -OutputJets["JETM3"].append("AntiKt4EMPFlowLowPtJets") +addDefaultTrimmedJets(jetm3Seq,"JETM3") +# UFO Trimmed jets +addTrimmedJets("AntiKt", 1.0, "UFOCSSK", rclus=0.2, ptfrac=0.05, algseq=jetm3Seq, outputGroup="JETM3", writeUngroomed=False, mods="tcc_groomed") +addTrimmedJets("AntiKt", 1.0, "UFOCHS", rclus=0.2, ptfrac=0.05, algseq=jetm3Seq, outputGroup="JETM3", writeUngroomed=False, mods="tcc_groomed") +# CSSK UFO SoftDrop jets +addSoftDropJets("AntiKt", 1.0, "UFOCSSK", beta=1.0, zcut=0.1, algseq=jetm3Seq, outputGroup="JETM3", writeUngroomed=False, mods="tcc_groomed") +addRecursiveSoftDropJets('AntiKt', 1.0, 'UFOCSSK', beta=1.0, zcut=0.05, N=-1, mods="tcc_groomed", algseq=jetm3Seq, outputGroup="JETM3", writeUngroomed=False) +addBottomUpSoftDropJets('AntiKt', 1.0, 'UFOCSSK', beta=1.0, zcut=0.05, mods="tcc_groomed", algseq=jetm3Seq, outputGroup="JETM3", writeUngroomed=False) + +if DerivationFrameworkIsMonteCarlo: + addSoftDropJets('AntiKt', 1.0, 'Truth', beta=1.0, zcut=0.1, mods="truth_groomed", algseq=jetm3Seq, outputGroup="JETM3", writeUngroomed=False) + addRecursiveSoftDropJets('AntiKt', 1.0, 'Truth', beta=1.0, zcut=0.05, N=-1, mods="truth_groomed", algseq=jetm3Seq, outputGroup="JETM3", writeUngroomed=False) + addBottomUpSoftDropJets('AntiKt', 1.0, 'Truth', beta=1.0, zcut=0.05, mods="truth_groomed", algseq=jetm3Seq, outputGroup="JETM3", writeUngroomed=False) + +# Add the BCID info +addDistanceInTrain(jetm3Seq) + +#======================================= +# SCHEDULE SMALL-R JETS WITH LOW PT CUT +#======================================= + +addAntiKt4LowPtJets(jetm3Seq,"JETM3") + +#==================================================================== +#Jets for R-scan +#==================================================================== +for radius in [0.2, 0.6]: + if jetFlags.useTruth: + addRscanJets("AntiKt",radius,"Truth",jetm3Seq,"JETM3") + addRscanJets("AntiKt",radius,"TruthWZ",jetm3Seq,"JETM3") + addRscanJets("AntiKt",radius,"LCTopo",jetm3Seq,"JETM3") #======================================= # SCHEDULE CUSTOM MET RECONSTRUCTION @@ -203,6 +226,34 @@ if DerivationFrameworkIsMonteCarlo: addMETTruthMap('AntiKt4LCTopo',"JETMX") addMETTruthMap('AntiKt4EMPFlow',"JETMX") scheduleMETAssocAlg(jetm3Seq,"JETMX") + ## Add GhostTruthAssociation information ## + addJetPtAssociation(jetalg="AntiKt4EMTopo", truthjetalg="AntiKt4TruthJets", sequence=jetm3Seq, algname="JetPtAssociationAlg") + addJetPtAssociation(jetalg="AntiKt4LCTopo", truthjetalg="AntiKt4TruthJets", sequence=jetm3Seq, algname="JetPtAssociationAlg") + addJetPtAssociation(jetalg="AntiKt4EMPFlow", truthjetalg="AntiKt4TruthJets", sequence=jetm3Seq, algname="JetPtAssociationAlg") + addJetPtAssociation(jetalg="AntiKt4EMTopoLowPt", truthjetalg="AntiKt4TruthJets", sequence=jetm3Seq, algname="JetPtAssociationAlgLowPt") + addJetPtAssociation(jetalg="AntiKt4LCTopoLowPt", truthjetalg="AntiKt4TruthJets", sequence=jetm3Seq, algname="JetPtAssociationAlgLowPt") + +#==================================================================== +# ADD PFLOW AUG INFORMATION +#==================================================================== +from DerivationFrameworkJetEtMiss.PFlowCommon import applyPFOAugmentation +applyPFOAugmentation(DerivationFrameworkJob) + +#======================================= +# BTAGGING INFO FOR PFLOW JET +#======================================= +from DerivationFrameworkFlavourTag.FlavourTagCommon import FlavorTagInit +FlavorTagInit(JetCollections = ['AntiKt4EMPFlowJets'],Sequencer = jetm3Seq) + +# QGTaggerTool ### +addQGTaggerTool(jetalg="AntiKt4EMTopo", sequence=jetm3Seq, algname="QGTaggerToolAlg") +addQGTaggerTool(jetalg="AntiKt4EMPFlow", sequence=jetm3Seq, algname="QGTaggerToolAlg") + +# MVfJvt # +applyMVfJvtAugmentation(jetalg='AntiKt4EMTopo',sequence=jetm3Seq, algname='JetForwardJvtToolBDTAlg') + +# PFlow fJvt # +getPFlowfJVT(jetalg='AntiKt4EMPFlow',sequence=jetm3Seq, algname='JetForwardPFlowJvtToolAlg') #==================================================================== # Add the containers to the output stream - slimming done here @@ -214,18 +265,43 @@ JETM3SlimmingHelper.SmartCollections = ["Electrons", "Photons", "Muons", "TauJet "MET_Reference_AntiKt4EMTopo", "MET_Reference_AntiKt4LCTopo", "MET_Reference_AntiKt4EMPFlow", - "AntiKt4EMTopoJets","AntiKt4LCTopoJets","AntiKt4EMPFlowJets", - "BTagging_AntiKt4EMTopo", + "AntiKt2LCTopoJets", "AntiKt6LCTopoJets", + "AntiKt4TruthWZJets", + "AntiKt10TruthJets", + "AntiKt10UFOCSSKJets", + "AntiKt10UFOCHSJets", + "AntiKt10TruthTrimmedPtFrac5SmallR20Jets", + "AntiKt10TruthSoftDropBeta100Zcut10Jets", + "AntiKt10TruthBottomUpSoftDropBeta100Zcut5Jets", + "AntiKt10TruthRecursiveSoftDropBeta100Zcut5NinfJets", + "AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets", + "AntiKt10UFOCHSTrimmedPtFrac5SmallR20Jets", + "AntiKt10UFOCSSKTrimmedPtFrac5SmallR20Jets", + "AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets", + "AntiKt10UFOCSSKBottomUpSoftDropBeta100Zcut5Jets", + "AntiKt10UFOCSSKRecursiveSoftDropBeta100Zcut5NinfJets", + "AntiKt4EMPFlowJets_BTagging201810", + "AntiKt4EMPFlowJets_BTagging201903", + "AntiKt4EMTopoJets_BTagging201810", + "BTagging_AntiKt4EMPFlow_201810", + "BTagging_AntiKt4EMPFlow_201903", + "BTagging_AntiKt4EMTopo_201810", ] JETM3SlimmingHelper.AllVariables = ["CaloCalTopoClusters", "MuonTruthParticles", "egammaTruthParticles", "TruthParticles", "TruthEvents", "TruthVertices", "MuonSegments", + "LVL1JetRoIs", "JetETMissChargedParticleFlowObjects", "JetETMissNeutralParticleFlowObjects", "Kt4EMTopoOriginEventShape","Kt4LCTopoOriginEventShape","Kt4EMPFlowEventShape", ] -JETM3SlimmingHelper.ExtraVariables = ["Muons.energyLossType.EnergyLoss.ParamEnergyLoss.MeasEnergyLoss.EnergyLossSigma.MeasEnergyLossSigma.ParamEnergyLossSigmaPlus.ParamEnergyLossSigmaMinus"] +JETM3SlimmingHelper.ExtraVariables = [ + 'HLT_xAOD__JetContainer_a4tcemsubjesFS.ActiveArea.ActiveArea4vec_eta.ActiveArea4vec_m.ActiveArea4vec_phi.ActiveArea4vec_pt.AlgorithmType.AverageLArQF.BchCorrCell.CentroidR.ConstituentScale.DetectorEta.EMFrac.EnergyPerSampling.FracSamplingMax.FracSamplingMaxIndex.HECFrac.HECQuality.InputType.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_m.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_pt.JetEMScaleMomentum_eta.JetEMScaleMomentum_m.JetEMScaleMomentum_phi.JetEMScaleMomentum_pt.JetEtaJESScaleMomentum_eta.JetEtaJESScaleMomentum_m.JetEtaJESScaleMomentum_phi.JetEtaJESScaleMomentum_pt.JetPileupScaleMomentum_eta.JetPileupScaleMomentum_m.JetPileupScaleMomentum_phi.JetPileupScaleMomentum_pt.LArQuality.N90Constituents.NegativeE.OriginCorrected.PileupCorrected.SizeParameter.Timing.eta.kinematics.m.phi.pt', + 'HLT_xAOD__JetContainer_a4tcemsubjesISFS.ActiveArea.ActiveArea4vec_eta.ActiveArea4vec_m.ActiveArea4vec_phi.ActiveArea4vec_pt.AlgorithmType.AverageLArQF.BchCorrCell.CentroidR.ConstituentScale.DetectorEta.EMFrac.EnergyPerSampling.FracSamplingMax.FracSamplingMaxIndex.HECFrac.HECQuality.InputType.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_m.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_pt.JetEMScaleMomentum_eta.JetEMScaleMomentum_m.JetEMScaleMomentum_phi.JetEMScaleMomentum_pt.JetEtaJESScaleMomentum_eta.JetEtaJESScaleMomentum_m.JetEtaJESScaleMomentum_phi.JetEtaJESScaleMomentum_pt.JetPileupScaleMomentum_eta.JetPileupScaleMomentum_m.JetPileupScaleMomentum_phi.JetPileupScaleMomentum_pt.LArQuality.N90Constituents.NegativeE.OriginCorrected.PileupCorrected.SizeParameter.Timing.eta.kinematics.m.phi.pt', + "Electrons."+NewTrigVars["Electrons"], + "Muons.energyLossType.EnergyLoss.ParamEnergyLoss.MeasEnergyLoss.EnergyLossSigma.MeasEnergyLossSigma.ParamEnergyLossSigmaPlus.ParamEnergyLossSigmaMinus."+NewTrigVars["Muons"], + "AntiKt4TruthWZJets.pt","AntiKt4TruthWZJets.eta", "AntiKt4TruthWZJets.phi", "AntiKt4TruthWZJets.m"] for truthc in [ "TruthMuons", "TruthElectrons", @@ -241,7 +317,12 @@ JETM3SlimmingHelper.IncludeMuonTriggerContent = True JETM3SlimmingHelper.IncludeEGammaTriggerContent = True # Add the jet containers to the stream -addJetOutputs(JETM3SlimmingHelper,["SmallR","JETM3"]) +addJetOutputs( + slimhelper = JETM3SlimmingHelper, + contentlist = ["SmallR","JETM3"], + smartlist = JETM3SlimmingHelper.SmartCollections + ) + # Add the MET containers to the stream addMETOutputs(JETM3SlimmingHelper,["Diagnostic","Assocs","TruthAssocs","Track","JETM3"]) diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM4.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM4.py index df0b8dd591e91742888c91a1aa64dd9d154ebe49..3039e4f247b7cf5831f9ebe5e03ae1de0e5aba80 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM4.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM4.py @@ -1,6 +1,6 @@ #==================================================================== -# JETM4.py -# reductionConf flag JETM4 in Reco_tf.py +# JETM4.py +# reductionConf flag JETM4 in Reco_tf.py #==================================================================== from DerivationFrameworkCore.DerivationFrameworkMaster import * @@ -11,16 +11,16 @@ from DerivationFrameworkJetEtMiss.ExtendedJetCommon import * from DerivationFrameworkJetEtMiss.METCommon import * # if DerivationFrameworkIsMonteCarlo: - from DerivationFrameworkMCTruth.MCTruthCommon import * - from DerivationFrameworkTau.TauTruthCommon import * + from DerivationFrameworkMCTruth.MCTruthCommon import addStandardTruthContents + addStandardTruthContents() #==================================================================== -# SKIMMING TOOL +# SKIMMING TOOL #==================================================================== # NOTE: need to add isSimulation as OR with trigger -from DerivationFrameworkJetEtMiss.TriggerLists import * -triggerlist = singlePhotonTriggers +from DerivationFrameworkJetEtMiss import TriggerLists +triggerlist = TriggerLists.single_photon_Trig() triggers = '||'.join(triggerlist) expression = '( (EventInfo.eventTypeBitmask==1) || ('+triggers+') )' @@ -30,8 +30,13 @@ JETM4SkimmingTool = DerivationFramework__xAODStringSkimmingTool( name = "JETM4Sk expression = expression) ToolSvc += JETM4SkimmingTool +#Trigger matching decorations +from DerivationFrameworkCore.TriggerMatchingAugmentation import applyTriggerMatching +TrigMatchAug, NewTrigVars = applyTriggerMatching(ToolNamePrefix="JETM4", + PhotonTriggers=TriggerLists.single_photon_Trig()) + #==================================================================== -# SET UP STREAM +# SET UP STREAM #==================================================================== streamName = derivationFlags.WriteDAOD_JETM4Stream.StreamName fileName = buildFileName( derivationFlags.WriteDAOD_JETM4Stream ) @@ -48,7 +53,7 @@ JETM4ThinningHelper = ThinningHelper( "JETM4ThinningHelper" ) JETM4ThinningHelper.AppendToStream( JETM4Stream ) #==================================================================== -# THINNING TOOLS +# THINNING TOOLS #==================================================================== thinningTools = [] @@ -90,7 +95,7 @@ thinningTools.append(JETM4TPThinningTool) # TrackParticles associated with taus from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TauTrackParticleThinning JETM4TauTPThinningTool = DerivationFramework__TauTrackParticleThinning( name = "JETM4TauTPThinningTool", - StreamName = streamName, + StreamName = streamName, TauKey = "TauJets", InDetTrackParticlesKey = "InDetTrackParticles") ToolSvc += JETM4TauTPThinningTool @@ -106,9 +111,9 @@ if doTruthThinning and DerivationFrameworkIsMonteCarlo: truth_cond_Quark = "((abs(TruthParticles.pdgId) <= 5 && (TruthParticles.pt > 10000.)) || (abs(TruthParticles.pdgId) == 6))" # Quarks truth_cond_Gluon = "((abs(TruthParticles.pdgId) == 21) && (TruthParticles.pt > 10000.))" # Gluons truth_cond_Photon = "((abs(TruthParticles.pdgId) == 22) && (TruthParticles.pt > 10000.) && (TruthParticles.barcode < 200000))" # Photon - + truth_expression = '('+truth_cond_WZH+' || '+truth_cond_Lepton +' || '+truth_cond_Quark+'||'+truth_cond_Gluon+' || '+truth_cond_Photon+')' - + from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning JETM4TruthThinningTool = DerivationFramework__GenericTruthThinning( name = "JETM4TruthThinningTool", StreamName = streamName, @@ -116,9 +121,9 @@ if doTruthThinning and DerivationFrameworkIsMonteCarlo: PreserveDescendants = preserveAllDescendants, PreserveGeneratorDescendants = not preserveAllDescendants, PreserveAncestors = True) - + ToolSvc += JETM4TruthThinningTool - thinningTools.append(JETM4TruthThinningTool) + thinningTools.append(JETM4TruthThinningTool) #======================================= # CREATE PRIVATE SEQUENCE @@ -128,19 +133,35 @@ jetm4Seq = CfgMgr.AthSequencer("JETM4Sequence") DerivationFrameworkJob += jetm4Seq #======================================= -# CREATE THE DERIVATION KERNEL ALGORITHM +# CREATE THE DERIVATION KERNEL ALGORITHM #======================================= from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel jetm4Seq += CfgMgr.DerivationFramework__DerivationKernel("JETM4Kernel" , SkimmingTools = [JETM4SkimmingTool], - ThinningTools = thinningTools) + ThinningTools = thinningTools, + AugmentationTools = [TrigMatchAug]) #==================================================================== # Special jets #==================================================================== OutputJets["JETM4"] = [] +#==================================================================== +# BUILD UFO INPUTS +#==================================================================== + +from JetRecTools.ConstModHelpers import getConstModSeq +pflowCSSKSeq = getConstModSeq(["CS","SK"], "EMPFlow") + +# add the pflow cssk sequence to the main jetalg if not already there : +if pflowCSSKSeq.getFullName() not in [t.getFullName() for t in DerivationFrameworkJob.jetalg.Tools]: + DerivationFrameworkJob.jetalg.Tools += [pflowCSSKSeq] + +from TrackCaloClusterRecTools.TrackCaloClusterConfig import runUFOReconstruction +emufoAlg = runUFOReconstruction(jetm4Seq,ToolSvc, PFOPrefix="CHS") +runUFOReconstruction(jetm4Seq, ToolSvc, PFOPrefix="CSSK") + #======================================= # RESTORE AOD-REDUCED JET COLLECTIONS #======================================= @@ -148,12 +169,30 @@ reducedJetList = ["AntiKt2PV0TrackJets", "AntiKt4PV0TrackJets", "AntiKt10PV0TrackJets", "AntiKt4TruthJets", - "AntiKt10TruthJets"] + "AntiKt10TruthJets", + "AntiKt10LCTopoJets", + "AntiKt10TruthJets", + "AntiKt10UFOCSSKJets", + "AntiKt10UFOCHSJets"] replaceAODReducedJets(reducedJetList,jetm4Seq,"JETM4") # AntiKt10*PtFrac5Rclus20 addDefaultTrimmedJets(jetm4Seq,"JETM4") +# UFO Trimmed jets +addTrimmedJets("AntiKt", 1.0, "UFOCSSK", rclus=0.2, ptfrac=0.05, algseq=jetm4Seq, outputGroup="JETM4", writeUngroomed=False, mods="tcc_groomed") +addTrimmedJets("AntiKt", 1.0, "UFOCHS", rclus=0.2, ptfrac=0.05, algseq=jetm4Seq, outputGroup="JETM4", writeUngroomed=False, mods="tcc_groomed") +# CSSK UFO SoftDrop jets +addSoftDropJets("AntiKt", 1.0, "UFOCSSK", beta=1.0, zcut=0.1, algseq=jetm4Seq, outputGroup="JETM4", writeUngroomed=False, mods="tcc_groomed") +addRecursiveSoftDropJets('AntiKt', 1.0, 'UFOCSSK', beta=1.0, zcut=0.05, N=-1, mods="tcc_groomed", algseq=jetm4Seq, outputGroup="JETM4", writeUngroomed=False) +addBottomUpSoftDropJets('AntiKt', 1.0, 'UFOCSSK', beta=1.0, zcut=0.05, mods="tcc_groomed", algseq=jetm4Seq, outputGroup="JETM4", writeUngroomed=False) + +#==================================================================== +# ADD PFLOW AUG INFORMATION +#==================================================================== +from DerivationFrameworkJetEtMiss.PFlowCommon import applyPFOAugmentation +applyPFOAugmentation(DerivationFrameworkJob) + #======================================= # SCHEDULE CUSTOM MET RECONSTRUCTION #======================================= @@ -163,6 +202,44 @@ if DerivationFrameworkIsMonteCarlo: addMETTruthMap('AntiKt4LCTopo',"JETMX") addMETTruthMap('AntiKt4EMPFlow',"JETMX") scheduleMETAssocAlg(jetm4Seq,"JETMX") + addJetPtAssociation(jetalg="AntiKt4EMTopo", truthjetalg="AntiKt4TruthJets", sequence=jetm4Seq, algname="JetPtAssociationAlg") + addJetPtAssociation(jetalg="AntiKt4LCTopo", truthjetalg="AntiKt4TruthJets", sequence=jetm4Seq, algname="JetPtAssociationAlg") + addJetPtAssociation(jetalg="AntiKt4EMPFlow", truthjetalg="AntiKt4TruthJets", sequence=jetm4Seq, algname="JetPtAssociationAlg") + + +#=================================================== +#add variable-R track jets for b-tagging +#=================================================== + +largeRJetCollections = [ + "AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets", + "AntiKt10UFOCSSKTrimmedPtFrac5SmallR20Jets", + "AntiKt10UFOCHSTrimmedPtFrac5SmallR20Jets", + "AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets", + "AntiKt10UFOCSSKBottomUpSoftDropBeta100Zcut5Jets", + "AntiKt10UFOCSSKRecursiveSoftDropBeta100Zcut5NinfJets", + ] + +from DerivationFrameworkFlavourTag.HbbCommon import addVRJets +addVRJets(jetm4Seq,largeRColls=largeRJetCollections) +addVRJets(jetm4Seq,largeRColls=largeRJetCollections, training='201903') + +from BTagging.BTaggingFlags import BTaggingFlags +BTaggingFlags.CalibrationChannelAliases += ["AntiKtVR30Rmax4Rmin02Track->AntiKtVR30Rmax4Rmin02Track,AntiKt4EMTopo"] + +#======================================= +# Re-tag PFlow jets so they have b-tagging info +#======================================= + +from DerivationFrameworkFlavourTag.FlavourTagCommon import FlavorTagInit +FlavorTagInit(JetCollections = ['AntiKt4EMPFlowJets'], Sequencer = jetm4Seq) + +#=============================== +# add xbb taggers +#=============================== +from DerivationFrameworkFlavourTag.HbbCommon import addRecommendedXbbTaggers +addRecommendedXbbTaggers(jetm4Seq, ToolSvc) + #==================================================================== # Add the containers to the output stream - slimming done here @@ -174,16 +251,43 @@ JETM4SlimmingHelper.SmartCollections = ["Electrons", "Photons", "Muons", "TauJet "MET_Reference_AntiKt4EMTopo", "MET_Reference_AntiKt4LCTopo", "MET_Reference_AntiKt4EMPFlow", - "AntiKt4EMTopoJets","AntiKt4LCTopoJets","AntiKt4EMPFlowJets", + "AntiKt10TruthJets", + "AntiKt10LCTopoJets", + "AntiKt10UFOCSSKJets", + "AntiKt10UFOCHSJets", + "AntiKt10TruthTrimmedPtFrac5SmallR20Jets", "AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets", - "BTagging_AntiKt4EMTopo"] + "AntiKt10UFOCHSTrimmedPtFrac5SmallR20Jets", + "AntiKt10UFOCSSKTrimmedPtFrac5SmallR20Jets", + "AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets", + "AntiKt10UFOCSSKBottomUpSoftDropBeta100Zcut5Jets", + "AntiKt10UFOCSSKRecursiveSoftDropBeta100Zcut5NinfJets", + "AntiKtVR30Rmax4Rmin02TrackJets_BTagging201810", + "AntiKtVR30Rmax4Rmin02TrackJets_BTagging201903", + "AntiKt4EMPFlowJets_BTagging201810", + "AntiKt4EMPFlowJets_BTagging201903", + "AntiKt4EMTopoJets_BTagging201810", + "BTagging_AntiKt4EMPFlow_201810", + "BTagging_AntiKt4EMPFlow_201903", + "BTagging_AntiKt4EMTopo_201810", + "BTagging_AntiKtVR30Rmax4Rmin02Track_201810", + "BTagging_AntiKtVR30Rmax4Rmin02Track_201903" + ] + JETM4SlimmingHelper.AllVariables = [# "CaloCalTopoClusters", "MuonTruthParticles", "egammaTruthParticles", "TruthParticles", "TruthEvents", "TruthVertices", "MuonSegments", - "Kt4EMTopoOriginEventShape","Kt4LCTopoOriginEventShape","Kt4EMPFlowEventShape", - ] -#JETM4SlimmingHelper.ExtraVariables = [] + "Kt4EMTopoOriginEventShape","Kt4LCTopoOriginEventShape","Kt4EMPFlowEventShape"] + +JETM4SlimmingHelper.ExtraVariables = ["CaloCalTopoClusters.calE.calEta.calPhi.calM.rawE.rawEta.rawPhi.rawM","Photons."+NewTrigVars["Photons"],"JetETMissNeutralParticleFlowObjects.m.mEM.eflowRec_TIMING.eflowRec_AVG_LAR_Q.eflowRec_CENTER_LAMBDA.pt.ptEM.phi.eta", +"JetETMissChargedParticleFlowObjects.pt.eta.phi.m.eflowRec_tracksExpectedEnergyDeposit.charge.eflowRec_isInDenseEnvironment.pfo_TrackLinks.DFCommonPFlow_z0.DFCommonPFlow_vz.DFCommonPFlow_d0.DFCommonPFlow_theta.DFCommonPFlow_envWeight", +"TauJets.truthJetLink.truthParticleLink.IsTruthMatched"] + +# XbbScore variables +from DerivationFrameworkFlavourTag.HbbCommon import xbbTaggerExtraVariables +JETM4SlimmingHelper.ExtraVariables += xbbTaggerExtraVariables + for truthc in [ "TruthMuons", "TruthElectrons", @@ -198,11 +302,15 @@ for truthc in [ JETM4SlimmingHelper.IncludeEGammaTriggerContent = True # Add the jet containers to the stream -addJetOutputs(JETM4SlimmingHelper,["SmallR", - #"AntiKt4TruthWZJets", - "AntiKt10LCTopoJets", - "AntiKt10TruthJets", - "JETM4"]) +addJetOutputs( + slimhelper = JETM4SlimmingHelper, + contentlist = [ + "SmallR", + "JETM4" + ], + smartlist = JETM4SlimmingHelper.SmartCollections, + ) + # Add the MET containers to the stream addMETOutputs(JETM4SlimmingHelper,["Diagnostic","Assocs","TruthAssocs","Track",]) diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM5.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM5.py index b072db9d135c6ed3e142c72d8afdbef424ff29b7..742701a41f39de0a5f780241bad50fac5776bb93 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM5.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM5.py @@ -5,13 +5,8 @@ from DerivationFrameworkCore.DerivationFrameworkMaster import * from DerivationFrameworkJetEtMiss.JetCommon import * -#from DerivationFrameworkJetEtMiss.ExtendedJetCommon import * -# +from DerivationFrameworkJetEtMiss.ExtendedJetCommon import * from DerivationFrameworkJetEtMiss.METCommon import * -# -if DerivationFrameworkIsMonteCarlo: - from DerivationFrameworkMCTruth.MCTruthCommon import * - from DerivationFrameworkTau.TauTruthCommon import * #==================================================================== # SET UP STREAM @@ -23,6 +18,16 @@ JETM5Stream.AcceptAlgs(["JETM5Kernel"]) augStream = MSMgr.GetStream( streamName ) evtStream = augStream.GetEventStream() +if DerivationFrameworkIsMonteCarlo: + from DerivationFrameworkMCTruth.MCTruthCommon import addStandardTruthContents + addStandardTruthContents() + +#==================================================================== +# ADD PFLOW AUG INFORMATION +#==================================================================== +from DerivationFrameworkJetEtMiss.PFlowCommon import applyPFOAugmentation +applyPFOAugmentation(DerivationFrameworkJob) + #==================================================================== # SKIMMING TOOL #==================================================================== @@ -96,14 +101,38 @@ if doTruthThinning and DerivationFrameworkIsMonteCarlo: ToolSvc += JETM5TruthThinningTool thinningTools.append(JETM5TruthThinningTool) +#======================================= +# CREATE PRIVATE SEQUENCE +#======================================= + +jetm5Seq = CfgMgr.AthSequencer("JETM5Sequence") +DerivationFrameworkJob += jetm5Seq + #======================================= # CREATE THE DERIVATION KERNEL ALGORITHM #======================================= from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel -DerivationFrameworkJob += CfgMgr.DerivationFramework__DerivationKernel( name = "JETM5Kernel", - SkimmingTools = [JETM5SkimmingTool], - ThinningTools = thinningTools) +jetm5Seq += CfgMgr.DerivationFramework__DerivationKernel( name = "JETM5Kernel", + SkimmingTools = [JETM5SkimmingTool], + ThinningTools = thinningTools) + +#==================================================================== +# BTAGGING INFO FOR PFLOW JET +#==================================================================== +from DerivationFrameworkFlavourTag.FlavourTagCommon import FlavorTagInit +FlavorTagInit(JetCollections = ['AntiKt4EMPFlowJets'],Sequencer = jetm5Seq) + +# QGTaggerTool ### +addQGTaggerTool(jetalg="AntiKt4EMTopo", sequence=jetm5Seq, algname="QGTaggerToolAlg") +addQGTaggerTool(jetalg="AntiKt4EMPFlow", sequence=jetm5Seq, algname="QGTaggerToolAlg") + +# MVfJvt # +applyMVfJvtAugmentation(jetalg='AntiKt4EMTopo',sequence=jetm5Seq, algname='JetForwardJvtToolBDTAlg') + +# PFlow fJvt # +getPFlowfJVT(jetalg='AntiKt4EMPFlow',sequence=jetm5Seq, algname='JetForwardPFlowJvtToolAlg',includePV=False) +getPFlowfJVT(jetalg='AntiKt4EMPFlow',sequence=jetm5Seq, algname='JetForwardPFlowJvtToolAlgNew',outLabel="fJvtWithPV",includePV=True) #==================================================================== # Add the containers to the output stream - slimming done here @@ -116,14 +145,26 @@ JETM5SlimmingHelper.SmartCollections = ["Electrons", "Photons", "Muons", "TauJet "MET_Reference_AntiKt4LCTopo", "MET_Reference_AntiKt4EMPFlow", "AntiKt4EMTopoJets","AntiKt4LCTopoJets","AntiKt4EMPFlowJets", - "BTagging_AntiKt4EMTopo", ] + "AntiKt4EMPFlowJets_BTagging201810", + "AntiKt4EMPFlowJets_BTagging201903", + "AntiKt4EMTopoJets_BTagging201810", + "BTagging_AntiKt4EMPFlow_201810", + "BTagging_AntiKt4EMPFlow_201903", + "BTagging_AntiKt4EMTopo_201810"] JETM5SlimmingHelper.AllVariables = ["CaloCalTopoClusters", "MuonTruthParticles", "egammaTruthParticles", "TruthParticles", "TruthEvents", "TruthVertices", "MuonSegments", "Kt4EMTopoOriginEventShape","Kt4LCTopoOriginEventShape","Kt4EMPFlowEventShape", ] -#JETM5SlimmingHelper.ExtraVariables = [] +JETM5SlimmingHelper.ExtraVariables = ["JetETMissNeutralParticleFlowObjects.m.mEM.pfo_TrackLinks.eflowRec_ISOLATION.pfo_ClusterLinks.eflowRec_TIMING.eflowRec_AVG_LAR_Q.eflowRec_EM_PROBABILITY.eflowRec_CENTER_LAMBDA.centerMag.pt.ptEM.phi.eta", +"JetETMissChargedParticleFlowObjects.pt.eta.phi.m.eflowRec_tracksExpectedEnergyDeposit.pfo_vertex.charge.eflowRec_isInDenseEnvironment.pfo_TrackLinks.DFCommonPFlow_z0.DFCommonPFlow_vz.DFCommonPFlow_d0.DFCommonPFlow_theta.DFCommonPFlow_envWeight",] + + +# Add QG tagger variables +JETM5SlimmingHelper.ExtraVariables += ["AntiKt4EMTopoJets.DFCommonJets_QGTagger_NTracks.DFCommonJets_QGTagger_TracksWidth.DFCommonJets_QGTagger_TracksC1", + "AntiKt4EMPFlowJets.DFCommonJets_QGTagger_NTracks.DFCommonJets_QGTagger_TracksWidth.DFCommonJets_QGTagger_TracksC1.DFCommonJets_fJvtWithPV"] + for truthc in [ "TruthMuons", "TruthElectrons", diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM6.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM6.py index 7d923532d173bf8aa909831087757a1bd98df6a5..64dd2e7ef538a86a000bd356b9e94b065d652f87 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM6.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM6.py @@ -1,6 +1,6 @@ #==================================================================== -# JETM6.py -# reductionConf flag JETM6 in Reco_tf.py +# JETM6.py +# reductionConf flag JETM6 in Reco_tf.py #==================================================================== from DerivationFrameworkCore.DerivationFrameworkMaster import * @@ -10,11 +10,11 @@ from DerivationFrameworkJetEtMiss.ExtendedJetCommon import * from DerivationFrameworkEGamma.EGammaCommon import * from DerivationFrameworkMuons.MuonsCommon import * +from DerivationFrameworkFlavourTag.HbbCommon import * + from DerivationFrameworkJetEtMiss.METCommon import * -# -if DerivationFrameworkIsMonteCarlo: - from DerivationFrameworkMCTruth.MCTruthCommon import * - from DerivationFrameworkTau.TauTruthCommon import * + +from DerivationFrameworkInDet.InDetCommon import * #==================================================================== # SET UP STREAM @@ -27,32 +27,36 @@ augStream = MSMgr.GetStream( streamName ) evtStream = augStream.GetEventStream() #==================================================================== -# SKIMMING TOOL +# SKIMMING TOOL #==================================================================== -from DerivationFrameworkJetEtMiss.TriggerLists import * -electronTriggers = singleElTriggers -muonTriggers = singleMuTriggers -photonTriggers = singlePhotonTriggers +from DerivationFrameworkJetEtMiss import TriggerLists +electronTriggers = TriggerLists.single_el_Trig() +muonTriggers = TriggerLists.single_mu_Trig() +photonTriggers = TriggerLists.single_photon_Trig() +jetTriggers = TriggerLists.jetTrig() # For first data -jetSelection = '(count( AntiKt10LCTopoJets.pt > 180.*GeV && abs(AntiKt10LCTopoJets.eta) < 2.5 ) >=1)' -#jetSelection = '(count( CamKt12LCTopoJets.pt > 150.*GeV ) >=1)' +jetSelection = '(count( AntiKt10LCTopoJets.pt > 400.*GeV && abs(AntiKt10LCTopoJets.eta) < 2.5 ) >=1 || count( AntiKt10UFOCSSKJets.pt > 400.*GeV && abs(AntiKt10UFOCSSKJets.eta) < 2.5 ) >= 1)' +if DerivationFrameworkIsMonteCarlo: + jetSelection = '(count( AntiKt10LCTopoJets.pt > 180.*GeV && abs(AntiKt10LCTopoJets.eta) < 2.5 ) >=1 || count( AntiKt10UFOCSSKJets.pt > 180.*GeV && abs(AntiKt10UFOCSSKJets.eta) < 2.5 ) >= 1)' orstr = ' || ' andstr = ' && ' eltrigsel = '(EventInfo.eventTypeBitmask==1) || '+orstr.join(electronTriggers) -elofflinesel = andstr.join(['count((Electrons.pt > 20*GeV) && (Electrons.DFCommonElectronsLHMedium)) == 1', - 'count(AntiKt10LCTopoJets.pt > 150*GeV && abs(AntiKt10LCTopoJets.eta) < 2.5) >=1']) +elofflinesel = andstr.join(['count((Electrons.pt > 20*GeV) && (Electrons.DFCommonElectronsLHLoose)) >= 1', + '(count(AntiKt10LCTopoJets.pt > 150*GeV && abs(AntiKt10LCTopoJets.eta) < 2.5) >=1 || count(AntiKt10UFOCSSKJets.pt > 150*GeV && abs(AntiKt10UFOCSSKJets.eta) < 2.5) >=1)']) electronSelection = '( (' + eltrigsel + ') && (' + elofflinesel + ') )' mutrigsel = '(EventInfo.eventTypeBitmask==1) || '+orstr.join(muonTriggers) -muofflinesel = andstr.join(['count((Muons.pt > 20*GeV) && (Muons.DFCommonMuonsPreselection)) == 1', - 'count(AntiKt10LCTopoJets.pt > 150*GeV && abs(AntiKt10LCTopoJets.eta) < 2.5) >=1']) +muofflinesel = andstr.join(['count((Muons.pt > 20*GeV) && (Muons.DFCommonMuonsPreselection)) >= 1', + '(count(AntiKt10LCTopoJets.pt > 150*GeV && abs(AntiKt10LCTopoJets.eta) < 2.5) >=1 || count(AntiKt10UFOCSSKJets.pt > 150*GeV && abs(AntiKt10UFOCSSKJets.eta) < 2.5) >=1 )']) muonSelection = ' ( (' + mutrigsel + ') && (' + muofflinesel + ') ) ' -# MET filter wanted? : MET_Reference_AntiKt4LCTopo > 20*GeV # should use a different container +gammatrigsel = '(EventInfo.eventTypeBitmask==1) || '+orstr.join(photonTriggers) +gammaofflinesel = '(count(Photons.pt > 150*GeV) >= 1 && (count(AntiKt10LCTopoJets.pt > 150*GeV && abs(AntiKt10LCTopoJets.eta) < 2.5) >=1 || count(AntiKt10UFOCSSKJets.pt > 150*GeV && abs(AntiKt10UFOCSSKJets.eta) < 2.5) >=1 ))' +photonSelection = ' ( (' + gammatrigsel + ') && (' + gammaofflinesel + ') ) ' -lepSelection = '( ' + electronSelection + ' || ' + muonSelection + ' )' +lepSelection = '( ' + electronSelection + ' || ' + muonSelection + ' || ' + photonSelection + ' )' expression = jetSelection + ' || '+ lepSelection @@ -70,37 +74,123 @@ JETM6OfflineSkimmingTool = DerivationFramework__xAODStringSkimmingTool( name = " ToolSvc += JETM6OfflineSkimmingTool #==================================================================== -# THINNING TOOLS +# CREATE PRIVATE SEQUENCE #==================================================================== -thinningTools = [] -# thinning_expression = "InDetTrackParticles.pt > 0.5*GeV" +jetm6Seq = CfgMgr.AthSequencer("JETM6Sequence") +DerivationFrameworkJob += jetm6Seq + +#==================================================================== +# Trigger matching decorations +#==================================================================== +photonTriggers_matching = ['HLT_g60_loose', 'HLT_g140_loose', 'HLT_g160_loose'] + +from DerivationFrameworkCore.TriggerMatchingAugmentation import applyTriggerMatching +TrigMatchAug, NewTrigVars = applyTriggerMatching(ToolNamePrefix="JETM6", + ElectronTriggers=electronTriggers, + MuonTriggers=muonTriggers, + PhotonTriggers=photonTriggers_matching) + +#==================================================================== +# TRIGGER THINNING TOOL +#==================================================================== + +from DerivationFrameworkCore.ThinningHelper import ThinningHelper +JETM6ThinningHelper = ThinningHelper( "JETM6ThinningHelper" ) +JETM6ThinningHelper.TriggerChains = '' + +JETM6ThinningHelper.TriggerChains += "|".join(electronTriggers) +JETM6ThinningHelper.TriggerChains += "|".join(muonTriggers) +JETM6ThinningHelper.TriggerChains += "|".join(photonTriggers) +JETM6ThinningHelper.TriggerChains += "|".join(jetTriggers) + +JETM6ThinningHelper.AppendToStream( JETM6Stream ) + +#==================================================================== +# THINNING TOOLS +#==================================================================== +thinningTools = [] -# from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning -# JETM6JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = "JETM6Akt4JetTPThinningTool", -# StreamName = streamName, -# JetKey = "AntiKt4EMTopoJets", -# InDetTrackParticlesKey = "InDetTrackParticles", -# TrackSelectionString = thinning_expression) -# ToolSvc += JETM6JetTPThinningTool -# thinningTools.append(JETM6JetTPThinningTool) +######################################### +# Tracks associated with akt2 jets +######################################### +# It is necessary to apply the akt2-based track thinning before other track +# thinning tools due to the faulty logic of the thinning tools +from ThinningUtils.ThinningUtilsConf import DeltaRThinningTool +# Applying only DeltaR thinning and not EleLink thinning is fine as long as ConeSize +# is sufficiently large compared to the jet size. If it is reduced to something close +# to the size of the jet, there is no guarantee that all ghost-associated tracks will +# be picked up + +JETM6BaselineTrack = "(InDetTrackParticles.JETM6DFLoose) && (InDetTrackParticles.pt > 0.5*GeV) && (abs(DFCommonInDetTrackZ0AtPV)*sin(InDetTrackParticles.theta) < 3.0*mm) && (InDetTrackParticles.d0 < 2.0*mm)" + +from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning +JETM6TrackParticleThinningTool = DerivationFramework__TrackParticleThinning(name = "JETM6TrackParticleThinningTool", + StreamName = streamName, + SelectionString = JETM6BaselineTrack, + InDetTrackParticlesKey = "InDetTrackParticles", + ApplyAnd = True) + +ToolSvc += JETM6TrackParticleThinningTool +thinningTools.append(JETM6TrackParticleThinningTool) + +JETM6ak2DeltaRTrackThinningTool = DeltaRThinningTool(name = "JETM6ak2DeltaRTrackThinningTool", + StreamName = streamName, + SGKey = "InDetTrackParticles", + ConeSize = 0.33, + ApplyAnd = True) + +ToolSvc += JETM6ak2DeltaRTrackThinningTool + +from ThinningUtils.ThinningUtilsConf import ThinAssociatedObjectsTool +JETM6ak2TrackThinningTool = ThinAssociatedObjectsTool(name = "JETM6ak2TrackThinningTool", + StreamName = streamName, + SGKey = "AntiKt2LCTopoJets", + ChildThinningTools = [JETM6ak2DeltaRTrackThinningTool]) + +ToolSvc += JETM6ak2TrackThinningTool +thinningTools.append(JETM6ak2TrackThinningTool) + +######################################### +# Tracks associated with other jets +######################################### from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning JETM6Akt4JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = "JETM6Akt4JetTPThinningTool", - StreamName = streamName, - JetKey = "AntiKt4EMTopoJets", - InDetTrackParticlesKey = "InDetTrackParticles") + StreamName = streamName, + JetKey = "AntiKt4EMTopoJets", + InDetTrackParticlesKey = "InDetTrackParticles", + ApplyAnd = False) ToolSvc += JETM6Akt4JetTPThinningTool thinningTools.append(JETM6Akt4JetTPThinningTool) +from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning +JETM6Akt4PFlowJetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = "JETM6Akt4PFlowJetTPThinningTool", + StreamName = streamName, + JetKey = "AntiKt4EMPFlowJets", + InDetTrackParticlesKey = "InDetTrackParticles", + ApplyAnd = False) +ToolSvc += JETM6Akt4PFlowJetTPThinningTool +thinningTools.append(JETM6Akt4PFlowJetTPThinningTool) + from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning JETM6Akt10JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = "JETM6Akt10JetTPThinningTool", - StreamName = streamName, - JetKey = "AntiKt10LCTopoJets", - InDetTrackParticlesKey = "InDetTrackParticles") + StreamName = streamName, + JetKey = "AntiKt10LCTopoJets", + InDetTrackParticlesKey = "InDetTrackParticles", + ApplyAnd = False) ToolSvc += JETM6Akt10JetTPThinningTool thinningTools.append(JETM6Akt10JetTPThinningTool) +JETM6Akt10JetCSSKUFOThinningTool = DerivationFramework__JetTrackParticleThinning( name = "JETM6Akt10JetCSSKUFOThinningTool", + StreamName = streamName, + JetKey = "AntiKt10UFOCSSKJets", + InDetTrackParticlesKey = "InDetTrackParticles", + ApplyAnd = False) +ToolSvc += JETM6Akt10JetCSSKUFOThinningTool +thinningTools.append(JETM6Akt10JetCSSKUFOThinningTool) + + # TrackParticles associated with Muons from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning JETM6MuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning(name = "JETM6MuonTPThinningTool", @@ -130,83 +220,148 @@ thinningTools.append(JETM6PhotonTPThinningTool) # TrackParticles associated with taus from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TauTrackParticleThinning JETM6TauTPThinningTool = DerivationFramework__TauTrackParticleThinning( name = "JETM6TauTPThinningTool", - StreamName = streamName, + StreamName = streamName, TauKey = "TauJets", InDetTrackParticlesKey = "InDetTrackParticles") ToolSvc += JETM6TauTPThinningTool thinningTools.append(JETM6TauTPThinningTool) -# Truth particle thinning -doTruthThinning = True -preserveAllDescendants = False -from AthenaCommon.GlobalFlags import globalflags -if doTruthThinning and DerivationFrameworkIsMonteCarlo: - truth_cond_WZH = "((abs(TruthParticles.pdgId) >= 23) && (abs(TruthParticles.pdgId) <= 25))" # W, Z and Higgs - truth_cond_Lepton = "((abs(TruthParticles.pdgId) >= 11) && (abs(TruthParticles.pdgId) <= 16) && (TruthParticles.barcode < 200000))" # Leptons - truth_cond_Quark = "((abs(TruthParticles.pdgId) <= 5 && (TruthParticles.pt > 10000.)) || (abs(TruthParticles.pdgId) == 6))" # Quarks - truth_cond_Gluon = "((abs(TruthParticles.pdgId) == 21) && (TruthParticles.pt > 10000.))" # Gluons - truth_cond_Photon = "((abs(TruthParticles.pdgId) == 22) && (TruthParticles.pt > 10000.) && (TruthParticles.barcode < 200000))" # Photon - - truth_expression = '('+truth_cond_WZH+' || '+truth_cond_Lepton +' || '+truth_cond_Quark+' || '+truth_cond_Gluon+' || '+truth_cond_Photon+')' - - from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning - JETM6TruthThinningTool = DerivationFramework__GenericTruthThinning( name = "JETM6TruthThinningTool", - StreamName = streamName, - ParticleSelectionString = truth_expression, - #PreserveDescendants = preserveAllDescendants, - PreserveDescendants = False, - PreserveGeneratorDescendants = not preserveAllDescendants, - #PreserveGeneratorDescendants = False, - PreserveAncestors = True) - - - - ToolSvc += JETM6TruthThinningTool - thinningTools.append(JETM6TruthThinningTool) +#==================================================================== +# AUGMENTATION TOOLS +#==================================================================== +augmentationTools = [] +augmentationTools.append(TrigMatchAug) + +from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__InDetTrackSelectionToolWrapper +JETM6TrackSelectionTool = DerivationFramework__InDetTrackSelectionToolWrapper(name = "JETM6TrackSelectionTool", + ContainerName = "InDetTrackParticles", + DecorationName = "JETM6DFLoose" ) + +JETM6TrackSelectionTool.TrackSelectionTool.CutLevel = "Loose" +ToolSvc += JETM6TrackSelectionTool +augmentationTools.append(JETM6TrackSelectionTool) + #======================================= -# CREATE PRIVATE SEQUENCE +# CREATE THE DERIVATION KERNEL ALGORITHM #======================================= -jetm6Seq = CfgMgr.AthSequencer("JETM6Sequence") -DerivationFrameworkJob += jetm6Seq +from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel +jetm6Seq += CfgMgr.DerivationFramework__DerivationKernel(name = "JETM6TrigSkimKernel", + AugmentationTools = [] , + SkimmingTools = [JETM6TrigSkimmingTool], + ThinningTools = []) + #======================================= -# CREATE THE DERIVATION KERNEL ALGORITHM +# BUILD UFO INPUTS #======================================= -from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel -jetm6Seq += CfgMgr.DerivationFramework__DerivationKernel( name = "JETM6TrigSkimKernel", - AugmentationTools = [] , - SkimmingTools = [JETM6TrigSkimmingTool], - ThinningTools = []) +## Add PFlow constituents +from JetRecTools.ConstModHelpers import getConstModSeq, xAOD +pflowCSSKSeq = getConstModSeq(["CS","SK"], "EMPFlow") + +# add the pflow cssk sequence to the main jetalg if not already there : +if pflowCSSKSeq.getFullName() not in [t.getFullName() for t in DerivationFrameworkJob.jetalg.Tools]: + DerivationFrameworkJob.jetalg.Tools += [pflowCSSKSeq] + +# Add UFO constituents +from TrackCaloClusterRecTools.TrackCaloClusterConfig import runUFOReconstruction +emufoAlg = runUFOReconstruction(jetm6Seq, ToolSvc, PFOPrefix="CHS") +emcsskufoAlg = runUFOReconstruction(jetm6Seq, ToolSvc, PFOPrefix="CSSK") #======================================= # RESTORE AOD-REDUCED JET COLLECTIONS #======================================= + reducedJetList = ["AntiKt2PV0TrackJets", "AntiKt4PV0TrackJets", + "AntiKt2TruthJets", + "AntiKt2LCTopoJets", "AntiKt4TruthJets", "AntiKt10TruthJets", - "AntiKt10LCTopoJets"] + "AntiKt10LCTopoJets", + "AntiKt10UFOCSSKJets", + "AntiKt10UFOCHSJets" + ] + replaceAODReducedJets(reducedJetList,jetm6Seq,"JETM6") from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel jetm6Seq += CfgMgr.DerivationFramework__DerivationKernel( name = "JETM6MainKernel", - AugmentationTools = [] , + AugmentationTools = augmentationTools, SkimmingTools = [JETM6OfflineSkimmingTool], ThinningTools = thinningTools) #==================================================================== -# Special jets +# GROOMED LARGE-R JETS #==================================================================== OutputJets["JETM6"] = [] -# AntiKt10*PtFrac5Rclus20 addDefaultTrimmedJets(jetm6Seq,"JETM6") -addTrimmedJets("AntiKt", 1.0, "PV0Track", rclus=0.2, ptfrac=0.05, algseq=jetm6Seq, outputGroup="JETM6") +if DerivationFrameworkIsMonteCarlo: + addSoftDropJets('AntiKt', 1.0, 'Truth', beta=1.0, zcut=0.1, mods="truth_groomed", algseq=jetm6Seq, outputGroup="JETM6", writeUngroomed=False) + addRecursiveSoftDropJets('AntiKt', 1.0, 'Truth', beta=1.0, zcut=0.05, N=-1, mods="truth_groomed", algseq=jetm6Seq, outputGroup="JETM6", writeUngroomed=False) + addBottomUpSoftDropJets('AntiKt', 1.0, 'Truth', beta=1.0, zcut=0.05, mods="truth_groomed", algseq=jetm6Seq, outputGroup="JETM6", writeUngroomed=False) + +addTrimmedJets("AntiKt", 1.0, "UFOCHS", rclus=0.2, ptfrac=0.05, algseq=jetm6Seq, outputGroup="JETM6", writeUngroomed=False, mods="tcc_groomed") +addTrimmedJets("AntiKt", 1.0, "UFOCSSK", rclus=0.2, ptfrac=0.05, algseq=jetm6Seq, outputGroup="JETM6", writeUngroomed=False, mods="tcc_groomed") +addSoftDropJets("AntiKt", 1.0, "UFOCSSK", beta=1.0, zcut=0.1, algseq=jetm6Seq, outputGroup="JETM6", writeUngroomed=False, mods="tcc_groomed") +addRecursiveSoftDropJets('AntiKt', 1.0, 'UFOCSSK', beta=1.0, zcut=0.05, N=-1, mods="tcc_groomed", algseq=jetm6Seq, outputGroup="JETM6", writeUngroomed=False) +addBottomUpSoftDropJets('AntiKt', 1.0, 'UFOCSSK', beta=1.0, zcut=0.05, mods="tcc_groomed", algseq=jetm6Seq, outputGroup="JETM6", writeUngroomed=False) + +#==================================================================== +# BTAGGING INFO FOR PFLOW JETS +#==================================================================== + +from DerivationFrameworkFlavourTag.FlavourTagCommon import FlavorTagInit +FlavorTagInit(JetCollections = ['AntiKt4EMPFlowJets'],Sequencer = jetm6Seq) + +#==================================================================== +# VR track-jets (b-tagging) +#==================================================================== + +largeRJetAlgs = [ + "AntiKt10LCTopoTrimmedPtFrac5SmallR20", + "AntiKt10UFOCHSTrimmedPtFrac5SmallR20", + "AntiKt10UFOCSSKTrimmedPtFrac5SmallR20", + "AntiKt10UFOCSSKSoftDropBeta100Zcut10", + "AntiKt10UFOCSSKBottomUpSoftDropBeta100Zcut5", + "AntiKt10UFOCSSKRecursiveSoftDropBeta100Zcut5Ninf", + ] + +largeRJetCollections = [] +for alg in largeRJetAlgs: + largeRJetCollections.append(alg+"Jets") + +if DerivationFrameworkIsMonteCarlo: + for alg in largeRJetAlgs: + addJetTruthLabel(jetalg=alg,sequence=jetm6Seq,algname="JetTruthLabelingAlg",labelname="R10TruthLabel_R21Consolidated") + +addVRJets(jetm6Seq, largeRColls = largeRJetCollections) +addVRJets(jetm6Seq, largeRColls = largeRJetCollections, training='201903') + +#==================================================================== +# add xbb taggers +#==================================================================== + +from DerivationFrameworkFlavourTag.HbbCommon import addRecommendedXbbTaggers +addRecommendedXbbTaggers(jetm6Seq, ToolSvc) + +#==================================================================== +# TRUTH3 +#==================================================================== + +if DerivationFrameworkIsMonteCarlo: + from DerivationFrameworkMCTruth.MCTruthCommon import addStandardTruthContents,addTopQuarkAndDownstreamParticles,addHFAndDownstreamParticles,addTruthCollectionNavigationDecorations + addStandardTruthContents() + addTopQuarkAndDownstreamParticles() + addHFAndDownstreamParticles(addB=True, addC=False, generations=0) + addTruthCollectionNavigationDecorations(TruthCollections=["TruthTopQuarkWithDecayParticles","TruthBosonsWithDecayParticles"],prefix='Top') + import DerivationFrameworkCore.WeightMetadata + import DerivationFrameworkCore.LHE3WeightMetadata #==================================================================== # Add the containers to the output stream - slimming done here @@ -219,68 +374,83 @@ JETM6SlimmingHelper.SmartCollections = ["Electrons", "TauJets", "InDetTrackParticles", "PrimaryVertices", - # "MET_Reference_AntiKt4EMTopo", - "MET_Reference_AntiKt4LCTopo", "MET_Reference_AntiKt4EMPFlow", - "AntiKt4EMTopoJets","AntiKt4LCTopoJets","AntiKt4EMPFlowJets", - "AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets" + "AntiKt2TruthJets", + "AntiKt2LCTopoJets", + "AntiKt4EMTopoJets","AntiKt4EMPFlowJets","AntiKt4TruthJets", + "AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets", + "AntiKt10UFOCHSTrimmedPtFrac5SmallR20Jets", + "AntiKt10UFOCSSKTrimmedPtFrac5SmallR20Jets", + "AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets", + "AntiKt10UFOCSSKBottomUpSoftDropBeta100Zcut5Jets", + "AntiKt10UFOCSSKRecursiveSoftDropBeta100Zcut5NinfJets", + "AntiKtVR30Rmax4Rmin02TrackJets_BTagging201810", + "AntiKtVR30Rmax4Rmin02TrackJets_BTagging201903", + "AntiKt4EMPFlowJets_BTagging201810", + "AntiKt4EMPFlowJets_BTagging201903", + "AntiKt4EMTopoJets_BTagging201810", + "BTagging_AntiKtVR30Rmax4Rmin02Track_201810", + "BTagging_AntiKtVR30Rmax4Rmin02Track_201903", + "BTagging_AntiKt4EMPFlow_201810", + "BTagging_AntiKt4EMPFlow_201903", + "BTagging_AntiKt4EMTopo_201810", ] JETM6SlimmingHelper.AllVariables = [ - "TruthParticles", "TruthEvents", "TruthVertices", - "MuonTruthParticles", "egammaTruthParticles", - #"JetETMissChargedParticleFlowObjects", "JetETMissNeutralParticleFlowObjects" - "Kt4EMTopoOriginEventShape","Kt4LCTopoOriginEventShape","Kt4EMPFlowEventShape", - ] + "TruthEvents", + "Kt4EMTopoOriginEventShape","Kt4EMPFlowEventShape", + ] -JETM6SlimmingHelper.ExtraVariables = [ - 'CaloCalTopoClusters.calE.calEta.calM.calPhi.CENTER_MAG', - 'BTagging_AntiKt2Track.MSV_N2Tpair.MSV_badTracksIP.MSV_energyTrkInJet.MSV_normdist.MSV_nvsec.MSV_vertices.MV1_discriminant.MV2c00_discriminant.MV2c100_discriminant.MV2c10_discriminant.MV2c20_discriminant.MV2m_pb.MV2m_pc.MV2m_pu.MultiSVbb1_discriminant.MultiSVbb2_discriminant.SV0_N2Tpair.SV1_pb.SV1_pc.SV1_pu.IP3D_pb.IP3D_pc.IP3D_pu', - 'BTagging_AntiKt4EMTopo.MSV_N2Tpair.MSV_badTracksIP.MSV_energyTrkInJet.MSV_normdist.MSV_nvsec.MSV_vertices.MV1_discriminant.MV2c00_discriminant.MV2c100_discriminant.MV2c10_discriminant.MV2c20_discriminant.MV2m_pb.MV2m_pc.MV2m_pu.MultiSVbb1_discriminant.MultiSVbb2_discriminant.SV0_N2Tpair.SV1_pb.SV1_pc.SV1_pu.IP3D_pb.IP3D_pc.IP3D_pu' +JETM6SlimmingHelper.ExtraVariables = ['CaloCalTopoClusters.calE.calEta.calM.calPhi.CENTER_MAG'] +JETM6SlimmingHelper.ExtraVariables += ['Electrons.'+NewTrigVars["Electrons"],'Muons.'+NewTrigVars["Muons"],'Photons.'+NewTrigVars["Photons"]] +JETM6SlimmingHelper.ExtraVariables += [ + 'HLT_xAOD__JetContainer_a4tcemsubjesFS.ActiveArea.ActiveArea4vec_eta.ActiveArea4vec_m.ActiveArea4vec_phi.ActiveArea4vec_pt.AverageLArQF.BchCorrCell.CentroidR.DetectorEta.EMFrac.EnergyPerSampling.FracSamplingMax.FracSamplingMaxIndex.HECFrac.HECQuality.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_m.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_pt.JetEtaJESScaleMomentum_eta.JetEtaJESScaleMomentum_m.JetEtaJESScaleMomentum_phi.JetEtaJESScaleMomentum_pt.JetPileupScaleMomentum_eta.JetPileupScaleMomentum_m.JetPileupScaleMomentum_phi.JetPileupScaleMomentum_pt.LArQuality.N90Constituents.NegativeE.Timing.eta.kinematics.m.phi.pt', + 'HLT_xAOD__JetContainer_a4tcemsubjesISFS.ActiveArea.ActiveArea4vec_eta.ActiveArea4vec_m.ActiveArea4vec_phi.ActiveArea4vec_pt.AverageLArQF.BchCorrCell.CentroidR.DetectorEta.EMFrac.EnergyPerSampling.FracSamplingMax.FracSamplingMaxIndex.HECFrac.HECQuality.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_m.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_pt.JetEtaJESScaleMomentum_eta.JetEtaJESScaleMomentum_m.JetEtaJESScaleMomentum_phi.JetEtaJESScaleMomentum_pt.JetPileupScaleMomentum_eta.JetPileupScaleMomentum_m.JetPileupScaleMomentum_phi.JetPileupScaleMomentum_pt.LArQuality.N90Constituents.NegativeE.Timing.eta.kinematics.m.phi.pt', + 'HLT_xAOD__JetContainer_a10tclcwsubjesFS.ActiveArea.ActiveArea4vec_eta.ActiveArea4vec_m.ActiveArea4vec_phi.ActiveArea4vec_pt.AverageLArQF.BchCorrCell.CentroidR.DetectorEta.EMFrac.EnergyPerSampling.FracSamplingMax.FracSamplingMaxIndex.HECFrac.HECQuality.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_m.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_pt.JetEMScaleMomentum_eta.JetEMScaleMomentum_m.JetEMScaleMomentum_phi.JetEMScaleMomentum_pt.JetEtaJESScaleMomentum_eta.JetEtaJESScaleMomentum_m.JetEtaJESScaleMomentum_phi.JetEtaJESScaleMomentum_pt.JetPileupScaleMomentum_eta.JetPileupScaleMomentum_m.JetPileupScaleMomentum_phi.JetPileupScaleMomentum_pt.LArQuality.N90Constituents.NegativeE.Timing.eta.kinematics.m.phi.pt', ] -#JETM6SlimmingHelper.ExtraVariables = [] +for truthc in [ + "TruthTopQuark", + "TruthBosons", + "TruthHF" + ]: + JETM6SlimmingHelper.StaticContent.append("xAOD::TruthParticleContainer#"+truthc+"WithDecayParticles") + JETM6SlimmingHelper.StaticContent.append("xAOD::TruthParticleAuxContainer#"+truthc+"WithDecayParticlesAux.") + JETM6SlimmingHelper.StaticContent.append("xAOD::TruthVertexContainer#"+truthc+"WithDecayVertices") + JETM6SlimmingHelper.StaticContent.append("xAOD::TruthVertexAuxContainer#"+truthc+"WithDecayVerticesAux.") + for truthc in [ "TruthMuons", "TruthElectrons", "TruthPhotons", - "TruthTaus", - "TruthNeutrinos" + "TruthBottom" ]: JETM6SlimmingHelper.StaticContent.append("xAOD::TruthParticleContainer#"+truthc) JETM6SlimmingHelper.StaticContent.append("xAOD::TruthParticleAuxContainer#"+truthc+"Aux.") -## # Trigger content -## from DerivationFrameworkCore.JetTriggerContent import JetTriggerContent +#==================================================================== +# ORIGIN CORRECTED CLUSTERS +#==================================================================== + +addOriginCorrectedClusters(JETM6SlimmingHelper,writeLC=True,writeEM=True) + +#==================================================================== +# TRIGGER CONTENT +#==================================================================== + JETM6SlimmingHelper.IncludeJetTriggerContent = True JETM6SlimmingHelper.IncludeMuonTriggerContent = True JETM6SlimmingHelper.IncludeEGammaTriggerContent = True -# We actually set the precise variable content in ExtraVariables - -# Add the jet containers to the stream -# explicitely add the container we want : -addJetOutputs(JETM6SlimmingHelper,[ - "AntiKt10LCTopoJets", "AntiKt10TruthJets", - "JETM6", # jets defined in this file - ]) -# for other containers, w set the precise variable content in ExtraVariables - -topoJetVars = 'ActiveArea.ActiveArea4vec_eta.ActiveArea4vec_m.ActiveArea4vec_phi.ActiveArea4vec_pt.AlgorithmType.AverageLArQF.BchCorrCell.Charge.ConeExclBHadronsFinal.ConeExclCHadronsFinal.ConeExclTausFinal.ConeTruthLabelID.ConstituentScale.DetectorEta.EMFrac.EnergyPerSampling.FracSamplingMax.FracSamplingMaxIndex.HECFrac.HECQuality.HadronConeExclTruthLabelID.HighestJVFVtx.InputType.IsoDelta2SumPt.IsoDelta3SumPt.JVF.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_m.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_pt.JetOriginConstitScaleMomentum_eta.JetOriginConstitScaleMomentum_m.JetOriginConstitScaleMomentum_phi.JetOriginConstitScaleMomentum_pt.JetPileupScaleMomentum_eta.JetPileupScaleMomentum_m.JetPileupScaleMomentum_phi.JetPileupScaleMomentum_pt.Jvt.JvtJvfcorr.JvtRpt.LArBadHVEnergyFrac.LArBadHVNCell.LArQuality.LeadingClusterCenterLambda.LeadingClusterSecondLambda.LeadingClusterSecondR.Mu12.N90Constituents.NegativeE.NumTrkPt1000.NumTrkPt500.OotFracClusters10.OotFracClusters5.OriginCorrected.OriginVertex.PartonTruthLabelID.PileupCorrected.SizeParameter.SumPtTrkPt1000.SumPtTrkPt500.TrackWidthPt1000.TrackWidthPt500.Width.btaggingLink.eta.pt.phi.m.GhostMuonSegmentCount.CentroidR.Timing' -JETM6SlimmingHelper.ExtraVariables += [ - 'AntiKt4LCTopoJets.'+topoJetVars , - 'AntiKt4EMTopoJets.'+topoJetVars , - 'AntiKt4TruthJets.AlgorithmType.Angularity.Aplanarity.ConeExclBHadronsFinal.ConeExclCHadronsFinal.ConeExclTausFinal.ConeTruthLabelID.ConstituentScale.HadronConeExclTruthLabelID.InputType.IsoDelta2SumPt.IsoDelta3SumPt.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_m.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_pt.Mu12.PartonTruthLabelID.SizeParameter.Width.eta.pt.phi.m', - "AntiKt2PV0TrackJets.AlgorithmType.ConstituentScale.Width.eta.pt.phi.m.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_m.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_pt.OriginVertex.SizeParameter", - 'HLT_xAOD__JetContainer_a4tcemsubjesFS.ActiveArea.ActiveArea4vec_eta.ActiveArea4vec_m.ActiveArea4vec_phi.ActiveArea4vec_pt.AlgorithmType.AverageLArQF.BchCorrCell.CentroidR.ConstituentScale.DetectorEta.EMFrac.EnergyPerSampling.FracSamplingMax.FracSamplingMaxIndex.HECFrac.HECQuality.InputType.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_m.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_pt.JetEMScaleMomentum_eta.JetEMScaleMomentum_m.JetEMScaleMomentum_phi.JetEMScaleMomentum_pt.JetEtaJESScaleMomentum_eta.JetEtaJESScaleMomentum_m.JetEtaJESScaleMomentum_phi.JetEtaJESScaleMomentum_pt.JetPileupScaleMomentum_eta.JetPileupScaleMomentum_m.JetPileupScaleMomentum_phi.JetPileupScaleMomentum_pt.LArQuality.N90Constituents.NegativeE.OriginCorrected.PileupCorrected.SizeParameter.Timing.eta.kinematics.m.phi.pt', - 'HLT_xAOD__JetContainer_a10tcemsubjesFS.ActiveArea.ActiveArea4vec_eta.ActiveArea4vec_m.ActiveArea4vec_phi.ActiveArea4vec_pt.AlgorithmType.AverageLArQF.BchCorrCell.CentroidR.ConstituentScale.DetectorEta.EMFrac.EnergyPerSampling.FracSamplingMax.FracSamplingMaxIndex.HECFrac.HECQuality.InputType.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_m.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_pt.JetEMScaleMomentum_eta.JetEMScaleMomentum_m.JetEMScaleMomentum_phi.JetEMScaleMomentum_pt.JetEtaJESScaleMomentum_eta.JetEtaJESScaleMomentum_m.JetEtaJESScaleMomentum_phi.JetEtaJESScaleMomentum_pt.JetPileupScaleMomentum_eta.JetPileupScaleMomentum_m.JetPileupScaleMomentum_phi.JetPileupScaleMomentum_pt.LArQuality.N90Constituents.NegativeE.OriginCorrected.PileupCorrected.SizeParameter.Timing.eta.kinematics.m.phi.pt', - ] - -#JETM6SlimmingHelper.StaticContent.append("xAOD::JetContainer#CamKt15LCTopoJets") -#JETM6SlimmingHelper.StaticContent.append("xAOD::JetAuxContainer#CamKt15LCTopoJetsAux.eta.pt.phi") +# Add the jet containers to the stream +addJetOutputs(JETM6SlimmingHelper, + ["JETM6","AntiKt10LCTopoJets","AntiKt10TruthJets","AntiKt10UFOCSSKJets","AntiKt10UFOCHSJets"], + ["AntiKt10LCTopoJets","AntiKt10TruthJets","AntiKt10UFOCSSKJets","AntiKt10UFOCHSJets"], #smart slimming + ["AntiKt10EMPFlowCSSKJets"] #veto jets + ) # Add the MET containers to the stream -addMETOutputs(JETM6SlimmingHelper,["Diagnostic","AntiKt4LCTopo","AntiKt4EMPFlow","Track"]) +addMETOutputs(JETM6SlimmingHelper,["Diagnostic","AntiKt4EMPFlow","Track"]) JETM6SlimmingHelper.AppendContentToStream(JETM6Stream) #JETM6Stream.RemoveItem("xAOD::TrigNavigation#*") @@ -306,8 +476,8 @@ def removeVars(coll, vars): continue cleanedV.append(v) newS = '.'.join(cleanedV) - JETM6Stream.RemoveItem( origS ) - JETM6Stream.AddItem( newS ) - + JETM6Stream.RemoveItem( origS ) + JETM6Stream.AddItem( newS ) + #removeVars('InDetTrackParticles', ['definingParametersCovMatrix',]) - + diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM7.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM7.py index 902b51bfc4efa5118a3c395ed2a45fa46943c3ae..f37bd78e6e14a02fd383566c6a7688464b0b2d22 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM7.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM7.py @@ -14,37 +14,43 @@ from DerivationFrameworkJetEtMiss.METCommon import * # if DerivationFrameworkIsMonteCarlo: - from DerivationFrameworkMCTruth.MCTruthCommon import * - from DerivationFrameworkTau.TauTruthCommon import * + from DerivationFrameworkMCTruth.MCTruthCommon import addStandardTruthContents + addStandardTruthContents() #==================================================================== # SKIMMING TOOL #==================================================================== -from DerivationFrameworkJetEtMiss.TriggerLists import * -electronTriggers = singleElTriggers -muonTriggers = singleMuTriggers +from DerivationFrameworkJetEtMiss import TriggerLists +electronTriggers = TriggerLists.single_el_Trig() +muonTriggers = TriggerLists.single_mu_Trig() orstr = ' || ' andstr = ' && ' eltrigsel = '(EventInfo.eventTypeBitmask==1) || '+orstr.join(electronTriggers) elofflinesel = andstr.join(['count((Electrons.pt > 25*GeV) && (Electrons.DFCommonElectronsLHMedium)) >= 1', - 'count(AntiKt4EMTopoJets.DFCommonJets_Calib_pt>20*GeV && AntiKt4EMTopoJets.DFCommonJets_FixedCutBEff_77) >= 1' + 'count(AntiKt4EMTopoJets.DFCommonJets_Calib_pt>20*GeV && AntiKt4EMTopoJets_BTagging201810.DFCommonJets_FixedCutBEff_77_MV2c10) >= 1' ]) electronSelection = '( (' + eltrigsel + ') && (' + elofflinesel + ') )' mutrigsel = '(EventInfo.eventTypeBitmask==1) || '+orstr.join(muonTriggers) muofflinesel = andstr.join(['count((Muons.pt > 25*GeV) && (Muons.DFCommonMuonsPreselection)) >= 1', - 'count(AntiKt4EMTopoJets.DFCommonJets_Calib_pt>20*GeV && AntiKt4EMTopoJets.DFCommonJets_FixedCutBEff_77) >= 1' + 'count(AntiKt4EMTopoJets.DFCommonJets_Calib_pt>20*GeV && AntiKt4EMTopoJets_BTagging201810.DFCommonJets_FixedCutBEff_77_MV2c10) >= 1' ]) muonSelection = ' ( (' + mutrigsel + ') && (' + muofflinesel + ') )' expression = '( ' + electronSelection + ' || ' + muonSelection + ' )' - +for i in expression: + print "ISHAN " + i from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__xAODStringSkimmingTool JETM7SkimmingTool = DerivationFramework__xAODStringSkimmingTool( name = "JETM7SkimmingTool1", expression = expression) ToolSvc += JETM7SkimmingTool +#Trigger matching decorations +from DerivationFrameworkCore.TriggerMatchingAugmentation import applyTriggerMatching +TrigMatchAug, NewTrigVars = applyTriggerMatching(ToolNamePrefix="JETM7", + ElectronTriggers=electronTriggers,MuonTriggers=muonTriggers) + #==================================================================== # SET UP STREAM #==================================================================== @@ -61,7 +67,9 @@ applyJetCalibration_xAODColl("AntiKt4EMTopo") # adds this to DerivationFramework updateJVT_xAODColl("AntiKt4EMTopo") # adds this to DerivationFrameworkJob by default from DerivationFrameworkFlavourTag.FlavourTagCommon import applyBTagging_xAODColl -applyBTagging_xAODColl("AntiKt4EMTopo") +applyJetCalibration_xAODColl("AntiKt4EMTopo_BTagging201810") +updateJVT_xAODColl('AntiKt4EMTopo_BTagging201810') +applyBTagging_xAODColl('AntiKt4EMTopo_BTagging201810') #======================================= # ESTABLISH THE THINNING HELPER @@ -106,7 +114,7 @@ thinningTools.append(JETM7PhotonTPThinningTool) # TrackParticles associated with taus from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TauTrackParticleThinning JETM7TauTPThinningTool = DerivationFramework__TauTrackParticleThinning( name = "JETM7TauTPThinningTool", - StreamName = streamName, + StreamName = streamName, TauKey = "TauJets", InDetTrackParticlesKey = "InDetTrackParticles") ToolSvc += JETM7TauTPThinningTool @@ -166,16 +174,19 @@ reducedJetList = ["AntiKt2PV0TrackJets", "AntiKt4TruthWZJets"] replaceAODReducedJets(reducedJetList,jetm7Seq,"JETM7") +#======================================= +# BTAGGING INFO FOR PFLOW JET +#======================================= +from DerivationFrameworkFlavourTag.FlavourTagCommon import FlavorTagInit +FlavorTagInit(JetCollections = ['AntiKt4EMPFlowJets'],Sequencer = jetm7Seq) + #============================================================================== -# SUSY background generator filters +# background generator filters #============================================================================== -augmentationTools = [] +augmentationTools = [TrigMatchAug] if globalflags.DataSource() == 'geant4': - ToolSvc += CfgMgr.DerivationFramework__SUSYGenFilterTool( - "JETM7GenFilt", - SimBarcodeOffset = DerivationFrameworkSimBarcodeOffset - ) - augmentationTools.append(ToolSvc.JETM7GenFilt) + from DerivationFrameworkMCTruth.GenFilterToolSetup import * + augmentationTools.append(ToolSvc.DFCommonTruthGenFilt) from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel jetm7Seq += CfgMgr.DerivationFramework__DerivationKernel( name = "JETM7Kernel", @@ -204,14 +215,20 @@ JETM7SlimmingHelper.SmartCollections = ["Electrons", "Photons", "Muons", "TauJet "MET_Reference_AntiKt4LCTopo", "MET_Reference_AntiKt4EMPFlow", "AntiKt4EMTopoJets","AntiKt4LCTopoJets","AntiKt4EMPFlowJets", - "BTagging_AntiKt4EMTopo",] + "AntiKt4EMPFlowJets_BTagging201810", + "AntiKt4EMPFlowJets_BTagging201903", + "AntiKt4EMTopoJets_BTagging201810", + "BTagging_AntiKt4EMPFlow_201810", + "BTagging_AntiKt4EMPFlow_201903", + "BTagging_AntiKt4EMTopo_201810"] JETM7SlimmingHelper.AllVariables = [# "CaloCalTopoClusters", "MuonTruthParticles", "egammaTruthParticles", "TruthParticles", "TruthEvents", "TruthVertices", "MuonSegments", "Kt4EMTopoOriginEventShape","Kt4LCTopoOriginEventShape","Kt4EMPFlowEventShape", ] -JETM7SlimmingHelper.ExtraVariables = ["Muons.energyLossType.EnergyLoss.ParamEnergyLoss.MeasEnergyLoss.EnergyLossSigma.MeasEnergyLossSigma.ParamEnergyLossSigmaPlus.ParamEnergyLossSigmaMinus"] +JETM7SlimmingHelper.ExtraVariables = ["Electrons."+NewTrigVars["Electrons"], + "Muons.energyLossType.EnergyLoss.ParamEnergyLoss.MeasEnergyLoss.EnergyLossSigma.MeasEnergyLossSigma.ParamEnergyLossSigmaPlus.ParamEnergyLossSigmaMinus."+NewTrigVars["Muons"]] for truthc in [ "TruthMuons", "TruthElectrons", diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM8.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM8.py index 011ad466d7565fd85a5bd8d22304715735585588..db856c075f4858737a44bd758ba179060b8116ad 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM8.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM8.py @@ -6,96 +6,111 @@ from DerivationFrameworkCore.DerivationFrameworkMaster import * from DerivationFrameworkJetEtMiss.JetCommon import * from DerivationFrameworkJetEtMiss.ExtendedJetCommon import * -from DerivationFrameworkJetEtMiss.METCommon import * -from DerivationFrameworkEGamma.EGammaCommon import * -from DerivationFrameworkMuons.MuonsCommon import * - -# -if DerivationFrameworkIsMonteCarlo: - from DerivationFrameworkMCTruth.MCTruthCommon import * - from DerivationFrameworkTau.TauTruthCommon import * +from DerivationFrameworkFlavourTag.HbbCommon import * +from DerivationFrameworkFlavourTag.FlavourTagCommon import * #==================================================================== # SKIMMING TOOL #==================================================================== -# this recopying the latest JETM6 -from DerivationFrameworkJetEtMiss.TriggerLists import * -electronTriggers = singleElTriggers -muonTriggers = singleMuTriggers +from DerivationFrameworkJetEtMiss import TriggerLists +jetTriggers = TriggerLists.jetTrig() # For first data -jetSelection = '(count( AntiKt10LCTopoJets.pt > 100.*GeV ) >=1)' -#jetSelection = '(count( CamKt12LCTopoJets.pt > 150.*GeV ) >=1)' - -orstr = ' || ' -andstr = ' && ' -eltrigsel = '(EventInfo.eventTypeBitmask==1) || '+orstr.join(electronTriggers) -elofflinesel = andstr.join(['count((Electrons.pt > 20*GeV) && (Electrons.DFCommonElectronsLHMedium)) == 1', - 'count(AntiKt10LCTopoJets.pt > 75*GeV) >=1']) -electronSelection = '( (' + eltrigsel + ') && (' + elofflinesel + ') )' - -mutrigsel = '(EventInfo.eventTypeBitmask==1) || '+orstr.join(muonTriggers) -muofflinesel = andstr.join(['count((Muons.pt > 20*GeV) && (Muons.DFCommonMuonsPreselection)) == 1', - 'count(AntiKt10LCTopoJets.pt > 75*GeV) >=1']) -muonSelection = ' ( (' + mutrigsel + ') && (' + muofflinesel + ') ) ' -# MET filter wanted? : MET_Reference_AntiKt4LCTopo > 20*GeV # should use a different container - -lepSelection = '( ' + electronSelection + ' || ' + muonSelection + ' )' - - -expression = jetSelection + ' || '+ lepSelection - +jetSelection = '(count( AntiKt10LCTopoJets.pt > 150.*GeV && abs(AntiKt10LCTopoJets.eta) < 2.5 ) >=1)' +jetSelection += '||(count( AntiKt10TrackCaloClusterJets.pt > 150.*GeV && abs(AntiKt10TrackCaloClusterJets.eta) < 2.5 ) >=1)' +jetSelection += '||(count( AntiKt10UFOCSSKJets.pt > 150.*GeV && abs(AntiKt10UFOCSSKJets.eta) < 2.5 ) >=1)' from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__TriggerSkimmingTool JETM8TrigSkimmingTool = DerivationFramework__TriggerSkimmingTool( name = "JETM8TrigSkimmingTool", - TriggerListOR = jetTriggers+electronTriggers+muonTriggers ) - #TriggerListOR = triggers ) + TriggerListOR = jetTriggers ) ToolSvc += JETM8TrigSkimmingTool from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__xAODStringSkimmingTool JETM8OfflineSkimmingTool = DerivationFramework__xAODStringSkimmingTool( name = "JETM8OfflineSkimmingTool", - expression = expression) + expression = jetSelection) ToolSvc += JETM8OfflineSkimmingTool #==================================================================== # THINNING TOOLS #==================================================================== + thinningTools = [] -# Truth particle thinning -doTruthThinning = True -preserveAllDescendants = False -from AthenaCommon.GlobalFlags import globalflags -if doTruthThinning and DerivationFrameworkIsMonteCarlo: - truth_cond_WZH = "((abs(TruthParticles.pdgId) >= 23) && (abs(TruthParticles.pdgId) <= 25))" # W, Z and Higgs - truth_cond_Lepton = "((abs(TruthParticles.pdgId) >= 11) && (abs(TruthParticles.pdgId) <= 16) && (TruthParticles.barcode < 200000))" # Leptons - truth_cond_Quark = "((abs(TruthParticles.pdgId) <= 5 && (TruthParticles.pt > 10000.)) || (abs(TruthParticles.pdgId) == 6))" # Quarks - truth_cond_Gluon = "((abs(TruthParticles.pdgId) == 21) && (TruthParticles.pt > 10000.))" # Gluons - truth_cond_Photon = "((abs(TruthParticles.pdgId) == 22) && (TruthParticles.pt > 10000.) && (TruthParticles.barcode < 200000))" # Photon - - truth_expression = '('+truth_cond_WZH+' || '+truth_cond_Lepton +' || '+truth_cond_Quark+' || '+truth_cond_Gluon+' || '+truth_cond_Photon+')' - - from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning - JETM8TruthThinningTool = DerivationFramework__GenericTruthThinning( name = "JETM8TruthThinningTool", - StreamName = streamName, - ParticleSelectionString = truth_expression, - PreserveDescendants = preserveAllDescendants, - PreserveGeneratorDescendants = not preserveAllDescendants, - PreserveAncestors = True) - - ToolSvc += JETM8TruthThinningTool - thinningTools.append(JETM8TruthThinningTool) - - - from DerivationFrameworkJetEtMiss.DerivationFrameworkJetEtMissConf import DerivationFramework__ViewContainerThinning - JETM8TruthJetInputThin = DerivationFramework__ViewContainerThinning( name = "JETM8ViewContThinning", - StreamName = streamName, - TruthParticleKey = "TruthParticles", - TruthParticleViewKey = "JetInputTruthParticles") - - ToolSvc += JETM8TruthJetInputThin - thinningTools.append(JETM8TruthJetInputThin) +#==================================================================== +# Thin TruthParticles for truth jet constituents +#==================================================================== + +if DerivationFrameworkIsMonteCarlo: + from DerivationFrameworkJetEtMiss.DerivationFrameworkJetEtMissConf import DerivationFramework__ViewContainerThinning + JETM8TruthJetInputThin = DerivationFramework__ViewContainerThinning( name = "JETM8ViewContThinning", + StreamName = streamName, + TruthParticleKey = "TruthParticles", + TruthParticleViewKey = "JetInputTruthParticles") + + ToolSvc += JETM8TruthJetInputThin + thinningTools.append(JETM8TruthJetInputThin) + +#==================================================================== +# Thin jet inputs for jet constituents +#==================================================================== + +# Calo clusters +from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__JetCaloClusterThinning +JETM8AKt10CCThinningTool = DerivationFramework__JetCaloClusterThinning(name = "JETM8AKt10CCThinningTool", + StreamName = streamName, + SGKey = "AntiKt10LCTopoJets", + SelectionString = "(AntiKt10LCTopoJets.pt > 150*GeV && abs(AntiKt10LCTopoJets.eta) < 2.8)", + TopoClCollectionSGKey = "CaloCalTopoClusters", + AdditionalClustersKey = ["LCOriginTopoClusters"], + ApplyAnd = False) +ToolSvc += JETM8AKt10CCThinningTool +thinningTools.append(JETM8AKt10CCThinningTool) + +# Tracks and CaloClusters associated with TCCs +from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TCCTrackParticleThinning +JETM8TCCTPThinningTool = DerivationFramework__TCCTrackParticleThinning(name = "JETM8TCCTPThinningTool", + StreamName = streamName, + JetKey = "AntiKt10TrackCaloClusterJets", + SelectionString = "(AntiKt10TrackCaloClusterJets.pt > 150*GeV && abs(AntiKt10TrackCaloClusterJets.eta) < 2.8)", + TCCKey = "TrackCaloClustersCombinedAndNeutral", + InDetTrackParticlesKey = "InDetTrackParticles", + CaloCalTopoClustersKey = "CaloCalTopoClusters", + ThinOriginCorrectedClusters = True, + OriginCaloCalTopoClustersKey = "LCOriginTopoClusters") + +ToolSvc += JETM8TCCTPThinningTool +thinningTools.append(JETM8TCCTPThinningTool) + +# Tracks and CaloClusters associated with UFOs +from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__UFOTrackParticleThinning +JETM8EMCSSKUFOTPThinningTool = DerivationFramework__UFOTrackParticleThinning(name = "JETM8CSSKUFOTPThinningTool", + StreamName = streamName, + JetKey = "AntiKt10UFOCSSKJets", + UFOKey = "CSSKUFO", + InDetTrackParticlesKey = "InDetTrackParticles", + PFOCollectionSGKey = "JetETMiss", + AdditionalPFOKey = ["CSSK"]) + +ToolSvc += JETM8EMCSSKUFOTPThinningTool +thinningTools.append(JETM8EMCSSKUFOTPThinningTool) + +#==================================================================== +# Thin tracks +#==================================================================== + +JETM8BaselineTrack = "(InDetTrackParticles.pt > 0.0)" + +# This is necessary to keep tracks that would otherwise be removed by TCC and UFO thinning +from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning +JETM8TrackParticleThinningTool = DerivationFramework__TrackParticleThinning(name = "JETM8TrackParticleThinningTool", + StreamName = streamName, + SelectionString = JETM8BaselineTrack, + InDetTrackParticlesKey = "InDetTrackParticles", + ApplyAnd = False) + +ToolSvc += JETM8TrackParticleThinningTool +thinningTools.append(JETM8TrackParticleThinningTool) #======================================= # CREATE PRIVATE SEQUENCE @@ -103,7 +118,6 @@ if doTruthThinning and DerivationFrameworkIsMonteCarlo: jetm8Seq = CfgMgr.AthSequencer("JETM8Sequence") DerivationFrameworkJob += jetm8Seq -#jetm8Seq = DerivationFrameworkJob #======================================= # CREATE THE DERIVATION KERNEL ALGORITHM @@ -114,112 +128,119 @@ jetm8Seq += CfgMgr.DerivationFramework__DerivationKernel( name = "JETM8TrigKerne SkimmingTools = [JETM8TrigSkimmingTool], ThinningTools = []) +#======================================= +# BUILD TCC INPUTS +#======================================= + +# Add TCC constituents +from TrackCaloClusterRecTools.TrackCaloClusterConfig import runTCCReconstruction +import AthenaCommon.AtlasUnixStandardJob +include("RecExCond/AllDet_detDescr.py") +runTCCReconstruction(jetm8Seq, ToolSvc, "LCOriginTopoClusters", "InDetTrackParticles", outputTCCName="TrackCaloClustersCombinedAndNeutral") + +#======================================= +# BUILD UFO INPUTS +#======================================= + +## Add PFlow constituents +from JetRecTools.ConstModHelpers import getConstModSeq, xAOD +pflowCSSKSeq = getConstModSeq(["CS","SK"], "EMPFlow") + +# add the pflow cssk sequence to the main jetalg if not already there : +if pflowCSSKSeq.getFullName() not in [t.getFullName() for t in DerivationFrameworkJob.jetalg.Tools]: + DerivationFrameworkJob.jetalg.Tools += [pflowCSSKSeq] + +# Add UFO constituents +from TrackCaloClusterRecTools.TrackCaloClusterConfig import runUFOReconstruction +emcsskufoAlg = runUFOReconstruction(jetm8Seq, ToolSvc, PFOPrefix="CSSK",caloClusterName="LCOriginTopoClusters") + #======================================= # RESTORE AOD-REDUCED JET COLLECTIONS #======================================= reducedJetList = ["AntiKt2PV0TrackJets", "AntiKt4PV0TrackJets", + "AntiKt2LCTopoJets", + "AntiKt2TruthJets", "AntiKt4TruthJets", + "AntiKt4TruthWZJets", "AntiKt10TruthJets", - "AntiKt10LCTopoJets"] + "AntiKt10LCTopoJets", + "AntiKt10TrackCaloClusterJets", + "AntiKt10UFOCSSKJets"] replaceAODReducedJets(reducedJetList,jetm8Seq,"JETM8") -jetm8Seq += CfgMgr.DerivationFramework__DerivationKernel( name = "JETM8MainKernel", +jetm8Seq += CfgMgr.DerivationFramework__DerivationKernel( name = "JETM8MainKernel", SkimmingTools = [JETM8OfflineSkimmingTool], ThinningTools = thinningTools) #==================================================================== -# Special jets +# Jets for tagging #==================================================================== OutputJets["JETM8"] = [] -from JetRecTools.JetRecToolsConfig import ctm -from JetRecTools.JetRecToolsConf import CaloClusterConstituentsOrigin, ConstituentSubtractorTool, VoronoiWeightTool - -ctm.add( VoronoiWeightTool("JetConstit_Voronoi", - doSpread=True, nSigma=0), - alias = 'voronoi' ) - -ctm.add( VoronoiWeightTool("JetConstit_VoronoiSupp", - doSpread=False, nSigma=0), - alias = 'voronoiSupp' ) - -ctm.add( ConstituentSubtractorTool("JetConstit_ConstSub"), - alias = 'constsub' ) - -clustOrigSeq = ctm.buildConstitModifSequence( 'ConstitOrigSeq', - OutputContainer = 'OrigTopoClusters', - InputContainer= 'CaloCalTopoClusters', - modList = [ 'lc_origin'] ) - -clustSKSeq = ctm.buildConstitModifSequence( 'ConstitOrigSKSeq', - OutputContainer = 'OrigSKTopoClusters', - InputContainer= 'OrigTopoClusters', - modList = [ 'softkiller'] , InputType="CaloCluster") - -clustVorSeq = ctm.buildConstitModifSequence( 'ConstitOrigVorSeq', - OutputContainer = 'OrigVorTopoClusters', - InputContainer= 'OrigTopoClusters', - modList = [ 'voronoi'] , InputType="CaloCluster") - -clustVorSuppSeq = ctm.buildConstitModifSequence( 'ConstitOrigVorSuppSeq', - OutputContainer = 'OrigVorSuppTopoClusters', - InputContainer= 'OrigTopoClusters', - modList = [ 'voronoiSupp'] , InputType="CaloCluster") - -clustVorSKSeq = ctm.buildConstitModifSequence( 'ConstitOrigVorSKSeq', - OutputContainer = 'OrigVorSuppSKTopoClusters', - InputContainer= 'OrigVorSuppTopoClusters', - modList = [ 'softkiller'] , InputType="CaloCluster") - -clustCSSeq = ctm.buildConstitModifSequence( 'ConstitOrigCSSeq', - OutputContainer = 'OrigCSTopoClusters', - InputContainer= 'OrigTopoClusters', - modList = [ 'constsub'] , InputType="CaloCluster") - -clustCSSKSeq = ctm.buildConstitModifSequence( 'ConstitOrigCSSKSeq', - OutputContainer = 'OrigCSSKTopoClusters', - InputContainer= 'OrigCSTopoClusters', - modList = [ 'softkiller'] , InputType="CaloCluster") +# AntiKt10*PtFrac5Rclus20 +addDefaultTrimmedJets(jetm8Seq,"JETM8") -correctedClusters = [ "OrigTopoClusters", "OrigSKTopoClusters", "OrigCSTopoClusters", "OrigCSSKTopoClusters", "OrigVorSuppSKTopoClusters", "OrigVorTopoClusters", "OrigVorSuppTopoClusters" ] +addTCCTrimmedJets(jetm8Seq,"JETM8") -from JetRec.JetRecConf import JetAlgorithm -clustSeqAlg = JetAlgorithm("ClusterModifiers", Tools = [clustOrigSeq, clustSKSeq, clustCSSeq, clustCSSKSeq, clustVorSeq, clustVorSuppSeq, clustVorSKSeq]) -jetm8Seq += clustSeqAlg +if DerivationFrameworkIsMonteCarlo: + addSoftDropJets('AntiKt', 1.0, 'Truth', beta=1.0, zcut=0.1, mods="truth_groomed", algseq=jetm8Seq, outputGroup="JETM8", writeUngroomed=False) + addRecursiveSoftDropJets('AntiKt', 1.0, 'Truth', beta=1.0, zcut=0.05, N=-1, mods="truth_groomed", algseq=jetm8Seq, outputGroup="JETM8", writeUngroomed=False) + addBottomUpSoftDropJets('AntiKt', 1.0, 'Truth', beta=1.0, zcut=0.05, mods="truth_groomed", algseq=jetm8Seq, outputGroup="JETM8", writeUngroomed=False) + +addTrimmedJets("AntiKt", 1.0, "UFOCSSK", rclus=0.2, ptfrac=0.05, algseq=jetm8Seq, outputGroup="JETM8", writeUngroomed=False, mods="tcc_groomed") +addSoftDropJets("AntiKt", 1.0, "UFOCSSK", beta=1.0, zcut=0.1, algseq=jetm8Seq, outputGroup="JETM8", writeUngroomed=False, mods="tcc_groomed") +addRecursiveSoftDropJets('AntiKt', 1.0, 'UFOCSSK', beta=1.0, zcut=0.05, N=-1, mods="tcc_groomed", algseq=jetm8Seq, outputGroup="JETM8", writeUngroomed=False) +addBottomUpSoftDropJets('AntiKt', 1.0, 'UFOCSSK', beta=1.0, zcut=0.05, mods="tcc_groomed", algseq=jetm8Seq, outputGroup="JETM8", writeUngroomed=False) + +largeRJetAlgs = [ + "AntiKt10LCTopoTrimmedPtFrac5SmallR20", + "AntiKt10TrackCaloClusterTrimmedPtFrac5SmallR20", + "AntiKt10UFOCSSKTrimmedPtFrac5SmallR20", + "AntiKt10UFOCSSKSoftDropBeta100Zcut10", + "AntiKt10UFOCSSKBottomUpSoftDropBeta100Zcut5", + "AntiKt10UFOCSSKRecursiveSoftDropBeta100Zcut5Ninf", + ] + +largeRJetCollections = [] +for alg in largeRJetAlgs: + largeRJetCollections.append(alg+"Jets") -if jetFlags.useTruth: - addStandardJets("CamKt", 1.5, "Truth", ptmin=40000, algseq=jetm8Seq, outputGroup="JETM8") +if DerivationFrameworkIsMonteCarlo: + for alg in largeRJetAlgs: + addJetTruthLabel(jetalg=alg,sequence=jetm8Seq,algname="JetTruthLabelingAlg",labelname="R10TruthLabel_R21Consolidated") -# CamKt15LCTopo -addStandardJets("CamKt", 1.5, "LCTopo", mods="lctopo_ungroomed", calibOpt="none", ghostArea=0.01, ptmin=2000, ptminFilter=50000, - algseq=jetm8Seq, outputGroup="JETM8") +# Add VR track jets for b-tagging +addVRJets(jetm8Seq, largeRJetCollections) +addVRJets(jetm8Seq, largeRJetCollections, do_ghost=True) +addVRJets(jetm8Seq, largeRJetCollections, training='201903') -# AntiKt10Track -addTrimmedJets("AntiKt", 1.0, "PV0Track", rclus=0.2, ptfrac=0.05, algseq=jetm8Seq, outputGroup="JETM8") +#==================================================================== +# Set up b-tagging +#==================================================================== -# PFlow fat jets -#addTrimmedJets("AntiKt", 1.0, "EMCPFlow", rclus=0.2, ptfrac=0.05, algseq=jetm8Seq, outputGroup="JETM8") -addTrimmedJets("AntiKt", 1.0, "EMPFlow", rclus=0.2, ptfrac=0.05, algseq=jetm8Seq, outputGroup="JETM8") +# use alias for VR jets +from BTagging.BTaggingFlags import BTaggingFlags +BTaggingFlags.CalibrationChannelAliases += ["AntiKtVR30Rmax4Rmin02Track->AntiKtVR30Rmax4Rmin02Track,AntiKt4EMTopo"] -# AntiKt10*PtFrac5Rclus20 -addDefaultTrimmedJets(jetm8Seq,"JETM8") +#tag pFlow jets +FlavorTagInit(scheduleFlipped = False, JetCollections = ['AntiKt4EMPFlowJets'], Sequencer = jetm8Seq) -#AntiKt4PV0TrackJets -addAntiKt2PV0TrackJets(jetm8Seq, "JETM8") -addAntiKt4PV0TrackJets(jetm8Seq, "JETM8") +#==================================================================== +# Add truth information +#==================================================================== if DerivationFrameworkIsMonteCarlo: - addAntiKt4TruthJets(jetm8Seq, "JETM8") - addAntiKt10TruthJets(jetm8Seq, "JETM8") - -#======================================= -# SCHEDULE REPLACEMENT B-TAG COLLECTIONS -#======================================= + from DerivationFrameworkMCTruth.MCTruthCommon import addStandardTruthContents + from DerivationFrameworkMCTruth.MCTruthCommon import addTopQuarkAndDownstreamParticles + from DerivationFrameworkMCTruth.MCTruthCommon import addHFAndDownstreamParticles + from DerivationFrameworkMCTruth.MCTruthCommon import addTruthCollectionNavigationDecorations + addStandardTruthContents() + addTopQuarkAndDownstreamParticles() + addHFAndDownstreamParticles(addB=True, addC=False, generations=0) + addTruthCollectionNavigationDecorations(TruthCollections=["TruthTopQuarkWithDecayParticles","TruthBosonsWithDecayParticles"],prefix='Top') -from DerivationFrameworkFlavourTag.FlavourTagCommon import FlavorTagInit -FlavorTagInit(JetCollections = ['AntiKt2PV0TrackJets'], Sequencer = jetm8Seq) #==================================================================== # SET UP STREAM @@ -236,53 +257,111 @@ evtStream = augStream.GetEventStream() #==================================================================== from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper JETM8SlimmingHelper = SlimmingHelper("JETM8SlimmingHelper") -JETM8SlimmingHelper.SmartCollections = ["Electrons", "Photons", "Muons", "TauJets", +JETM8SlimmingHelper.SmartCollections = ["Electrons", "Photons", "Muons", "InDetTrackParticles", "PrimaryVertices", - "MET_Reference_AntiKt4EMTopo", - "MET_Reference_AntiKt4LCTopo", - "MET_Reference_AntiKt4EMPFlow", - "AntiKt4EMTopoJets","AntiKt4LCTopoJets","AntiKt4EMPFlowJets", + "AntiKt2TruthJets", + "AntiKt2LCTopoJets", + "AntiKt4TruthJets", + "AntiKt4TruthWZJets", + "AntiKt4EMPFlowJets", + "AntiKt4EMPFlowJets_BTagging201810", + "AntiKt4EMPFlowJets_BTagging201903", + "AntiKt10TruthJets", + "AntiKt10TruthWZJets", + "AntiKt10TruthTrimmedPtFrac5SmallR20Jets", + "AntiKt10TruthSoftDropBeta100Zcut10Jets", + "AntiKt10TruthBottomUpSoftDropBeta100Zcut5Jets", + "AntiKt10TruthRecursiveSoftDropBeta100Zcut5NinfJets", + "AntiKt10LCTopoJets", "AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets", - "BTagging_AntiKt4EMTopo", "BTagging_AntiKt2Track", - ] #+ correctedClusters -JETM8SlimmingHelper.AllVariables = ["CaloCalTopoClusters", - "MuonTruthParticles", "egammaTruthParticles", - "TruthParticles", "TruthEvents", "TruthVertices", - "JetETMissChargedParticleFlowObjects", "JetETMissNeutralParticleFlowObjects", - "Kt4EMTopoOriginEventShape","Kt4LCTopoOriginEventShape","Kt4EMPFlowEventShape"] -JETM8SlimmingHelper.ExtraVariables = [] + "AntiKt10TrackCaloClusterJets", + "AntiKt10TrackCaloClusterTrimmedPtFrac5SmallR20Jets", + "AntiKt10UFOCSSKJets", + "AntiKt10UFOCSSKTrimmedPtFrac5SmallR20Jets", + "AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets", + "AntiKt10UFOCSSKBottomUpSoftDropBeta100Zcut5Jets", + "AntiKt10UFOCSSKRecursiveSoftDropBeta100Zcut5NinfJets", + "AntiKtVR30Rmax4Rmin02TrackJets_BTagging201810", + "AntiKtVR30Rmax4Rmin02TrackJets_BTagging201903", + "BTagging_AntiKt4EMPFlow_201810", + "BTagging_AntiKt4EMPFlow_201903", + "BTagging_AntiKtVR30Rmax4Rmin02Track_201810", + "BTagging_AntiKtVR30Rmax4Rmin02Track_201903", + ] +JETM8SlimmingHelper.AllVariables = ["CaloCalTopoClusters", + "TrackCaloClustersCombinedAndNeutral", + "CSSKUFO", + "TruthParticles", + "Kt4EMPFlowEventShape"] + +JETM8SlimmingHelper.AppendToDictionary["CSSKUFO"] = "xAOD::TrackCaloClusterContainer" +JETM8SlimmingHelper.AppendToDictionary["CSSKUFOAux"] = "xAOD::TrackCaloClusterAuxContainer" + +JETM8SlimmingHelper.ExtraVariables += ["CSSKUFO.pt.eta.phi.taste"] +JETM8SlimmingHelper.ExtraVariables += ['AntiKt10LCTopoJets.SizeParameter', + 'AntiKt10TruthJets.SizeParameter', + 'AntiKt10TrackCaloClusterJets.SizeParameter', + 'AntiKt10UFOCSSKJets.SizeParameter', + 'AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets.SizeParameter', + 'AntiKt10TrackCaloClusterTrimmedPtFrac5SmallR20Jets.SizeParameter', + 'AntiKt10UFOCSSKTrimmedPtFrac5SmallR20Jets.SizeParameter', + 'AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets.SizeParameter', + 'AntiKt10UFOCSSKBottomUpSoftDropBeta100Zcut5Jets.SizeParameter', + 'AntiKt10UFOCSSKRecursiveSoftDropBeta100Zcut5NinfJets.SizeParameter', + 'AntiKt10TruthTrimmedPtFrac5SmallR20Jets.SizeParameter', + 'AntiKt10TruthSoftDropBeta100Zcut10Jets.SizeParameter', + 'AntiKt10TruthBottomUpSoftDropBeta100Zcut5Jets.SizeParameter', + 'AntiKt10TruthRecursiveSoftDropBeta100Zcut5NinfJets.SizeParameter', + 'AntiKt10LCTopoJets.GhostTrack', + 'AntiKt10TrackCaloClusterJets.GhostTrack', + 'AntiKt10UFOCSSKJets.GhostTrack', + 'AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets.GhostTrack', + 'AntiKt10TrackCaloClusterTrimmedPtFrac5SmallR20Jets.GhostTrack', + 'AntiKt10UFOCSSKTrimmedPtFrac5SmallR20Jets.GhostTrack', + 'AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets.GhostTrack', + 'AntiKt10UFOCSSKBottomUpSoftDropBeta100Zcut5Jets.GhostTrack', + 'AntiKt10UFOCSSKRecursiveSoftDropBeta100Zcut5NinfJets.GhostTrack', + ] + +# Add origin corrected clusters to keep LCTopo constituents +addOriginCorrectedClusters(JETM8SlimmingHelper, writeLC=True, writeEM=False) -for truthc in [ - "TruthMuons", - "TruthElectrons", - "TruthPhotons", - "TruthTaus", -# "TruthNeutrinos" - ]: - JETM8SlimmingHelper.StaticContent.append("xAOD::TruthParticleContainer#"+truthc) - JETM8SlimmingHelper.StaticContent.append("xAOD::TruthParticleAuxContainer#"+truthc+"Aux.") - -for caloc in correctedClusters: - JETM8SlimmingHelper.AppendToDictionary.update({caloc:"xAOD::CaloClusterContainer", - caloc+"Aux":"xAOD::ShallowAuxContainer"}) - JETM8SlimmingHelper.ExtraVariables +=[ - caloc+'.calE.calEta.calM.calPhi'] +# Add the jet containers to the stream +addJetOutputs( + slimhelper = JETM8SlimmingHelper, + contentlist = [ + "LargeR", + "AntiKt4EMPFlowJets", + "AntiKt4TruthJets", + "AntiKt4TruthWZJets", + "AntiKt2LCTopoJets", + "AntiKt2TruthJets", + "JETM8" + ], + smartlist = JETM8SlimmingHelper.SmartCollections + ) -printfunc (JETM8SlimmingHelper.AppendToDictionary) +for truthc in [ + "TruthTopQuark", + "TruthBosons", + "TruthHF", + ]: + JETM8SlimmingHelper.StaticContent.append("xAOD::TruthParticleContainer#"+truthc+"WithDecayParticles") + JETM8SlimmingHelper.StaticContent.append("xAOD::TruthParticleAuxContainer#"+truthc+"WithDecayParticlesAux.") + JETM8SlimmingHelper.StaticContent.append("xAOD::TruthVertexContainer#"+truthc+"WithDecayVertices") + JETM8SlimmingHelper.StaticContent.append("xAOD::TruthVertexAuxContainer#"+truthc+"WithDecayVerticesAux.") -# Trigger content -from DerivationFrameworkCore.JetTriggerContent import JetTriggerContent -for trig in JetTriggerContent: - if 'HLT' in trig and not 'Aux' in trig: - JETM8SlimmingHelper.AllVariables.append(trig) -JETM8SlimmingHelper.IncludeJetTriggerContent = True +for truthc in [ + "TruthMuons", + "TruthElectrons", + "TruthPhotons", + "TruthBottom", + "TruthBSM", + ]: + JETM8SlimmingHelper.StaticContent.append("xAOD::TruthParticleContainer#"+truthc) + JETM8SlimmingHelper.StaticContent.append("xAOD::TruthParticleAuxContainer#"+truthc+"Aux.") -# Add the jet containers to the stream -addJetOutputs(JETM8SlimmingHelper,["SmallR", - "LargeR", - "JETM8","AntiKt10EMPFlowJets"]) -# Add the MET containers to the stream -addMETOutputs(JETM8SlimmingHelper,["Diagnostic","AntiKt4LCTopo","AntiKt4EMPFlow","Track"]) +printfunc (JETM8SlimmingHelper.AppendToDictionary) JETM8SlimmingHelper.AppendContentToStream(JETM8Stream) JETM8Stream.RemoveItem("xAOD::TrigNavigation#*") diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM9.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM9.py index 5fe5ca553b4ff87cd0828fd8ebaae0f377e297d1..ee8b7e5dfc3f587e85dad100e26099d232aff493 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM9.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/JETM9.py @@ -11,18 +11,29 @@ from DerivationFrameworkJetEtMiss.ExtendedJetCommon import * #==================================================================== # SKIMMING TOOL #==================================================================== -from DerivationFrameworkJetEtMiss.TriggerLists import * -triggers = jetTriggers +from DerivationFrameworkJetEtMiss import TriggerLists +triggers = TriggerLists.jetTrig() # NOTE: need to be able to OR isSimulated as an OR with the trigger -orstr =' || ' -trigger = '('+orstr.join(triggers)+')' -expression = trigger+' || (EventInfo.eventTypeBitmask==1)' +#orstr =' || ' +#trigger = '('+orstr.join(triggers)+')' +expression = 'EventInfo.eventTypeBitmask==1' + + +from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__TriggerSkimmingTool +JETM9TrigSkimmingTool = DerivationFramework__TriggerSkimmingTool( name = "JETM9TrigSkimmingTool1", + TriggerListOR = triggers ) +ToolSvc += JETM9TrigSkimmingTool from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__xAODStringSkimmingTool -JETM9SkimmingTool = DerivationFramework__xAODStringSkimmingTool(name = "JETM9SkimmingTool1", +JETM9OfflineSkimmingTool = DerivationFramework__xAODStringSkimmingTool(name = "JETM9OfflineSkimmingTool1", expression = expression) -ToolSvc += JETM9SkimmingTool +ToolSvc += JETM9OfflineSkimmingTool + +# OR of the above two selections +from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__FilterCombinationOR +JETM9ORTool = DerivationFramework__FilterCombinationOR(name="JETM9ORTool", FilterList=[JETM9TrigSkimmingTool,JETM9OfflineSkimmingTool] ) +ToolSvc+=JETM9ORTool #======================================= # CREATE PRIVATE SEQUENCE @@ -32,15 +43,6 @@ jetm9Seq = CfgMgr.AthSequencer("JETM9Sequence") DerivationFrameworkJob += jetm9Seq #jetm9Seq = DerivationFrameworkJob -#==================================================================== -# SET UP STREAM -#==================================================================== -streamName = derivationFlags.WriteDAOD_JETM9Stream.StreamName -fileName = buildFileName( derivationFlags.WriteDAOD_JETM9Stream ) -JETM9Stream = MSMgr.NewPoolRootStream( streamName, fileName ) -JETM9Stream.AcceptAlgs(["JETM9Kernel"]) -augStream = MSMgr.GetStream( streamName ) -evtStream = augStream.GetEventStream() # Truth particle thinning thinningTools = [] @@ -54,21 +56,12 @@ if DerivationFrameworkIsMonteCarlo: WriteFirstN = 10) # from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning # JETM9TruthParticleThinning = DerivationFramework__GenericTruthThinning(name = "JETM9TruthThinning", - # StreamName = streamName, + # StreamName = streamName, # ParticlesKey = "TruthParticles", # ParticleSelectionString = "") ToolSvc += JETM9TruthThinning thinningTools.append(JETM9TruthThinning) -#======================================= -# CREATE THE DERIVATION KERNEL ALGORITHM -#======================================= - -from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel -jetm9Seq += CfgMgr.DerivationFramework__DerivationKernel( name = "JETM9Kernel", - SkimmingTools = [JETM9SkimmingTool], - ThinningTools = thinningTools) - #==================================================================== # Special jets #==================================================================== @@ -83,39 +76,40 @@ reducedJetList = ["AntiKt2PV0TrackJets", replaceAODReducedJets(reducedJetList,jetm9Seq,"JETM9") OutputJets["JETM9"] = ["AntiKt4EMTopoJets","AntiKt4LCTopoJets", - "AntiKt4TruthJets","AntiKt4TruthWZJets"] + "AntiKt4TruthJets","AntiKt4TruthWZJets","AntiKt2PV0TrackJets"] + +from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel +jetm9Seq += CfgMgr.DerivationFramework__DerivationKernel( name = "JETM9Kernel", + SkimmingTools = [JETM9ORTool], + ThinningTools = thinningTools) #==================================================================== -# Jets for R-scan +# SET UP STREAM #==================================================================== -from JetRec.JetRecStandard import jtm -from JetRec.JetRecConf import JetAlgorithm - -def addRscanJets(jetalg,radius,inputtype,sequence,outputlist): - jetname = "{0}{1}{2}Jets".format(jetalg,int(radius*10),inputtype) - algname = "jetalg"+jetname - - if not hasattr(sequence,algname): - if inputtype == "Truth": - addStandardJets(jetalg, radius, "Truth", mods="truth_ungroomed", ptmin=5000, algseq=sequence, outputGroup=outputlist) - if inputtype == "TruthWZ": - addStandardJets(jetalg, radius, "TruthWZ", mods="truth_ungroomed", ptmin=5000, algseq=sequence, outputGroup=outputlist) - elif inputtype == "LCTopo": - addStandardJets(jetalg, radius, "LCTopo", mods="lctopo_ungroomed", - ghostArea=0.01, ptmin=2000, ptminFilter=7000, calibOpt="none", algseq=sequence, outputGroup=outputlist) +streamName = derivationFlags.WriteDAOD_JETM9Stream.StreamName +fileName = buildFileName( derivationFlags.WriteDAOD_JETM9Stream ) +JETM9Stream = MSMgr.NewPoolRootStream( streamName, fileName ) +JETM9Stream.AcceptAlgs(["JETM9Kernel"]) +augStream = MSMgr.GetStream( streamName ) +evtStream = augStream.GetEventStream() +#==================================================================== +# Jets for R-scan +#==================================================================== for radius in [0.2, 0.3, 0.5, 0.6, 0.7, 0.8]: if jetFlags.useTruth: addRscanJets("AntiKt",radius,"Truth",jetm9Seq,"JETM9") addRscanJets("AntiKt",radius,"TruthWZ",jetm9Seq,"JETM9") addRscanJets("AntiKt",radius,"LCTopo",jetm9Seq,"JETM9") + + #==================================================================== # Add the containers to the output stream - slimming done here #==================================================================== from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper JETM9SlimmingHelper = SlimmingHelper("JETM9SlimmingHelper") -JETM9SlimmingHelper.SmartCollections = ["AntiKt4EMTopoJets","AntiKt4LCTopoJets","PrimaryVertices"] +JETM9SlimmingHelper.SmartCollections = ["AntiKt4EMTopoJets","AntiKt2LCTopoJets","AntiKt3LCTopoJets","AntiKt4LCTopoJets","AntiKt5LCTopoJets","AntiKt6LCTopoJets","AntiKt7LCTopoJets","AntiKt8LCTopoJets","PrimaryVertices"] JETM9SlimmingHelper.AllVariables = ["TruthEvents","MuonSegments","Kt4EMTopoOriginEventShape","Kt4LCTopoOriginEventShape","Kt4EMPFlowEventShape"] JETM9SlimmingHelper.ExtraVariables = ["TruthVertices.z"] @@ -123,7 +117,15 @@ JETM9SlimmingHelper.ExtraVariables = ["TruthVertices.z"] JETM9SlimmingHelper.IncludeJetTriggerContent = True # Add the jet containers to the stream -addJetOutputs(JETM9SlimmingHelper,["JETM9"]) +SmartListJets = [ + "AntiKt2LCTopoJets", + "AntiKt3LCTopoJets", + "AntiKt5LCTopoJets", + "AntiKt6LCTopoJets", + "AntiKt7LCTopoJets", + "AntiKt8LCTopoJets" + ] +addJetOutputs(JETM9SlimmingHelper,["JETM9"],SmartListJets) JETM9SlimmingHelper.AppendContentToStream(JETM9Stream) JETM9Stream.RemoveItem("xAOD::TrigNavigation#*") JETM9Stream.RemoveItem("xAOD::TrigNavigationAuxInfo#*") diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/LUT_data15.root b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/LUT_data15.root deleted file mode 100755 index a2fd4fe574f84649d8e023c50fd130496f67efdf..0000000000000000000000000000000000000000 Binary files a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/LUT_data15.root and /dev/null differ diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/LUT_mc12.root b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/LUT_mc12.root deleted file mode 100644 index 0b7e56fd2e79716162028fd474fed5a39242e6aa..0000000000000000000000000000000000000000 Binary files a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/LUT_mc12.root and /dev/null differ diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/BadBatmanAugmentationTool.cxx b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/BadBatmanAugmentationTool.cxx new file mode 100644 index 0000000000000000000000000000000000000000..40131aceee9d845e84a523c184854481efbb5d9d --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/BadBatmanAugmentationTool.cxx @@ -0,0 +1,92 @@ +/* + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +*/ + +/////////////////////////////////////////////////////////////////// +// BatBatmanAugmentationTool.cxx, (c) ATLAS Detector software +/////////////////////////////////////////////////////////////////// +// Author: Chris Young (christopher.young@cern.ch) +/////////////////////////////////////////////////////////////////// +// This code is designed to augment EventInfo with a flag which +// labels events which are likely to suffer from excess noise +// in the EMEC-IW induced by saturation between trains. This is +// based on counting the number of clusters in this |eta| region +// of significant pT and bad LAr Quality. +/////////////////////////////////////////////////////////////////// +#include "BadBatmanAugmentationTool.h" + +#include "StoreGate/WriteDecorHandle.h" + +namespace DerivationFramework { + + BadBatmanAugmentationTool::BadBatmanAugmentationTool(const std::string& t, + const std::string& n, + const IInterface* p) : + AthAlgTool(t,n,p) + { + declareInterface<DerivationFramework::IAugmentationTool>(this); + } + + StatusCode BadBatmanAugmentationTool::initialize() + { + + ATH_MSG_INFO("Init BadBatmanAugmentationTool"); + + ATH_CHECK(m_eventInfo_key.initialize()); + ATH_CHECK(m_clusterContainer_key.initialize()); + ATH_CHECK(m_isBadBatmanKey.initialize()); + + + return StatusCode::SUCCESS; + } + + StatusCode BadBatmanAugmentationTool::finalize() + { + + ATH_MSG_INFO("Finalize BadBatmanAugmentationTool"); + + return StatusCode::SUCCESS; + } + + StatusCode BadBatmanAugmentationTool::addBranches() const + { + //Running BadBatmanAugmentationTool + + //Set the name of the variable to augment + + SG::WriteDecorHandle<xAOD::EventInfo,char> dec_isBadBatman(m_isBadBatmanKey); + + auto eventInfo = SG::makeHandle (m_eventInfo_key); + if (!eventInfo.isValid()){ + ATH_MSG_WARNING("Invalid xAOD::EventInfo datahandle" + << m_eventInfo_key.key()); + return StatusCode::FAILURE; + } + auto ei = eventInfo.cptr(); + + auto clusterContainer = SG::makeHandle (m_clusterContainer_key); + if(!clusterContainer.isValid()){ + ATH_MSG_WARNING("Invalid xAOD::CaloClusterContainer datahandle" + << m_clusterContainer_key.key()); + return StatusCode::FAILURE; + } + auto clusters = clusterContainer.cptr(); + + //We will now loop over the cluster container counting the number of clusters which pass the criteria + bool isBatman=false; + size_t nBatman=0; + const static SG::AuxElement::ConstAccessor<float> acc_AVGLARQ("AVG_LAR_Q"); + for ( auto ipart : *clusters ) { + if (std::fabs(ipart->rawEta())<=2.5) continue; + if (std::fabs(ipart->rawEta())>=3.2) continue; + if (ipart->rawE()/cosh(ipart->rawEta())<500.) continue; + if (acc_AVGLARQ(*ipart)/65535.<=0.2) continue; + nBatman++; + } + //If we found more than 20 clusters then mark the event as bad + if (nBatman>20) isBatman=true; + dec_isBadBatman(*ei) = isBatman; + + return StatusCode::SUCCESS; + } +} diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/BadBatmanAugmentationTool.h b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/BadBatmanAugmentationTool.h new file mode 100644 index 0000000000000000000000000000000000000000..90b122f455d9eb1cc5d288fdf080c45b3aa8ce6e --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/BadBatmanAugmentationTool.h @@ -0,0 +1,50 @@ +/* + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +*/ + +/////////////////////////////////////////////////////////////////// +// BatBatmanAugmentationTool.cxx, (c) ATLAS Detector software +/////////////////////////////////////////////////////////////////// +// Author: Chris Young (christopher.young@cern.ch) +/////////////////////////////////////////////////////////////////// + +#ifndef DERIVATIONFRAMEWORK_BADBATMANAUGMENTATIONTOOL_H +#define DERIVATIONFRAMEWORK_BADBATMANAUGMENTATIONTOOL_H + +#include <string> +#include <vector> + +#include "xAODEventInfo/EventInfo.h" +#include "xAODCaloEvent/CaloCluster.h" +#include "xAODCaloEvent/CaloClusterContainer.h" + +#include "AthenaBaseComps/AthAlgTool.h" +#include "DerivationFrameworkInterfaces/IAugmentationTool.h" +#include "GaudiKernel/ToolHandle.h" +#include "StoreGate/ReadDecorHandleKey.h" +#include "StoreGate/WriteDecorHandleKey.h" + +namespace DerivationFramework { + + class BadBatmanAugmentationTool : public AthAlgTool, public IAugmentationTool { + public: + BadBatmanAugmentationTool(const std::string& t, const std::string& n, const IInterface* p); + + StatusCode initialize(); + StatusCode finalize(); + virtual StatusCode addBranches() const; + + private: + + SG::ReadHandleKey<xAOD::EventInfo> m_eventInfo_key{this, "EventInfo", "EventInfo", "Input event information"}; + SG::ReadHandleKey<xAOD::CaloClusterContainer> m_clusterContainer_key{this, "CaloCalTopoClusters", "CaloCalTopoClusters", "Input cluster container"}; + + SG::WriteDecorHandleKey<xAOD::EventInfo> m_isBadBatmanKey {this + ,"IsBadBatmanKey" + ,"EventInfo.DFCommonJets_isBadBatman" + ,"Decoration for isBadBatman flag"}; + + }; +} + +#endif // DERIVATIONFRAMEWORK_PFLOWAUGMENTATIONTOOL_H diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/DistanceInTrainAugmentationTool.cxx b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/DistanceInTrainAugmentationTool.cxx new file mode 100644 index 0000000000000000000000000000000000000000..c266941c61ccae8ad3d904c860702a73a689071b --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/DistanceInTrainAugmentationTool.cxx @@ -0,0 +1,98 @@ +/* + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +*/ + +/////////////////////////////////////////////////////////////////// +// DistanceInTrainAugmentationTool.cxx, (c) ATLAS Detector software +/////////////////////////////////////////////////////////////////// +// Author: Chris Young (christopher.young@cern.ch) +/////////////////////////////////////////////////////////////////// +// This code is designed to augment EventInfo with a variety +// of variables to describe where in the bunch train structure +// a given event lies. Care is taken to ensure that new trains +// are not defined at the abort gap or 4 non-colliding crossings +// in the 8b4e scheme. +/////////////////////////////////////////////////////////////////// +#include "DistanceInTrainAugmentationTool.h" + +#include "StoreGate/WriteDecorHandle.h" + + +DerivationFramework::DistanceInTrainAugmentationTool::DistanceInTrainAugmentationTool(const std::string& t, + const std::string& n, + const IInterface* p) : + AthAlgTool(t, n, p), + m_bcTool( "Trig::LHCBunchCrossingTool/BunchCrossingTool" ) +{ + + declareInterface<DerivationFramework::IAugmentationTool>(this); + + declareProperty( "BCTool", m_bcTool ); +} + +DerivationFramework::DistanceInTrainAugmentationTool::~DistanceInTrainAugmentationTool() { +} + +StatusCode DerivationFramework::DistanceInTrainAugmentationTool::initialize() +{ + + ATH_CHECK(m_eventInfo_key.initialize()); + ATH_CHECK(m_BCIDDistanceFrontKey.initialize()); + ATH_CHECK(m_BCIDDistanceTailKey.initialize()); + ATH_CHECK(m_BCIDGapBeforeTrainKey.initialize()); + ATH_CHECK(m_BCIDGapAfterTrainKey.initialize()); + ATH_CHECK(m_BCIDTypeKey.initialize()); + ATH_CHECK(m_BCIDGapBeforeTrainMinus12Key.initialize()); + ATH_CHECK(m_BCIDGapAfterTrainMinus12Key.initialize()); + ATH_CHECK(m_BCIDTypeMinus12Key.initialize()); + + ATH_MSG_VERBOSE("initialize() .."); + ATH_CHECK( m_bcTool.retrieve() ); + ATH_MSG_INFO("Retrieved tool: " << m_bcTool); + + return StatusCode::SUCCESS; +} + +StatusCode DerivationFramework::DistanceInTrainAugmentationTool::finalize() +{ + ATH_MSG_VERBOSE("finalize() ..."); + return StatusCode::SUCCESS; +} + +StatusCode DerivationFramework::DistanceInTrainAugmentationTool::addBranches() const { + + auto eventInfo = SG::makeHandle (m_eventInfo_key); + if (!eventInfo.isValid()){ + ATH_MSG_WARNING("Invalid xAOD::EventInfo datahandle" + << m_eventInfo_key.key()); + return StatusCode::FAILURE; + } + auto ei = eventInfo.cptr(); + + SG::WriteDecorHandle<xAOD::EventInfo,int> dec_BCIDDistanceFront(m_BCIDDistanceFrontKey); + SG::WriteDecorHandle<xAOD::EventInfo,int> dec_BCIDDistanceTail(m_BCIDDistanceTailKey); + SG::WriteDecorHandle<xAOD::EventInfo,int> dec_BCIDGapBeforeTrain(m_BCIDGapBeforeTrainKey); + SG::WriteDecorHandle<xAOD::EventInfo,int> dec_BCIDGapAfterTrain(m_BCIDGapAfterTrainKey); + SG::WriteDecorHandle<xAOD::EventInfo,int> dec_BCIDType(m_BCIDTypeKey); + SG::WriteDecorHandle<xAOD::EventInfo,int> dec_BCIDGapBeforeTrainMinus12(m_BCIDGapBeforeTrainMinus12Key); + SG::WriteDecorHandle<xAOD::EventInfo,int> dec_BCIDGapAfterTrainMinus12(m_BCIDGapAfterTrainMinus12Key); + SG::WriteDecorHandle<xAOD::EventInfo,int> dec_BCIDTypeMinus12(m_BCIDTypeMinus12Key); + + dec_BCIDDistanceFront(*ei) = m_bcTool->distanceFromFront(ei->bcid(), Trig::IBunchCrossingTool::BunchCrossings); + dec_BCIDDistanceTail(*ei) = m_bcTool->distanceFromTail(ei->bcid(), Trig::IBunchCrossingTool::BunchCrossings); + dec_BCIDGapBeforeTrain(*ei) = m_bcTool->gapBeforeTrain(ei->bcid(), Trig::IBunchCrossingTool::BunchCrossings); + dec_BCIDGapAfterTrain(*ei) = m_bcTool->gapAfterTrain(ei->bcid(), Trig::IBunchCrossingTool::BunchCrossings); + dec_BCIDType(*ei) = m_bcTool->bcType(ei->bcid()); + if (ei->bcid()>=12){ + dec_BCIDTypeMinus12(*ei) = m_bcTool->bcType(ei->bcid()-12); + dec_BCIDGapBeforeTrainMinus12(*ei) = m_bcTool->gapBeforeTrain(ei->bcid()-12, Trig::IBunchCrossingTool::BunchCrossings); + dec_BCIDGapAfterTrainMinus12(*ei) = m_bcTool->gapAfterTrain(ei->bcid()-12, Trig::IBunchCrossingTool::BunchCrossings); + }else{ + dec_BCIDTypeMinus12(*ei) = -1; + dec_BCIDGapBeforeTrainMinus12(*ei) = 0; + dec_BCIDGapAfterTrainMinus12(*ei) = 0; + } + + return StatusCode::SUCCESS; +} + diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/DistanceInTrainAugmentationTool.h b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/DistanceInTrainAugmentationTool.h new file mode 100644 index 0000000000000000000000000000000000000000..b48185385cb32cee6625b5889682bc60c1d6a83b --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/DistanceInTrainAugmentationTool.h @@ -0,0 +1,57 @@ +/* + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +*/ + +/////////////////////////////////////////////////////////////////// +// DistanceInTrainAugmentationTool.h, (c) ATLAS Detector software +/////////////////////////////////////////////////////////////////// +// Author: Chris Young (christopher.young@cern.ch) +/////////////////////////////////////////////////////////////////// +#ifndef DERIVATIONFRAMEWORK_BCDISTANCEAUGMENTATIONTOOL_H +#define DERIVATIONFRAMEWORK_BCDISTANCEAUGMENTATIONTOOL_H + +#include "AthenaBaseComps/AthAlgTool.h" +#include "DerivationFrameworkInterfaces/IAugmentationTool.h" +#include "GaudiKernel/ToolHandle.h" +#include "StoreGate/WriteDecorHandleKey.h" +#include "StoreGate/ReadDecorHandleKey.h" + +#include "xAODEventInfo/EventInfo.h" + +#include "TrigAnalysisInterfaces/IBunchCrossingTool.h" + +namespace DerivationFramework { + + class DistanceInTrainAugmentationTool : public AthAlgTool, public IAugmentationTool { + + public: + DistanceInTrainAugmentationTool( const std::string& t, const std::string& n, const IInterface* p ); + + ~DistanceInTrainAugmentationTool(); + + StatusCode initialize(); + StatusCode finalize(); + + virtual StatusCode addBranches() const; + + private: + + ToolHandle<Trig::IBunchCrossingTool> m_bcTool; + + SG::ReadHandleKey<xAOD::EventInfo> m_eventInfo_key{this, "EventInfo", "EventInfo", "Input event information"}; + + SG::WriteDecorHandleKey<xAOD::EventInfo> m_BCIDDistanceFrontKey {this, "BCIDDistanceFrontKey", "EventInfo.DFCommonJets_BCIDDistanceFromFront", "Decoration for BCID distance from front"}; + SG::WriteDecorHandleKey<xAOD::EventInfo> m_BCIDDistanceTailKey {this, "BCIDDistanceTailKey", "EventInfo.DFCommonJets_BCIDDistanceTail" , "Decoration for BCID distance from tail"}; + SG::WriteDecorHandleKey<xAOD::EventInfo> m_BCIDGapBeforeTrainKey {this, "BCIDGapBeforeTrainKey", "EventInfo.DFCommonJets_BCIDGapBeforeTrain", "Decoration for BCID gap before train"}; + SG::WriteDecorHandleKey<xAOD::EventInfo> m_BCIDGapAfterTrainKey {this, "BCIDGapAfterTrainKey", "EventInfo.DFCommonJets_BCIDGapAfterTrain", "Decoration for BCID gap after train"}; + SG::WriteDecorHandleKey<xAOD::EventInfo> m_BCIDTypeKey {this, "BCIDTypeKey", "EventInfo.DFCommonJets_BCIDType", "Decoration for BCID type"}; + SG::WriteDecorHandleKey<xAOD::EventInfo> m_BCIDGapBeforeTrainMinus12Key {this, "BCIDGapBeforeTrainMinus12Key", "EventInfo.DFCommonJets_BCIDGapBeforeTrainMinus12", "Decoration for BCID gap before train minus 12 BCIDs"}; + SG::WriteDecorHandleKey<xAOD::EventInfo> m_BCIDGapAfterTrainMinus12Key {this, "BCIDGapAfterTrainMinus12Key", "EventInfo.DFCommonJets_BCIDGapAfterTrainMinus12", "Decoration for BCID gap after train minus 12 BCIDs"}; + SG::WriteDecorHandleKey<xAOD::EventInfo> m_BCIDTypeMinus12Key {this, "BCIDTypeMinus12Key", "EventInfo.DFCommonJets_BCIDTypeMinus12", "Decoration for BCID type minus 12 BCIDs"}; + + }; + +} + +#endif + diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/JetAugmentationTool.cxx b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/JetAugmentationTool.cxx index a87a47322f8ff5c5f10972bfa156308803a78642..7eadb5433a9da527a16cd4b3851fe500dd6ed8ae 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/JetAugmentationTool.cxx +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/JetAugmentationTool.cxx @@ -17,18 +17,22 @@ namespace DerivationFramework { const std::string& n, const IInterface* p) : AthAlgTool(t,n,p), - m_dec_calibpt(0), - m_dec_calibeta(0), - m_dec_calibphi(0), - m_dec_calibm(0), m_jetCalibTool(""), m_docalib(false), - m_dec_jvt(0), m_jvtTool(""), + m_jetJvtEfficiencyTool(""), m_dojvt(false), m_dobtag(false), m_jetTrackSumMomentsTool(""), - m_decoratetracksum(false) + m_decoratetracksum(false), + m_jetPtAssociationTool(""), + m_decorateptassociation(false), + m_trkSelectionTool(""), + m_trkVtxAssociationTool(""), + m_qgTool(""), + m_decorateQGVariables(false), + m_jetTruthLabelingTool(""), + m_decoratetruthlabel(false) { declareInterface<DerivationFramework::IAugmentationTool>(this); declareProperty("MomentPrefix", m_momentPrefix = "DFCommonJets_"); @@ -38,9 +42,15 @@ namespace DerivationFramework { declareProperty("JetCalibTool", m_jetCalibTool); declareProperty("JvtMomentKey", m_jvtMomentKey = "Jvt"); declareProperty("JetJvtTool", m_jvtTool); + declareProperty("JetJvtEffTool", m_jetJvtEfficiencyTool); declareProperty("JetBtagTools", m_btagSelTools); declareProperty("JetBtagWPs", m_btagWP); declareProperty("JetTrackSumMomentsTool", m_jetTrackSumMomentsTool); + declareProperty("JetPtAssociationTool", m_jetPtAssociationTool); + declareProperty("TrackSelectionTool", m_trkSelectionTool); + declareProperty("TrackVertexAssociationTool", m_trkVtxAssociationTool); + declareProperty("JetTruthLabelingTool", m_jetTruthLabelingTool); + declareProperty("JetQGTaggerTool", m_qgTool); } StatusCode JetAugmentationTool::initialize() @@ -50,19 +60,21 @@ namespace DerivationFramework { if(!m_jetCalibTool.empty()) { CHECK(m_jetCalibTool.retrieve()); ATH_MSG_INFO("Augmenting jets with calibration \"" << m_momentPrefix+m_calibMomentKey << "\""); + m_docalib = true; - m_dec_calibpt = new SG::AuxElement::Decorator<float>(m_momentPrefix+m_calibMomentKey+"_pt"); - m_dec_calibeta = new SG::AuxElement::Decorator<float>(m_momentPrefix+m_calibMomentKey+"_eta"); - m_dec_calibphi = new SG::AuxElement::Decorator<float>(m_momentPrefix+m_calibMomentKey+"_phi"); - m_dec_calibm = new SG::AuxElement::Decorator<float>(m_momentPrefix+m_calibMomentKey+"_m"); + m_dec_calibpt = std::make_unique< SG::AuxElement::Decorator<float> >(m_momentPrefix+m_calibMomentKey+"_pt"); + m_dec_calibeta = std::make_unique< SG::AuxElement::Decorator<float> >(m_momentPrefix+m_calibMomentKey+"_eta"); + m_dec_calibphi = std::make_unique< SG::AuxElement::Decorator<float> >(m_momentPrefix+m_calibMomentKey+"_phi"); + m_dec_calibm = std::make_unique< SG::AuxElement::Decorator<float> >(m_momentPrefix+m_calibMomentKey+"_m"); if(!m_jvtTool.empty()) { CHECK(m_jvtTool.retrieve()); ATH_MSG_INFO("Augmenting jets with updated JVT \"" << m_momentPrefix+m_jvtMomentKey << "\""); m_dojvt = true; - m_dec_jvt = new SG::AuxElement::Decorator<float>(m_momentPrefix+m_jvtMomentKey); + m_dec_jvt = std::make_unique< SG::AuxElement::Decorator<float> >(m_momentPrefix+m_jvtMomentKey); + m_dec_passJvt = std::make_unique< SG::AuxElement::Decorator<char> >(m_momentPrefix+"pass"+m_jvtMomentKey); if(!m_btagSelTools.empty()) { size_t ibtag(0); @@ -77,12 +89,58 @@ namespace DerivationFramework { } } + if(!m_jetJvtEfficiencyTool.empty()) { + CHECK(m_jetJvtEfficiencyTool.retrieve()); + ATH_MSG_INFO("Jvt efficiency tool initialized \"" << m_momentPrefix+"pass"+m_jvtMomentKey << "\""); + } + if(!m_jetTrackSumMomentsTool.empty()) { CHECK(m_jetTrackSumMomentsTool.retrieve()); ATH_MSG_INFO("Augmenting jets with track sum moments \"" << m_momentPrefix << "TrackSumMass,Pt\""); m_decoratetracksum = true; - m_dec_tracksummass = new SG::AuxElement::Decorator<float>(m_momentPrefix+"TrackSumMass"); - m_dec_tracksumpt = new SG::AuxElement::Decorator<float>(m_momentPrefix+"TrackSumPt"); + m_dec_tracksummass = std::make_unique< SG::AuxElement::Decorator<float> >(m_momentPrefix+"TrackSumMass"); + m_dec_tracksumpt = std::make_unique< SG::AuxElement::Decorator<float> >(m_momentPrefix+"TrackSumPt"); + } + + // This tool creates the GhostTruthAssociation decorations recommended for truth matching // + if(!m_jetPtAssociationTool.empty()){ + CHECK(m_jetPtAssociationTool.retrieve()); + ATH_MSG_INFO("Augmenting jets with GhostTruthAssociation moments Link and Fraction"); + m_decorateptassociation = true; + m_dec_GhostTruthAssociationFraction = std::make_unique< SG::AuxElement::Decorator<float> >("GhostTruthAssociationFraction"); + m_dec_GhostTruthAssociationLink = std::make_unique< SG::AuxElement::Decorator< ElementLink<xAOD::JetContainer> > >("GhostTruthAssociationLink"); + } + + if(!m_trkSelectionTool.empty()) { + CHECK( m_trkSelectionTool.retrieve() ); + if(!m_trkVtxAssociationTool.empty()){ + CHECK( m_trkVtxAssociationTool.retrieve() ); + + if(!m_qgTool.empty()){ + CHECK(m_qgTool.retrieve()); + m_decorateQGVariables = true; + m_dec_AssociatedNTracks = std::make_unique< SG::AuxElement::Decorator<int> >(m_momentPrefix + "QGTagger_NTracks"); + m_dec_AssociatedTracksWidth = std::make_unique< SG::AuxElement::Decorator<float> >(m_momentPrefix + "QGTagger_TracksWidth"); + m_dec_AssociatedTracksC1 = std::make_unique< SG::AuxElement::Decorator<float> >(m_momentPrefix + "QGTagger_TracksC1"); + m_dec_Associated_truthjet_nCharged = std::make_unique< SG::AuxElement::Decorator<int> >(m_momentPrefix + "QGTagger_truthjet_nCharged"); + m_dec_Associated_truthjet_pt = std::make_unique< SG::AuxElement::Decorator<float> >(m_momentPrefix + "QGTagger_truthjet_pt"); + m_dec_Associated_truthjet_eta = std::make_unique< SG::AuxElement::Decorator<float> >(m_momentPrefix + "QGTagger_truthjet_eta"); + } + } + } + + if(!m_jetTruthLabelingTool.empty()) { + CHECK(m_jetTruthLabelingTool.retrieve()); + ATH_MSG_INFO("Augmenting jets with truthlabeling"); + m_decoratetruthlabel = true; + m_truthLabelName = m_jetTruthLabelingTool->getLargeRJetTruthLabelName(); + m_dec_Label = std::make_unique< SG::AuxElement::Decorator<int> >(m_truthLabelName); + m_dec_dRW = std::make_unique< SG::AuxElement::Decorator<float> >(m_truthLabelName+"_dR_W"); + m_dec_dRZ = std::make_unique< SG::AuxElement::Decorator<float> >(m_truthLabelName+"_dR_Z"); + m_dec_dRTop = std::make_unique< SG::AuxElement::Decorator<float> >(m_truthLabelName+"_dR_Top"); + m_dec_dRH = std::make_unique< SG::AuxElement::Decorator<float> >(m_truthLabelName+"_dR_H"); + m_dec_NB = std::make_unique< SG::AuxElement::Decorator<int> >(m_truthLabelName+"_NB"); + m_dec_TruthJetMass = std::make_unique< SG::AuxElement::Decorator<float> >(m_truthLabelName+"_TruthJetMass"); } return StatusCode::SUCCESS; @@ -91,26 +149,10 @@ namespace DerivationFramework { StatusCode JetAugmentationTool::finalize() { - if(m_docalib) { - delete m_dec_calibpt; - delete m_dec_calibeta; - delete m_dec_calibphi; - delete m_dec_calibm; - } - - if(m_dojvt) { - delete m_dec_jvt; - } - if(m_dobtag) { for(const auto& pdec : m_dec_btag) delete pdec; } - if(m_decoratetracksum){ - delete m_dec_tracksummass; - delete m_dec_tracksumpt; - } - return StatusCode::SUCCESS; } @@ -130,18 +172,48 @@ namespace DerivationFramework { // if we have a calibration tool, apply the calibration if(m_docalib) { - if(m_jetCalibTool->modify(*jets_copy) ) { + if((m_jetCalibTool->modify(*jets_copy)).isFailure()) { ATH_MSG_WARNING("Problem applying jet calibration"); return StatusCode::FAILURE; } } if(m_decoratetracksum){ - if(m_jetTrackSumMomentsTool->modify(*jets_copy) ) - { - ATH_MSG_WARNING("Problems calculating TrackSumMass and TrackSumPt"); - return StatusCode::FAILURE; - } + if((m_jetTrackSumMomentsTool->modify(*jets_copy)).isFailure()) + { + ATH_MSG_WARNING("Problems calculating TrackSumMass and TrackSumPt"); + return StatusCode::FAILURE; + } + } + + // Check if GhostTruthAssociation decorations already exist for first jet, and if so skip them + bool isMissingPtAssociation = true; + if( !m_decorateptassociation || jets_copy->size() == 0 || m_dec_GhostTruthAssociationFraction->isAvailable(*jets_copy->at(0)) ) { + isMissingPtAssociation = false; + } + + if(m_decorateptassociation && isMissingPtAssociation){ + if((m_jetPtAssociationTool->modify(*jets_copy)).isFailure()) + { + ATH_MSG_ERROR("Problem running the JetPtAssociationTool"); + return StatusCode::FAILURE; + } + } + + if(m_decoratetruthlabel){ + if((m_jetTruthLabelingTool->modify(*jets_copy)).isFailure() ) + { + ATH_MSG_ERROR("Problems applying large-R jet truth labels"); + return StatusCode::FAILURE; + } + } + + if(m_decorateQGVariables){ + if((m_qgTool->decorate(*jets_copy)).isFailure() ) + { + ATH_MSG_ERROR("Problems applying the q/g tagging label"); + return StatusCode::FAILURE; + } } // loop over the copies @@ -150,6 +222,7 @@ namespace DerivationFramework { const xAOD::Jet& jet_orig( *(*jets)[jet->index()] ); if(m_docalib) { + // generate static decorators to avoid multiple lookups (*m_dec_calibpt)(jet_orig) = jet->pt(); (*m_dec_calibeta)(jet_orig) = jet->eta(); @@ -159,8 +232,12 @@ namespace DerivationFramework { ATH_MSG_VERBOSE("Calibrated jet pt: " << (*m_dec_calibpt)(jet_orig) ); if(m_dojvt) { + (*m_dec_jvt)(jet_orig) = m_jvtTool->updateJvt(*jet); ATH_MSG_VERBOSE("Calibrated JVT: " << (*m_dec_jvt)(jet_orig) ); + + bool passJVT_tool = m_jetJvtEfficiencyTool->passesJvtCut(jet_orig); + (*m_dec_passJvt)(jet_orig) = passJVT_tool; if(m_dobtag) { bool passJVT = jet->pt()>50e3 || fabs(jet->eta())>2.4 || (*m_dec_jvt)(jet_orig)>0.64; @@ -180,6 +257,37 @@ namespace DerivationFramework { ATH_MSG_VERBOSE("TrackSumMass: " << (*m_dec_tracksummass)(jet_orig) ); ATH_MSG_VERBOSE("TrackSumPt: " << (*m_dec_tracksummass)(jet_orig) ); } + + if(m_decorateptassociation && isMissingPtAssociation){ + if(m_dec_GhostTruthAssociationFraction->isAvailable(*jet)){ + (*m_dec_GhostTruthAssociationFraction)(jet_orig) = jet->getAttribute<float>("GhostTruthAssociationFraction"); + ATH_MSG_VERBOSE("GhostTruthAssociationFraction: " << (*m_dec_GhostTruthAssociationFraction)(jet_orig) ); + } + if(m_dec_GhostTruthAssociationLink->isAvailable(*jet)){ + (*m_dec_GhostTruthAssociationLink)(jet_orig) = jet->getAttribute< ElementLink<xAOD::JetContainer> >("GhostTruthAssociationLink"); + ATH_MSG_VERBOSE("GhostTruthAssociationLink: " << (*m_dec_GhostTruthAssociationLink)(jet_orig) ); + } + } + + if(m_decoratetruthlabel){ + if(m_dec_Label->isAvailable(*jet)) (*m_dec_Label)(jet_orig) = (*m_dec_Label)(*jet); + if(m_dec_dRW->isAvailable(*jet)) (*m_dec_dRW)(jet_orig) = (*m_dec_dRW)(*jet); + if(m_dec_dRZ->isAvailable(*jet)) (*m_dec_dRZ)(jet_orig) = (*m_dec_dRZ)(*jet); + if(m_dec_dRTop->isAvailable(*jet)) (*m_dec_dRTop)(jet_orig) = (*m_dec_dRTop)(*jet); + if(m_dec_dRH->isAvailable(*jet)) (*m_dec_dRH)(jet_orig) = (*m_dec_dRH)(*jet); + if(m_dec_NB->isAvailable(*jet)) (*m_dec_NB)(jet_orig) = (*m_dec_NB)(*jet); + if(m_dec_TruthJetMass->isAvailable(*jet)) (*m_dec_TruthJetMass)(jet_orig) = (*m_dec_TruthJetMass)(*jet); + } + + if(m_decorateQGVariables){ + if(m_dec_AssociatedNTracks->isAvailable(*jet)) (*m_dec_AssociatedNTracks)(jet_orig) = (*m_dec_AssociatedNTracks)(*jet); + if(m_dec_AssociatedTracksWidth->isAvailable(*jet)) (*m_dec_AssociatedTracksWidth)(jet_orig) = (*m_dec_AssociatedTracksWidth)(*jet); + if(m_dec_AssociatedTracksC1->isAvailable(*jet)) (*m_dec_AssociatedTracksC1)(jet_orig) = (*m_dec_AssociatedTracksC1)(*jet); + if(m_dec_Associated_truthjet_nCharged->isAvailable(*jet)) (*m_dec_Associated_truthjet_nCharged)(jet_orig) = (*m_dec_Associated_truthjet_nCharged)(*jet); + if(m_dec_Associated_truthjet_pt->isAvailable(*jet)) (*m_dec_Associated_truthjet_pt)(jet_orig) = (*m_dec_Associated_truthjet_pt)(*jet); + if(m_dec_Associated_truthjet_eta->isAvailable(*jet)) (*m_dec_Associated_truthjet_eta)(jet_orig) = (*m_dec_Associated_truthjet_eta)(*jet); + } + } return StatusCode::SUCCESS; diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/JetAugmentationTool.h b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/JetAugmentationTool.h index b6e723fc9bf8eee692b76c5e52d2daf9b89324b5..df941b7ccf00fc0643da87966050e92abc1872e2 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/JetAugmentationTool.h +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/JetAugmentationTool.h @@ -19,9 +19,16 @@ #include "JetInterface/IJetModifier.h" #include "JetInterface/IJetUpdateJvt.h" +#include "JetInterface/IJetDecorator.h" +#include "JetAnalysisInterfaces/IJetJvtEfficiency.h" #include "FTagAnalysisInterfaces/IBTaggingSelectionTool.h" #include "xAODJet/JetContainer.h" +#include "InDetTrackSelectionTool/IInDetTrackSelectionTool.h" +#include "TrackVertexAssociationTool/ITrackVertexAssociationTool.h" + +#include "ParticleJetTools/JetTruthLabelingTool.h" + namespace DerivationFramework { class JetAugmentationTool : public AthAlgTool, public IAugmentationTool { @@ -39,20 +46,28 @@ namespace DerivationFramework { // implement augmentations explicitly to avoid need to parse lists of moments to copy // // calibration - SG::AuxElement::Decorator<float>* m_dec_calibpt; - SG::AuxElement::Decorator<float>* m_dec_calibeta; - SG::AuxElement::Decorator<float>* m_dec_calibphi; - SG::AuxElement::Decorator<float>* m_dec_calibm; + + std::unique_ptr< SG::AuxElement::Decorator<float> > m_dec_calibpt; + std::unique_ptr< SG::AuxElement::Decorator<float> > m_dec_calibeta; + std::unique_ptr< SG::AuxElement::Decorator<float> > m_dec_calibphi; + std::unique_ptr< SG::AuxElement::Decorator<float> > m_dec_calibm; ToolHandle<IJetModifier> m_jetCalibTool; std::string m_calibMomentKey; bool m_docalib; // JVT - SG::AuxElement::Decorator<float>* m_dec_jvt; + std::unique_ptr< SG::AuxElement::Decorator<float> > m_dec_jvt; + std::unique_ptr< SG::AuxElement::Decorator<char> > m_dec_passJvt; ToolHandle<IJetUpdateJvt> m_jvtTool; + ToolHandle<CP::IJetJvtEfficiency> m_jetJvtEfficiencyTool; std::string m_jvtMomentKey; bool m_dojvt; + //PFlow fJVT + std::unique_ptr< SG::AuxElement::Decorator<float> > m_dec_fjvt; + std::string m_fjvtMomentKey; + bool m_dofjvt; + // b-tagging @author tripiana@cern.ch std::vector<SG::AuxElement::Decorator<float>*> m_dec_btag; std::vector<std::string> m_btagWP; @@ -64,8 +79,39 @@ namespace DerivationFramework { //@author: nurfikri.bin.norjoharuddeen@cern.ch ToolHandle<IJetModifier> m_jetTrackSumMomentsTool; bool m_decoratetracksum; - SG::AuxElement::Decorator<float>* m_dec_tracksummass; - SG::AuxElement::Decorator<float>* m_dec_tracksumpt; + std::unique_ptr< SG::AuxElement::Decorator<float> > m_dec_tracksummass; + std::unique_ptr< SG::AuxElement::Decorator<float> > m_dec_tracksumpt; + + // GhostTruthAssociation for derivations, @author jeff.dandoy@cern.ch + ToolHandle<IJetModifier> m_jetPtAssociationTool; + bool m_decorateptassociation; + std::unique_ptr< SG::AuxElement::Decorator<float> > m_dec_GhostTruthAssociationFraction; + std::unique_ptr< SG::AuxElement::Decorator< ElementLink<xAOD::JetContainer> > > m_dec_GhostTruthAssociationLink; + + // Ntracks for QGTaggerTool --- + ToolHandle<InDet::IInDetTrackSelectionTool> m_trkSelectionTool; + ToolHandle<CP::ITrackVertexAssociationTool> m_trkVtxAssociationTool; + ToolHandle<IJetDecorator> m_qgTool; + bool m_decorateQGVariables; + std::unique_ptr< SG::AuxElement::Decorator<int> > m_dec_AssociatedNTracks; + std::unique_ptr< SG::AuxElement::Decorator<float> > m_dec_AssociatedTracksWidth; + std::unique_ptr< SG::AuxElement::Decorator<float> >m_dec_AssociatedTracksC1; + std::unique_ptr< SG::AuxElement::Decorator<int> > m_dec_Associated_truthjet_nCharged; + std::unique_ptr< SG::AuxElement::Decorator<float> > m_dec_Associated_truthjet_pt; + std::unique_ptr< SG::AuxElement::Decorator<float> > m_dec_Associated_truthjet_eta; + + //// Large-R jet truth labeling @author jveatch@cern.ch and tnobe@cern.ch + ToolHandle<JetTruthLabelingTool> m_jetTruthLabelingTool; + bool m_decoratetruthlabel; + std::unique_ptr< SG::AuxElement::Decorator<int> > m_dec_Label; + std::unique_ptr< SG::AuxElement::Decorator<float> > m_dec_dRW; + std::unique_ptr< SG::AuxElement::Decorator<float> > m_dec_dRZ; + std::unique_ptr< SG::AuxElement::Decorator<float> > m_dec_dRH; + std::unique_ptr< SG::AuxElement::Decorator<float> > m_dec_dRTop; + std::unique_ptr< SG::AuxElement::Decorator<int> > m_dec_NB; + std::unique_ptr< SG::AuxElement::Decorator<float> > m_dec_TruthJetMass; + std::string m_truthLabelName; + }; } diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/PFlowAugmentationTool.cxx b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/PFlowAugmentationTool.cxx index a784d88025ea902a29963647f46564d9f17c8473..7a26592f7c1436de4cf109a94c88101d2c3ead45 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/PFlowAugmentationTool.cxx +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/PFlowAugmentationTool.cxx @@ -5,20 +5,18 @@ /////////////////////////////////////////////////////////////////// // PFlowAugmentationTool.cxx, (c) ATLAS Detector software /////////////////////////////////////////////////////////////////// -// Author: Fabrice Balli (fabrice.balli@cern.ch) +// Author: Fabrice Balli (fabrice.balli@cern.ch), Chris Young (christopher.young@cern.ch) // #include "PFlowAugmentationTool.h" -#include "xAODTracking/VertexContainer.h" -namespace DerivationFramework { +#include "StoreGate/WriteDecorHandle.h" -const static SG::AuxElement::Decorator<char> dec_PVmatched("DFCommonPFlow_PVMatched"); -const static SG::AuxElement::Decorator<float> dec_corrP4_pt("DFCommonPFlow_CaloCorrectedPt"); +namespace DerivationFramework { PFlowAugmentationTool::PFlowAugmentationTool(const std::string& t, - const std::string& n, - const IInterface* p) : + const std::string& n, + const IInterface* p) : AthAlgTool(t,n,p), m_weightPFOTool("CP::WeightPFOTool/WeightPFOTool") { @@ -31,6 +29,16 @@ const static SG::AuxElement::Decorator<float> dec_corrP4_pt("DFCommonPFlow_CaloC StatusCode PFlowAugmentationTool::initialize() { + ATH_CHECK(m_vertexContainer_key.initialize()); + ATH_CHECK(m_pfoContainer_key.initialize()); + ATH_CHECK(m_PVmatchedKey.initialize()); + ATH_CHECK(m_corrP4_ptKey.initialize()); + ATH_CHECK(m_z0Key.initialize()); + ATH_CHECK(m_vzKey.initialize()); + ATH_CHECK(m_d0Key.initialize()); + ATH_CHECK(m_thetaKey.initialize()); + ATH_CHECK(m_envWeightKey.initialize()); + return StatusCode::SUCCESS; } @@ -43,17 +51,23 @@ const static SG::AuxElement::Decorator<float> dec_corrP4_pt("DFCommonPFlow_CaloC { // Get the vertex. - const xAOD::VertexContainer* pvcont(0); const xAOD::Vertex* pv(0); - ATH_CHECK(evtStore()->retrieve(pvcont, "PrimaryVertices")); + + auto vertexContainer = SG::makeHandle (m_vertexContainer_key); + if (!vertexContainer.isValid()){ + ATH_MSG_WARNING("Invalid xAOD::VertexContainer datahandle" + << m_vertexContainer_key.key()); + return StatusCode::FAILURE; + } + auto pvcont = vertexContainer.cptr(); if ( pvcont == 0 || pvcont->size()==0 ) { ATH_MSG_WARNING(" Failed to retrieve PrimaryVertices collection" ); return StatusCode::FAILURE; } for (const auto& vx : *pvcont) { if (vx->vertexType() == xAOD::VxType::PriVtx) { - pv = vx; - break; + pv = vx; + break; }//If we have a vertex of type primary vertex }//iterate over the vertices and check their type @@ -62,50 +76,71 @@ const static SG::AuxElement::Decorator<float> dec_corrP4_pt("DFCommonPFlow_CaloC if (pv == nullptr) { ATH_MSG_DEBUG("Could not find a primary vertex in this event" ); for (auto theVertex : *pvcont) { - if (xAOD::VxType::NoVtx == theVertex->vertexType() ) { - pv = theVertex; - break; - } + if (xAOD::VxType::NoVtx == theVertex->vertexType() ) { + pv = theVertex; + break; + } } if (nullptr == pv) { - ATH_MSG_WARNING("Found neither PriVtx nor NoVtx in this event" ); + ATH_MSG_WARNING("Found neither PriVtx nor NoVtx in this event" ); } } - const xAOD::PFOContainer* cpfos = evtStore()->retrieve< const xAOD::PFOContainer >("JetETMissChargedParticleFlowObjects"); + SG::WriteDecorHandle<xAOD::PFOContainer,char> dec_PVmatched(m_PVmatchedKey); + SG::WriteDecorHandle<xAOD::PFOContainer,float> dec_corrP4_pt(m_corrP4_ptKey); + SG::WriteDecorHandle<xAOD::PFOContainer,float> dec_z0(m_z0Key); + SG::WriteDecorHandle<xAOD::PFOContainer,float> dec_vz(m_vzKey); + SG::WriteDecorHandle<xAOD::PFOContainer,float> dec_d0(m_d0Key); + SG::WriteDecorHandle<xAOD::PFOContainer,float> dec_theta(m_thetaKey); + SG::WriteDecorHandle<xAOD::PFOContainer,float> dec_envWeight(m_envWeightKey); + + auto pfoContainer = SG::makeHandle (m_pfoContainer_key); + if (!pfoContainer.isValid()){ + ATH_MSG_WARNING("Invalid xAOD::PFOContainer datahandle" + << m_pfoContainer_key.key()); + return StatusCode::FAILURE; + } + auto cpfos = pfoContainer.cptr(); + for ( const xAOD::PFO* cpfo : *cpfos ) { if ( cpfo == 0 ) { - ATH_MSG_WARNING("Have NULL pointer to charged PFO"); - continue; + ATH_MSG_WARNING("Have NULL pointer to charged PFO"); + continue; } const xAOD::TrackParticle* ptrk = cpfo->track(0); if ( ptrk == 0 ) { - ATH_MSG_WARNING("Skipping charged PFO with null track pointer."); - continue; + ATH_MSG_WARNING("Skipping charged PFO with null track pointer."); + continue; } - float weight = 1.0; + // decorate the track properties + dec_z0(*cpfo) = ptrk->z0(); + dec_vz(*cpfo) = ptrk->vz(); + dec_d0(*cpfo) = ptrk->d0(); + dec_theta(*cpfo) = ptrk->theta(); bool matchedToPrimaryVertex = false; //vtz.z() provides z of that vertex w.r.t the center of the beamspot (z = 0). Thus we correct the track z0 to be w.r.t z = 0 float z0 = ptrk->z0() + ptrk->vz(); if (pv) { - z0 = z0 - pv->z(); - float theta = ptrk->theta(); - if ( fabs(z0*sin(theta)) < m_z0sinthcut ) { - matchedToPrimaryVertex = true; - } + z0 = z0 - pv->z(); + float theta = ptrk->theta(); + if ( fabs(z0*sin(theta)) < m_z0sinthcut ) { + matchedToPrimaryVertex = true; + } }// if pv available + //find the weights from the tool int isInDenseEnvironment = false; - bool gotVariable = cpfo->attribute(xAOD::PFODetails::PFOAttributes::eflowRec_isInDenseEnvironment,isInDenseEnvironment); - if(gotVariable && isInDenseEnvironment){ + float weight = 1.0; + if(cpfo->attribute(xAOD::PFODetails::PFOAttributes::eflowRec_isInDenseEnvironment,isInDenseEnvironment)){ ATH_CHECK( m_weightPFOTool->fillWeight( *cpfo, weight ) ); } - // generate static decorators to avoid multiple lookups + // decorate the computed variables dec_PVmatched(*cpfo) = matchedToPrimaryVertex; dec_corrP4_pt(*cpfo) = weight*cpfo->pt(); + dec_envWeight(*cpfo) = weight; } return StatusCode::SUCCESS; diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/PFlowAugmentationTool.h b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/PFlowAugmentationTool.h index 825ee87348a626b3dbb35afd33d4d8bea21f21e1..5d65ad1528aa18ad4f14368cd62ff429a7380e46 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/PFlowAugmentationTool.h +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/PFlowAugmentationTool.h @@ -17,6 +17,10 @@ #include "DerivationFrameworkInterfaces/IAugmentationTool.h" #include "GaudiKernel/ToolHandle.h" +#include "StoreGate/WriteDecorHandleKey.h" + +#include "xAODTracking/Vertex.h" +#include "xAODTracking/VertexContainer.h" #include <xAODPFlow/PFOContainer.h> #include <PFlowUtils/IWeightPFOTool.h> @@ -36,6 +40,17 @@ namespace DerivationFramework { ToolHandle<CP::IWeightPFOTool> m_weightPFOTool; /// Retrieval tool bool m_useChargedWeights; //If true, them we make use of the charged PFO weighting scheme + + SG::ReadHandleKey<xAOD::VertexContainer> m_vertexContainer_key{this, "VertexContainer", "PrimaryVertices", "Input vertex container"}; + SG::ReadHandleKey<xAOD::PFOContainer> m_pfoContainer_key{this, "JetETMissChargedParticleFlowObjects", "JetETMissChargedParticleFlowObjects", "Input charged PFO"}; + + SG::WriteDecorHandleKey<xAOD::PFOContainer> m_PVmatchedKey {this, "PVmatchedKey", "JetETMissChargedParticleFlowObjects.DFCommonPFlow_PVMatched", "Boolean indicating if PFO was matched to PV "}; + SG::WriteDecorHandleKey<xAOD::PFOContainer> m_corrP4_ptKey {this, "m_corrP4_ptKey", "JetETMissChargedParticleFlowObjects.DFCommonPFlow_CaloCorrectedPt", "Decoration for weighted charged PFO pt"}; + SG::WriteDecorHandleKey<xAOD::PFOContainer> m_z0Key {this, "m_z0Key", "JetETMissChargedParticleFlowObjects.DFCommonPFlow_z0", "Decoration for track z0"}; + SG::WriteDecorHandleKey<xAOD::PFOContainer> m_vzKey{this, "m_vzKey","JetETMissChargedParticleFlowObjects.DFCommonPFlow_vz", "Decoration for track vz"}; + SG::WriteDecorHandleKey<xAOD::PFOContainer> m_d0Key{this, "m_d0Key","JetETMissChargedParticleFlowObjects.DFCommonPFlow_d0", "Decoration for track d0"}; + SG::WriteDecorHandleKey<xAOD::PFOContainer> m_thetaKey{this, "m_thetaKey","JetETMissChargedParticleFlowObjects.DFCommonPFlow_theta", "Decoration for track theta"}; + SG::WriteDecorHandleKey<xAOD::PFOContainer> m_envWeightKey{this, "m_envWeightKey","JetETMissChargedParticleFlowObjects.DFCommonPFlow_envWeight", "Decoration for weight for dense environments"}; }; } diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/TVAAugmentationTool.cxx b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/TVAAugmentationTool.cxx new file mode 100644 index 0000000000000000000000000000000000000000..8793166274dfad6f83daf2376634205c1f73467c --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/TVAAugmentationTool.cxx @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + */ + +#include "TVAAugmentationTool.h" +#include "xAODTracking/TrackParticleContainer.h" + +namespace DerivationFramework { + + TVAAugmentationTool::TVAAugmentationTool( + const std::string& t, + const std::string& n, + const IInterface* p): + AthAlgTool(t, n, p) + { + declareInterface<IAugmentationTool>(this); + declareProperty("LinkName", m_linkName, "The name of the output links"); + declareProperty("TrackName", m_trackName="InDetTrackParticles"); + declareProperty("VertexName", m_vertexName="PrimaryVertices"); + declareProperty("TVATool", m_tool); + } + + StatusCode TVAAugmentationTool::initialize() + { + ATH_MSG_INFO("Initialising TVAAugmentationTool " << name() ); + ATH_CHECK( m_tool.retrieve() ); + + m_vtxDec = std::make_unique<SG::AuxElement::Decorator<vtxLink_t>>(m_linkName); + return StatusCode::SUCCESS; + } + + StatusCode TVAAugmentationTool::addBranches() const + { + const xAOD::VertexContainer* vertices = nullptr; + ATH_CHECK(evtStore()->retrieve(vertices, m_vertexName) ); + const xAOD::TrackParticleContainer* tracks = nullptr; + ATH_CHECK(evtStore()->retrieve(tracks, m_trackName) ); + + xAOD::TrackVertexAssociationMap matchMap = m_tool->getMatchMap(*tracks, *vertices); + + for (const xAOD::Vertex* ivtx : *vertices) + for (const xAOD::TrackParticle* itrk : matchMap[ivtx]) + (*m_vtxDec)(*itrk).toContainedElement(*vertices, ivtx); + + return StatusCode::SUCCESS; + } +} //> end namespace DerivationFramework diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/TVAAugmentationTool.h b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/TVAAugmentationTool.h new file mode 100644 index 0000000000000000000000000000000000000000..2b2680b5ca9d6e186e6cdabacf6eba507988f390 --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/TVAAugmentationTool.h @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + */ + +#ifndef DERIVATIONFRAMEWORK_TVAAUGMENTATIONTOOL_H +#define DERIVATIONFRAMEWORK_TVAAUGMENTATIONTOOL_H + +#include "AthenaBaseComps/AthAlgTool.h" +#include "DerivationFrameworkInterfaces/IAugmentationTool.h" +#include "AsgTools/ToolHandle.h" +#include "TrackVertexAssociationTool/ITrackVertexAssociationTool.h" +#include "AthLinks/ElementLink.h" +#include "xAODTracking/VertexContainer.h" +#include <memory> + +namespace DerivationFramework { + class TVAAugmentationTool : public AthAlgTool, virtual public IAugmentationTool + { + public: + TVAAugmentationTool(const std::string& t, const std::string& n, const IInterface* p); + + virtual StatusCode initialize(); + virtual StatusCode addBranches() const; + private: + // Properties + std::string m_linkName; + std::string m_trackName; + std::string m_vertexName; + ToolHandle<CP::ITrackVertexAssociationTool> m_tool; + // Internals + using vtxLink_t = ElementLink<xAOD::VertexContainer>; + std::unique_ptr<SG::AuxElement::Decorator<vtxLink_t>> m_vtxDec; + }; //> end class TVAAugmentationTool +} //> end namespace DerivationFramework + +#endif //> !DERIVATIONFRAMEWORK_TVAAUGMENTATIONTOOL_H diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/components/DerivationFrameworkJetEtMiss_entries.cxx b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/components/DerivationFrameworkJetEtMiss_entries.cxx index 26b4c0dc8ca75711c89e293e514000dff1524a50..2eb23410166ba3313b5a12f8c6ef9c2dd3ec4621 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/components/DerivationFrameworkJetEtMiss_entries.cxx +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/components/DerivationFrameworkJetEtMiss_entries.cxx @@ -4,6 +4,9 @@ #include "../METTriggerAugmentationTool.h" #include "../ViewContainerThinning.h" #include "../JetExternalAssocTool.h" +#include "../BadBatmanAugmentationTool.h" +#include "../DistanceInTrainAugmentationTool.h" +#include "../TVAAugmentationTool.h" using namespace DerivationFramework; @@ -13,4 +16,6 @@ DECLARE_COMPONENT( PFlowAugmentationTool ) DECLARE_COMPONENT( METTriggerAugmentationTool ) DECLARE_COMPONENT( ViewContainerThinning ) DECLARE_COMPONENT( JetExternalAssocTool ) - +DECLARE_COMPONENT( BadBatmanAugmentationTool ) +DECLARE_COMPONENT( DistanceInTrainAugmentationTool ) +DECLARE_COMPONENT( TVAAugmentationTool ) diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkPhys/share/PHYS.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkPhys/share/PHYS.py index ea86d9cdce3d23fb9511562760afb7fb219f4979..6aa324cd3280e6d376fa62a2584a0a1a5ab5bab3 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkPhys/share/PHYS.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkPhys/share/PHYS.py @@ -172,16 +172,16 @@ reducedJetList = ["AntiKt2PV0TrackJets","AntiKt4PV0TrackJets"] if (DerivationFrameworkIsMonteCarlo): OutputJets["PHYS"].append("AntiKt10TruthTrimmedPtFrac5SmallR20Jets") -# replaceAODReducedJets(reducedJetList,SeqPHYS,"PHYS") -# add_largeR_truth_jets = DerivationFrameworkIsMonteCarlo and not hasattr(SeqPHYS,'jetalgAntiKt10TruthTrimmedPtFrac5SmallR20') -# addDefaultTrimmedJets(SeqPHYS,"PHYS",dotruth=add_largeR_truth_jets) +replaceAODReducedJets(reducedJetList,SeqPHYS,"PHYS") +add_largeR_truth_jets = DerivationFrameworkIsMonteCarlo and not hasattr(SeqPHYS,'jetalgAntiKt10TruthTrimmedPtFrac5SmallR20') +addDefaultTrimmedJets(SeqPHYS,"PHYS",dotruth=add_largeR_truth_jets) # Add large-R jet truth labeling -# if (DerivationFrameworkIsMonteCarlo): -# addJetTruthLabel(jetalg="AntiKt10LCTopoTrimmedPtFrac5SmallR20",sequence=SeqPHYS,algname="JetTruthLabelingAlg",labelname="R10TruthLabel_R21Consolidated") +if (DerivationFrameworkIsMonteCarlo): + addJetTruthLabel(jetalg="AntiKt10LCTopoTrimmedPtFrac5SmallR20",sequence=SeqPHYS,algname="JetTruthLabelingAlg",labelname="R10TruthLabel_R21Consolidated") -# addQGTaggerTool(jetalg="AntiKt4EMTopo",sequence=SeqPHYS,algname="QGTaggerToolAlg") -# addQGTaggerTool(jetalg="AntiKt4EMPFlow",sequence=SeqPHYS,algname="QGTaggerToolPFAlg") +addQGTaggerTool(jetalg="AntiKt4EMTopo",sequence=SeqPHYS,algname="QGTaggerToolAlg") +addQGTaggerTool(jetalg="AntiKt4EMPFlow",sequence=SeqPHYS,algname="QGTaggerToolPFAlg") # fJVT # getPFlowfJVT(jetalg='AntiKt4EMPFlow',sequence=SeqPHYS, algname='PHYSJetForwardPFlowJvtToolAlg') @@ -274,7 +274,7 @@ PHYSSlimmingHelper.SmartCollections = ["Electrons", "TauJets", "DiTauJets", #"DiTauJetsLowPt", - #"AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets", + "AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets", #"AntiKtVR30Rmax4Rmin02TrackJets_BTagging201903", #"BTagging_AntiKtVR30Rmax4Rmin02Track_201903" ] diff --git a/PhysicsAnalysis/Interfaces/JetAnalysisInterfaces/JetAnalysisInterfaces/IJetJvtEfficiency.h b/PhysicsAnalysis/Interfaces/JetAnalysisInterfaces/JetAnalysisInterfaces/IJetJvtEfficiency.h index cc12cce119faacc7e6eba9d3b39abcd97e023570..45fba3de3fdb680449166d84f6a9113d00b00893 100644 --- a/PhysicsAnalysis/Interfaces/JetAnalysisInterfaces/JetAnalysisInterfaces/IJetJvtEfficiency.h +++ b/PhysicsAnalysis/Interfaces/JetAnalysisInterfaces/JetAnalysisInterfaces/IJetJvtEfficiency.h @@ -54,10 +54,10 @@ public: //Checks if the jet passes the jvt cut threshold. //Uses maximum validity range by default, but there is a configurable parameter - virtual bool passesJvtCut(const xAOD::Jet& jet) = 0; + virtual bool passesJvtCut(const xAOD::Jet& jet) const = 0; //Checks if the jet lies in the pt and eta range where Jvt is valid. - virtual bool isInRange(const xAOD::Jet& jet) = 0; + virtual bool isInRange(const xAOD::Jet& jet) const = 0; //returns actual jvtthreshold virtual float getJvtThresh() const = 0; diff --git a/PhysicsAnalysis/JetMissingEtID/JetSelectorTools/CMakeLists.txt b/PhysicsAnalysis/JetMissingEtID/JetSelectorTools/CMakeLists.txt index 1cdcdf6237b00e83ee19992733f760026774d2eb..773ec982b3f06f1297adfcbab9b30151d085d9f7 100644 --- a/PhysicsAnalysis/JetMissingEtID/JetSelectorTools/CMakeLists.txt +++ b/PhysicsAnalysis/JetMissingEtID/JetSelectorTools/CMakeLists.txt @@ -36,7 +36,7 @@ atlas_add_library( JetSelectorToolsLib if( NOT XAOD_STANDALONE ) atlas_add_component( JetSelectorTools - src/components/*.cxx + src/*.h src/*.cxx src/components/*.cxx LINK_LIBRARIES GaudiKernel JetSelectorToolsLib ) endif() diff --git a/PhysicsAnalysis/JetMissingEtID/JetSelectorTools/src/EventCleaningTestAlg.h b/PhysicsAnalysis/JetMissingEtID/JetSelectorTools/src/EventCleaningTestAlg.h index d57a5bc73832caf6a049d04b00580169e9f24ffe..b3dee4bb7bd76b93a6d8d60dfe812b53ea6d7150 100644 --- a/PhysicsAnalysis/JetMissingEtID/JetSelectorTools/src/EventCleaningTestAlg.h +++ b/PhysicsAnalysis/JetMissingEtID/JetSelectorTools/src/EventCleaningTestAlg.h @@ -27,7 +27,7 @@ class EventCleaningTestAlg : public AthAlgorithm public: /// Standard algorithm constructor - EventCleaningTestAlg(const std::string& name, ISvcLocator* svcLoc) override; + EventCleaningTestAlg(const std::string& name, ISvcLocator* svcLoc); /// Initialize the algorithm virtual StatusCode initialize() override; diff --git a/PhysicsAnalysis/JetMissingEtID/JetSelectorTools/src/components/JetSelectorTools_entries.cxx b/PhysicsAnalysis/JetMissingEtID/JetSelectorTools/src/components/JetSelectorTools_entries.cxx index e9778688c98155bcab6e059caddef60b9cb00289..126faf470d07f016a8e9473e68fbd7404cdeaadc 100644 --- a/PhysicsAnalysis/JetMissingEtID/JetSelectorTools/src/components/JetSelectorTools_entries.cxx +++ b/PhysicsAnalysis/JetMissingEtID/JetSelectorTools/src/components/JetSelectorTools_entries.cxx @@ -1,6 +1,7 @@ #include "JetSelectorTools/JetCleaningTool.h" #include "JetSelectorTools/EventCleaningTool.h" +#include "../EventCleaningTestAlg.h" DECLARE_COMPONENT( JetCleaningTool ) DECLARE_COMPONENT( ECUtils::EventCleaningTool ) - +DECLARE_COMPONENT( EventCleaningTestAlg ) diff --git a/PhysicsAnalysis/MuonID/MuonSelectorTools/Root/MuonSelectionTool.cxx b/PhysicsAnalysis/MuonID/MuonSelectorTools/Root/MuonSelectionTool.cxx index e4f059a355f00ac836064be076fcdd390aded78e..a75df787ea720fcea5c66e545741c06356db4b01 100644 --- a/PhysicsAnalysis/MuonID/MuonSelectorTools/Root/MuonSelectionTool.cxx +++ b/PhysicsAnalysis/MuonID/MuonSelectorTools/Root/MuonSelectionTool.cxx @@ -1262,11 +1262,11 @@ namespace CP { float symmetric_eta = std::abs( mu.eta() ); float pt = mu.pt() / 1000.0; // GeV // Impose pT and eta cuts; the bounds of the cut maps - if( pt < 4.0 || symmetric_eta>2.5 ) return false; + if( pt < 4.0 || symmetric_eta >= 2.5 ) return false; ATH_MSG_VERBOSE( "Muon is passing tight WP kinematic cuts with pT,eta " << mu.pt() << " , " << mu.eta() ); // ** Low pT specific cuts ** // - if( pt > 4.0 && pt <= 20.0 ){ + if( pt < 20.0 ){ double rhoCut = m_tightWP_lowPt_rhoCuts->Interpolate( pt, symmetric_eta ); double qOverPCut = m_tightWP_lowPt_qOverPCuts->Interpolate( pt , symmetric_eta ); @@ -1287,7 +1287,7 @@ namespace CP { } // ** Medium pT specific cuts ** // - else if ( pt > 20.0 && pt <= 100.0 ) { + else if ( pt < 100.0 ) { double rhoCut = m_tightWP_mediumPt_rhoCuts->Interpolate( pt , symmetric_eta ); // ATH_MSG_VERBOSE( "Applying tight WP cuts to a medium pt muon with (pt,eta) (" << pt << "," << mu.eta() << ")" ); @@ -1302,7 +1302,7 @@ namespace CP { } // ** High pT specific cuts - else if ( pt > 100.0 && pt <= 500.0 ){ + else if ( pt < 500.0 ){ // ATH_MSG_VERBOSE( "Applying tight WP cuts to a high pt muon with (pt,eta) (" << pt << "," << mu.eta() << ")" ); // No interpolation, since bins with -1 mean we should cut really loose diff --git a/Projects/AnalysisBase/externals.txt b/Projects/AnalysisBase/externals.txt index 0e7e510b504d04868d4c91e1d479b41534cab601..dbecc1c4cf52efe7dc1e804d68a4ea6bd6f1289a 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.68 +AnalysisBaseExternalsVersion = 2.0.69 diff --git a/Projects/AthDataQuality/externals.txt b/Projects/AthDataQuality/externals.txt index 8a3575cd65ea15bf9d048d1da275584579eb4f9d..c5635ff6b2f3803e1dc589507f94c88555a4d03c 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.68 +AtlasExternalsVersion = 2.0.69 diff --git a/Projects/AthGeneration/externals.txt b/Projects/AthGeneration/externals.txt index 06658d1ef1da42983195800e139288eb42f60c52..e7e6d7f962e772c0bc1f3059c2fced13413c9ed2 100644 --- a/Projects/AthGeneration/externals.txt +++ b/Projects/AthGeneration/externals.txt @@ -6,7 +6,7 @@ # forbidden. # The version of atlas/atlasexternals to use: -AthGenerationExternalsVersion = 2.0.68 +AthGenerationExternalsVersion = 2.0.69 # The version of atlas/Gaudi to use: GaudiVersion = v33r1.002 diff --git a/Projects/AthSimulation/externals.txt b/Projects/AthSimulation/externals.txt index ef09ae53f009c1cc587d2efe9b1d3fca51105021..4124d342967fc0c6de5ea614cfa1cd338372e983 100644 --- a/Projects/AthSimulation/externals.txt +++ b/Projects/AthSimulation/externals.txt @@ -6,7 +6,7 @@ # forbidden. # The version of atlas/atlasexternals to use: -AthSimulationExternalsVersion = 2.0.68 +AthSimulationExternalsVersion = 2.0.69 # The version of atlas/Gaudi to use: GaudiVersion = v33r1.002 diff --git a/Projects/Athena/externals.txt b/Projects/Athena/externals.txt index f2bf542d9d92299a616a147b0193667f7e7c64e9..0dee979c7170c32950ca674e785ddc130533db2c 100644 --- a/Projects/Athena/externals.txt +++ b/Projects/Athena/externals.txt @@ -6,7 +6,7 @@ # forbidden. # The version of atlas/atlasexternals to use: -AthenaExternalsVersion = 2.0.68 +AthenaExternalsVersion = 2.0.69 # The version of atlas/Gaudi to use: GaudiVersion = v33r1.002 diff --git a/Projects/Athena/package_filters.txt b/Projects/Athena/package_filters.txt index 4b3e7b0a29ba96b376d1e17d1ffddf75e9f506f4..2319dac52c2c1244a0b6031765b58423fa4cca4f 100644 --- a/Projects/Athena/package_filters.txt +++ b/Projects/Athena/package_filters.txt @@ -45,7 +45,6 @@ - PhysicsAnalysis/TopPhys/xAOD/.* - PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools - Reconstruction/Jet/JetAnalysisTools/JetTileCorrection -- Reconstruction/Jet/JetJvtEfficiency - Reconstruction/Jet/JetReclustering - Trigger/TrigAnalysis/TrigTauAnalysis/TrigTauMatching diff --git a/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetMaxOverMeanTool.h b/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetMaxOverMeanTool.h index 8fda755ce907cfe07acc63eb65613dfccc046206..5dc7e770777081d5cb8d03c007575e7d515268de 100644 --- a/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetMaxOverMeanTool.h +++ b/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetMaxOverMeanTool.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // HIJetMaxOverMeanTool.h @@ -20,21 +20,33 @@ /// //////////////////////////////////////////////////////////////////////////////// -#include "JetRec/JetModifierBase.h" +#include "StoreGate/WriteDecorHandleKey.h" +#include "JetInterface/IJetDecorator.h" +#include "AsgTools/AsgTool.h" -class HIJetMaxOverMeanTool : public JetModifierBase +class HIJetMaxOverMeanTool : public asg::AsgTool, + virtual public IJetDecorator { ASG_TOOL_CLASS0(HIJetMaxOverMeanTool) public: - + HIJetMaxOverMeanTool(const std::string& t); - /// \brief Implementing abstract methods from base - int modifyJet(xAOD::Jet& jet) const; + virtual StatusCode initialize() override; + + //The modifyJet function has to be replaced by decorate + //virtual int modifyJet(xAOD::Jet& ) const ; + virtual StatusCode decorate(const xAOD::JetContainer& jets) const override; + +private: + + SG::WriteDecorHandleKey< xAOD::JetContainer > m_jetMaxConstituentETKey { this, "MaxConstituentETKey", "MaxConstituentET", "Key for MaxConstituentET tile Jet attribute"}; + SG::WriteDecorHandleKey< xAOD::JetContainer > m_jetMaxOverMeanKey { this, "MaxOverMeanKey", "MaxOverMean", "Key for MaxOverMean tile Jet attribute"}; + + Gaudi::Property<std::string> m_jetContainerName{this, "JetContainer", "", "SG key for the input jet container"}; - }; #endif diff --git a/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetSignificanceTool.h b/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetSignificanceTool.h index ca4c4b019c0c25355d8509c5265587c4f40528f2..b97f8d17403053ea74cbb15f5cb7f4bc3f5bdde0 100644 --- a/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetSignificanceTool.h +++ b/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetSignificanceTool.h @@ -1,44 +1,52 @@ // this file is -*- C++ -*- /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ - -/** +/** @class HIJetSignificanceTool + @brief Modified by R.Longo on May 2020 to include new treatment for JetDecorations */ #ifndef HIJETREC_HIJETSIGNIFICANCETOOL_H #define HIJETREC_HIJETSIGNIFICANCETOOL_H -#include "JetRec/JetModifierBase.h" +#include <string> + +#include "StoreGate/WriteDecorHandleKey.h" +#include "JetInterface/IJetDecorator.h" +#include "AsgTools/AsgTool.h" + #include "AsgTools/ToolHandle.h" -class HIJetSignificanceTool: public JetModifierBase { +class HIJetSignificanceTool: public asg::AsgTool, + virtual public IJetDecorator +{ ASG_TOOL_CLASS0(HIJetSignificanceTool) -public: + public: HIJetSignificanceTool(const std::string & name); - virtual int modifyJet(xAOD::Jet& ) const ; - virtual StatusCode initialize(); - private: + //The modifyJet function has to be replaced by decorate + //virtual int modifyJet(xAOD::Jet& ) const ; + virtual StatusCode decorate(const xAOD::JetContainer& jets) const override; + private: -}; + //New set of keys for decorations now needed + jet container name to initialize them automatically -#endif -// DoxygenDocumentation -/*! @class JetLArHVMoment - @brief JetLArHVMoment + SG::WriteDecorHandleKey< xAOD::JetContainer > m_jetSignificanceKey { this, "SignificanceKey", "SIGNIFICANCE", "Key for significance Jet attribute"}; + SG::WriteDecorHandleKey< xAOD::JetContainer > m_jetCellSignificanceKey { this, "CellSignificanceKey", "CELL_SIGNIFICANCE", "Key for cell significance Jet attribute"}; + SG::WriteDecorHandleKey< xAOD::JetContainer > m_jetCellSigSamplingKey { this, "CellSigSamplingKey", "CELL_SIG_SAMPLING", "Key for cell significance sampling Jet attribute"}; + SG::WriteDecorHandleKey< xAOD::JetContainer > m_jetNMaxSigTileKey { this, "NMaxSigTileKey", "N_MAX_SIG_TILE", "Key for N max sig tile Jet attribute"}; + SG::WriteDecorHandleKey< xAOD::JetContainer > m_jetSignificanceTileKey { this, "SignificanceTileKey", "SIGNIFICANCE_TILE", "Key for significance tile Jet attribute"}; + Gaudi::Property<std::string> m_jetContainerName{this, "JetContainer", "", "SG key for the input jet container"}; -Calculates the proportion of cells in a bad LAr HV area, and gives an information about the energy affected. -(the second moment should change later). +}; -</table> -*/ +#endif diff --git a/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetMaxOverMeanTool.cxx b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetMaxOverMeanTool.cxx index b35841cdd579e3b3f7fe86f52ea8f0b1ef4559e3..72cd911bc7a18d9e444a7ed15d08b372e1aa7981 100644 --- a/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetMaxOverMeanTool.cxx +++ b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetMaxOverMeanTool.cxx @@ -1,32 +1,60 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ +#include "StoreGate/WriteDecorHandle.h" #include "HIJetRec/HIJetMaxOverMeanTool.h" -HIJetMaxOverMeanTool::HIJetMaxOverMeanTool(const std::string& t) : JetModifierBase(t) +HIJetMaxOverMeanTool::HIJetMaxOverMeanTool(const std::string& t) : asg::AsgTool(t) { + declareInterface<IJetDecorator>(this); } -int HIJetMaxOverMeanTool::modifyJet(xAOD::Jet& jet) const + +StatusCode HIJetMaxOverMeanTool::initialize() { - float max=-999; - float sum=0; - float count=0; - const xAOD::JetConstituentVector constituents = jet.getConstituents(); - for (xAOD::JetConstituentVector::iterator itr = constituents.begin(); itr != constituents.end(); ++itr) + if( m_jetContainerName.empty() ){ + ATH_MSG_ERROR("HIJetMaxOverMeanTool needs to have its input jet container name configured!"); + return StatusCode::FAILURE; + } + //Preped Jet Container Name + m_jetMaxConstituentETKey = m_jetContainerName + "." + m_jetMaxConstituentETKey.key(); + m_jetMaxOverMeanKey = m_jetContainerName + "." + m_jetMaxOverMeanKey.key(); + + ATH_CHECK( m_jetMaxConstituentETKey.initialize() ); + ATH_CHECK( m_jetMaxOverMeanKey.initialize() ); + + return StatusCode::SUCCESS; + +} + + StatusCode HIJetMaxOverMeanTool::decorate(const xAOD::JetContainer& jets) const + { + //Decorator handlers + SG::WriteDecorHandle<xAOD::JetContainer, float> jetMaxConstituentETDecorHandle( m_jetMaxConstituentETKey ); + SG::WriteDecorHandle<xAOD::JetContainer, float> jetMaxOverMeanDecorHandle ( m_jetMaxOverMeanKey ); + for(const xAOD::Jet* jet : jets) { - float et=(*itr)->e()/std::cosh((*itr)->eta()); - if(et > max) max=et; - sum+=et; - count++; + float max=-999; + float sum=0; + float count=0; + const xAOD::JetConstituentVector constituents = jet->getConstituents(); + for (xAOD::JetConstituentVector::iterator itr = constituents.begin(); itr != constituents.end(); ++itr) + { + float et=(*itr)->e()/std::cosh((*itr)->eta()); + if(et > max) max=et; + sum+=et; + count++; + } + if(count==0.) sum=0; + else sum/=count; + float D=0; + if(sum!=0.) D=max/sum; + + // set the attributes + jetMaxConstituentETDecorHandle(*jet) = max; + jetMaxOverMeanDecorHandle(*jet) = D; + } - if(count==0.) sum=0; - else sum/=count; - float D=0; - if(sum!=0.) D=max/sum; - - jet.setAttribute("MaxConstituentET",max); - jet.setAttribute("MaxOverMean",D); - return 0; + return StatusCode::SUCCESS; } diff --git a/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetSignificanceTool.cxx b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetSignificanceTool.cxx index f25acfedef4cfb5081298a5161bb6d9f5f506dd3..4195a81f156e7d89463b824c1efb8b0bf7c33012 100644 --- a/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetSignificanceTool.cxx +++ b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetSignificanceTool.cxx @@ -1,84 +1,116 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ +#include "StoreGate/WriteDecorHandle.h" #include "HIJetRec/HIJetSignificanceTool.h" #include "xAODCaloEvent/CaloCluster.h" HIJetSignificanceTool::HIJetSignificanceTool(const std::string& name) - : JetModifierBase(name) + : asg::AsgTool(name) { + declareInterface<IJetDecorator>(this); } StatusCode HIJetSignificanceTool::initialize() { + //First we chekc that jet container name is defined + if( m_jetContainerName.empty() ){ + ATH_MSG_ERROR("HIJetSignificanceTool needs to have its input jet container name configured!"); + return StatusCode::FAILURE; + } + //Preped Jet Container Name + m_jetSignificanceKey = m_jetContainerName + "." + m_jetSignificanceKey.key(); + m_jetCellSignificanceKey = m_jetContainerName + "." + m_jetCellSignificanceKey.key(); + m_jetCellSigSamplingKey = m_jetContainerName + "." + m_jetCellSigSamplingKey.key(); + m_jetNMaxSigTileKey = m_jetContainerName + "." + m_jetNMaxSigTileKey.key(); + m_jetSignificanceTileKey = m_jetContainerName + "." + m_jetSignificanceTileKey.key(); + + //Keys Initialization + ATH_CHECK( m_jetSignificanceKey.initialize() ); + ATH_CHECK( m_jetCellSignificanceKey.initialize() ); + ATH_CHECK( m_jetCellSigSamplingKey.initialize() ); + ATH_CHECK( m_jetNMaxSigTileKey.initialize() ); + ATH_CHECK( m_jetSignificanceTileKey.initialize() ); + return StatusCode::SUCCESS; } -int HIJetSignificanceTool::modifyJet( xAOD::Jet& jet ) const +StatusCode HIJetSignificanceTool::decorate( const xAOD::JetContainer& jets ) const { - float significance=0; - float cell_sig=0; - int cell_sig_sampling=-1; - int n_sig_max_tile=0; - float sig_tile=0; - float E_tile=0; - const xAOD::JetConstituentVector constituents = jet.getConstituents(); - - for(xAOD::JetConstituentVector::iterator itr = constituents.begin(); itr != constituents.end(); ++itr) - + //From decor keys to handlers + SG::WriteDecorHandle<xAOD::JetContainer, float> jetSignificanceDecorHandle( m_jetSignificanceKey ); + SG::WriteDecorHandle<xAOD::JetContainer, float> jetCellSignificanceDecorHandle ( m_jetCellSignificanceKey ); + SG::WriteDecorHandle<xAOD::JetContainer, float> jetCellSigSamplingDecorHandle ( m_jetCellSigSamplingKey ); + SG::WriteDecorHandle<xAOD::JetContainer, int > jetNMaxSigTileDecorHandle ( m_jetNMaxSigTileKey ); + SG::WriteDecorHandle<xAOD::JetContainer, float> jetSignificanceTileDecorHandle ( m_jetSignificanceTileKey ); + + //Here we were passing through JetConstituentVector. Now we access this directly and in a loop of jets, not for single instances + //const xAOD::JetConstituentVector constituents = jets.getConstituents(); + //for(xAOD::JetConstituentVector::iterator itr = constituents.begin(); itr != constituents.end(); ++itr) + for(const xAOD::Jet* jet : jets) { - const xAOD::CaloCluster* cl=static_cast<const xAOD::CaloCluster*>( itr->rawConstituent() ); - if( !cl) continue; + float significance=0; + float cell_sig=0; + int cell_sig_sampling=-1; + int n_sig_max_tile=0; + float sig_tile=0; + float E_tile=0; + // loop over raw constituents. Look for clusters + size_t num = jet->numConstituents(); + for(size_t i = 0; i < num; i++) + { + const xAOD::CaloCluster* cl=static_cast<const xAOD::CaloCluster*>( (jet->rawConstituent(i)) ); + if( !cl) continue; - double m=0; - double m2=0; - unsigned int samp_max=CaloSampling::Unknown; + double m=0; + double m2=0; + unsigned int samp_max=CaloSampling::Unknown; - double cl_E=cl->altE(); //signifiance moments were computed from unsubtracted cell energies - double sigma_cl=0; + double cl_E=cl->altE(); //signifiance moments were computed from unsubtracted cell energies + double sigma_cl=0; - for(unsigned int isample=12; isample<21; isample++) E_tile+=cl->eSample( (CaloSampling::CaloSample) isample); + for(unsigned int isample=12; isample<21; isample++) E_tile+=cl->eSample( (CaloSampling::CaloSample) isample); - if(cl->retrieveMoment(xAOD::CaloCluster::SIGNIFICANCE,m) ) - { - sigma_cl=cl_E/m; - significance+=sigma_cl*sigma_cl; - } - if(cl->retrieveMoment(xAOD::CaloCluster::CELL_SIG_SAMPLING,m2)) - { - samp_max=static_cast<unsigned int>(m2); - if(CaloSampling::getSamplingName(samp_max).find("Tile")!=std::string::npos) + if(cl->retrieveMoment(xAOD::CaloCluster::SIGNIFICANCE,m) ) { - n_sig_max_tile++; - sig_tile+=sigma_cl*sigma_cl; + sigma_cl=cl_E/m; + significance+=sigma_cl*sigma_cl; } - } - - if( cl->retrieveMoment(xAOD::CaloCluster::CELL_SIGNIFICANCE,m) ) - { - if( m > cell_sig ) + if(cl->retrieveMoment(xAOD::CaloCluster::CELL_SIG_SAMPLING,m2)) { - cell_sig=m; - if(samp_max!=CaloSampling::Unknown) cell_sig_sampling=samp_max; + samp_max=static_cast<unsigned int>(m2); + if(CaloSampling::getSamplingName(samp_max).find("Tile")!=std::string::npos) + { + n_sig_max_tile++; + sig_tile+=sigma_cl*sigma_cl; + } + } + + if( cl->retrieveMoment(xAOD::CaloCluster::CELL_SIGNIFICANCE,m) ) + { + if( m > cell_sig ) + { + cell_sig=m; + if(samp_max!=CaloSampling::Unknown) cell_sig_sampling=samp_max; + } } } - } - significance=jet.jetP4(xAOD::JetEMScaleMomentum).E()/std::sqrt(significance); - sig_tile=E_tile/std::sqrt(sig_tile); - - // set the attributes - jet.setAttribute<float>("SIGNIFICANCE",significance); - jet.setAttribute<float>("CELL_SIGNIFICANCE",cell_sig); - jet.setAttribute<int>("CELL_SIG_SAMPLING", cell_sig_sampling); - jet.setAttribute<int>("N_MAX_SIG_TILE", n_sig_max_tile); - jet.setAttribute<float>("SIGNIFICANCE_TILE", sig_tile); - - return 0; -} + significance=jet->jetP4(xAOD::JetEMScaleMomentum).E()/std::sqrt(significance); + sig_tile=E_tile/std::sqrt(sig_tile); + + // set the attributes + jetSignificanceDecorHandle(*jet) = significance; + jetCellSignificanceDecorHandle(*jet) = cell_sig; + jetCellSigSamplingDecorHandle(*jet) = cell_sig_sampling; + jetNMaxSigTileDecorHandle(*jet) = n_sig_max_tile; + jetSignificanceTileDecorHandle(*jet) = sig_tile; + }//End of loop over jets + return StatusCode::SUCCESS; +} diff --git a/Reconstruction/Jet/JetJvtEfficiency/CMakeLists.txt b/Reconstruction/Jet/JetJvtEfficiency/CMakeLists.txt index 3086a3fc54a8f8aa3f3448ab5a87cc60645cf1ca..29fdb6aca282106e42b1f9dd2ab5be6157e56352 100644 --- a/Reconstruction/Jet/JetJvtEfficiency/CMakeLists.txt +++ b/Reconstruction/Jet/JetJvtEfficiency/CMakeLists.txt @@ -13,6 +13,7 @@ endif() atlas_depends_on_subdirs( PUBLIC Control/AthToolSupport/AsgTools + Event/xAOD/xAODEventInfo Event/xAOD/xAODJet PhysicsAnalysis/AnalysisCommon/PATInterfaces PRIVATE @@ -27,7 +28,7 @@ atlas_add_library( JetJvtEfficiencyLib JetJvtEfficiency/*.h Root/*.cxx PUBLIC_HEADERS JetJvtEfficiency INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} AsgTools xAODJet PATInterfaces + LINK_LIBRARIES ${ROOT_LIBRARIES} AsgTools xAODJet xAODEventInfo JetAnalysisInterfacesLib PATInterfaces PRIVATE_LINK_LIBRARIES PathResolver ) if( NOT XAOD_STANDALONE ) @@ -43,3 +44,4 @@ atlas_add_dictionary( JetJvtEfficiencyDict # Install files from the package: atlas_install_data( share/*.root ) +atlas_install_python_modules( python/*.py ) \ No newline at end of file diff --git a/Reconstruction/Jet/JetJvtEfficiency/JetJvtEfficiency/JetJvtEfficiency.h b/Reconstruction/Jet/JetJvtEfficiency/JetJvtEfficiency/JetJvtEfficiency.h index 4fbc880773997f31dc430679a53e944a4d01638b..23239ec6ab16bf7038b97bf5de0a0ed2fc8a6eff 100644 --- a/Reconstruction/Jet/JetJvtEfficiency/JetJvtEfficiency/JetJvtEfficiency.h +++ b/Reconstruction/Jet/JetJvtEfficiency/JetJvtEfficiency/JetJvtEfficiency.h @@ -1,58 +1,59 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef JETJVTEFFICIENCYSCALEFACTORS_H_ #define JETJVTEFFICIENCYSCALEFACTORS_H_ -#include "JetJvtEfficiency/IJetJvtEfficiency.h" +#include "JetAnalysisInterfaces/IJetJvtEfficiency.h" #include "PATInterfaces/SystematicsTool.h" #include "AsgTools/AsgTool.h" -#include "TRandom3.h" + +#include "xAODEventInfo/EventInfo.h" #include <TH2.h> #include <string> +#include <memory> namespace CP { enum SystApplied { NONE, JVT_EFFICIENCY_DOWN, - JVT_EFFICIENCY_UP + JVT_EFFICIENCY_UP, + FJVT_EFFICIENCY_DOWN, + FJVT_EFFICIENCY_UP, + MVFJVT_EFFICIENCY_DOWN, + MVFJVT_EFFICIENCY_UP }; -class JetJvtEfficiency: public CP::IJetJvtEfficiency, public asg::AsgTool, public CP::SystematicsTool{ +class JetJvtEfficiency: public asg::AsgTool, public CP::SystematicsTool, virtual public CP::IJetJvtEfficiency { ASG_TOOL_CLASS( JetJvtEfficiency, CP::IJetJvtEfficiency) public: JetJvtEfficiency( const std::string& name); - virtual StatusCode initialize(); - virtual StatusCode finalize(); + virtual StatusCode initialize() override; StatusCode histInitialize(); - virtual CorrectionCode getEfficiencyScaleFactor(const xAOD::Jet& jet,float& sf); - virtual CorrectionCode getInefficiencyScaleFactor(const xAOD::Jet& jet,float& sf); - virtual CorrectionCode applyEfficiencyScaleFactor(const xAOD::Jet& jet); - virtual CorrectionCode applyInefficiencyScaleFactor(const xAOD::Jet& jet); - virtual CorrectionCode applyAllEfficiencyScaleFactor(const xAOD::IParticleContainer *jets,float& sf); - virtual CorrectionCode applyRandomDropping( const xAOD::Jet& jet ); - virtual CorrectionCode applyAllRandomDropping( const xAOD::IParticleContainer *jets); - - virtual bool passesJvtCut(const xAOD::Jet& jet); - virtual bool isInRange(const xAOD::Jet& jet); + virtual CorrectionCode getEfficiencyScaleFactor(const xAOD::Jet& jet,float& sf) override; + virtual CorrectionCode getInefficiencyScaleFactor(const xAOD::Jet& jet,float& sf) override; + virtual CorrectionCode applyEfficiencyScaleFactor(const xAOD::Jet& jet) override; + virtual CorrectionCode applyInefficiencyScaleFactor(const xAOD::Jet& jet) override; + virtual CorrectionCode applyAllEfficiencyScaleFactor(const xAOD::IParticleContainer *jets,float& sf) override; + virtual bool passesJvtCut(const xAOD::Jet& jet) const override; + virtual bool isInRange(const xAOD::Jet& jet) const override; - bool isAffectedBySystematic(const CP::SystematicVariation& var) const{return CP::SystematicsTool::isAffectedBySystematic(var);} - CP::SystematicSet affectingSystematics() const {return CP::SystematicsTool::affectingSystematics();} - CP::SystematicSet recommendedSystematics() const {return CP::SystematicsTool::recommendedSystematics();} - CP::SystematicCode applySystematicVariation(const CP::SystematicSet& set) {return CP::SystematicsTool::applySystematicVariation(set);} - CP::SystematicCode sysApplySystematicVariation(const CP::SystematicSet&); + bool isAffectedBySystematic(const CP::SystematicVariation& var) const override {return CP::SystematicsTool::isAffectedBySystematic(var);} + CP::SystematicSet affectingSystematics() const override {return CP::SystematicsTool::affectingSystematics();} + CP::SystematicSet recommendedSystematics() const override {return CP::SystematicsTool::recommendedSystematics();} + CP::SystematicCode applySystematicVariation(const CP::SystematicSet& set) override {return CP::SystematicsTool::applySystematicVariation(set);} + CP::SystematicCode sysApplySystematicVariation(const CP::SystematicSet&) override; - float getJvtThresh() const {return m_jvtCut;} - float getUserPtMax() const {return m_maxPtForJvt;} - void setRandomSeed(int seed); - StatusCode tagTruth(const xAOD::IParticleContainer *jets,const xAOD::IParticleContainer *truthJets); + float getJvtThresh() const override {return m_jvtCut;} + float getUserPtMax() const override {return m_maxPtForJvt;} + StatusCode tagTruth(const xAOD::IParticleContainer *jets,const xAOD::IParticleContainer *truthJets) override; private: @@ -62,23 +63,27 @@ private: std::string m_wp; std::string m_file; - SG::AuxElement::Decorator< float >* m_sfDec; - SG::AuxElement::Decorator< char >* m_dropDec; - TH2 *m_h_JvtHist; - TH2 *m_h_EffHist; + std::unique_ptr<SG::AuxElement::Decorator< float > > m_sfDec; + std::unique_ptr<SG::AuxElement::Decorator< char > > m_isHSDec; + std::unique_ptr<SG::AuxElement::ConstAccessor< char > > m_isHSAcc; + std::unique_ptr<TH2> m_h_JvtHist; + std::unique_ptr<TH2> m_h_EffHist; std::string m_sf_decoration_name; - std::string m_drop_decoration_name; + std::string m_isHS_decoration_name; + std::string m_truthJetContName; float m_jvtCut; + float m_jvtCutBorder; std::string m_jetJvtMomentName; std::string m_jetfJvtMomentName; + std::string m_jetMVfJvtMomentName; std::string m_jetEtaName; float m_maxPtForJvt; - TRandom3 m_rand; - std::string m_truthLabel; bool m_dofJVT; + bool m_doMVfJVT; bool m_doTruthRequirement; std::string m_ORdec; bool m_doOR; + bool m_useMuBinsSF; }; } /* namespace CP */ diff --git a/Reconstruction/Jet/JetJvtEfficiency/Root/JetJvtEfficiency.cxx b/Reconstruction/Jet/JetJvtEfficiency/Root/JetJvtEfficiency.cxx index 6f1d5ba09615c377cb02d8730628a105e7abda55..9909746ba03b1155196e2ed93b31a448f46de1cd 100644 --- a/Reconstruction/Jet/JetJvtEfficiency/Root/JetJvtEfficiency.cxx +++ b/Reconstruction/Jet/JetJvtEfficiency/Root/JetJvtEfficiency.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "JetJvtEfficiency/JetJvtEfficiency.h" @@ -12,40 +12,56 @@ namespace CP { -static SG::AuxElement::Decorator<char> isHS("isJvtHS"); -static SG::AuxElement::Decorator<char> isPU("isJvtPU"); +static SG::AuxElement::Decorator<char> isPUDec("isJvtPU"); JetJvtEfficiency::JetJvtEfficiency( const std::string& name): asg::AsgTool( name ), m_appliedSystEnum(NONE), + m_sfDec(nullptr), + m_isHSDec(nullptr), + m_isHSAcc(nullptr), m_h_JvtHist(nullptr), m_h_EffHist(nullptr), m_jvtCut(0), - m_rand(0) + m_jvtCutBorder(0) { - declareProperty( "WorkingPoint", m_wp = "Medium" ); - declareProperty( "SFFile",m_file="JetJvtEfficiency/Moriond2016_v2/JvtSFFile.root"); - //declareProperty( "SFFile",m_file="JetJvtEfficiency/JvtSFFile.root"); - declareProperty( "ScaleFactorDecorationName", m_sf_decoration_name = "JvtSF" ); - declareProperty( "RandomDropDecorationName", m_drop_decoration_name = "drop" ); - declareProperty( "JetJvtMomentName", m_jetJvtMomentName = "Jvt" ); - declareProperty( "JetfJvtMomentName", m_jetfJvtMomentName = "passFJVT" ); - declareProperty("OverlapDecorator", m_ORdec = "" ); - declareProperty( "JetEtaName", m_jetEtaName = "DetectorEta" ); - declareProperty( "MaxPtForJvt", m_maxPtForJvt = 60e3 ); - declareProperty( "TruthLabel", m_truthLabel = "isJvtHS" ); - applySystematicVariation(CP::SystematicSet()).ignore(); + declareProperty( "WorkingPoint", m_wp = "Default" ); + declareProperty( "SFFile", m_file="JetJvtEfficiency/Moriond2018/JvtSFFile_EMTopoJets.root" ); + declareProperty( "ScaleFactorDecorationName", m_sf_decoration_name = "JvtSF" ); + declareProperty( "JetJvtMomentName", m_jetJvtMomentName = "Jvt" ); + declareProperty( "JetfJvtMomentName", m_jetfJvtMomentName = "passFJVT" ); + declareProperty( "JetMVfJvtMomentName", m_jetMVfJvtMomentName = "passMVFJVT" ); + declareProperty( "OverlapDecorator", m_ORdec = "" ); + declareProperty( "JetEtaName", m_jetEtaName = "DetectorEta" ); + declareProperty( "MaxPtForJvt", m_maxPtForJvt = 120e3 ); + declareProperty( "DoTruthReq", m_doTruthRequirement = true ); + declareProperty( "TruthLabel", m_isHS_decoration_name = "isJvtHS" ); + declareProperty( "TruthJetContainerName", m_truthJetContName = "AntiKt4TruthJets" ); + declareProperty( "UseMuSFFormat", m_useMuBinsSF = false , "Use (mu,pT) or (|eta|,pT) binning for fJVT SFs" ); } StatusCode JetJvtEfficiency::initialize(){ - m_sfDec = new SG::AuxElement::Decorator< float>(m_sf_decoration_name); - m_dropDec = new SG::AuxElement::Decorator<char>(m_drop_decoration_name); + m_sfDec.reset(new SG::AuxElement::Decorator< float>(m_sf_decoration_name)); + m_isHSDec.reset(new SG::AuxElement::Decorator<char>(m_isHS_decoration_name)); + m_isHSAcc.reset(new SG::AuxElement::ConstAccessor<char>(m_isHS_decoration_name)); m_dofJVT = (m_file.find("fJvt") != std::string::npos); + m_doMVfJVT = (m_file.find("MVfJVT") != std::string::npos); m_doOR = (!m_ORdec.empty()); - m_doTruthRequirement = !(m_truthLabel.empty()); if (!m_doTruthRequirement) ATH_MSG_WARNING ( "No truth requirement will be performed, which is not recommended."); - if (m_wp=="Loose") m_jvtCut = 0.11; - else if (m_wp=="Medium") m_jvtCut = 0.59; + bool ispflow = (m_file.find("EMPFlow") != std::string::npos); + + if (m_wp=="Default" && m_useMuBinsSF) m_wp = "Loose"; + if (m_wp=="Default" && !ispflow) m_wp = "Medium"; + if (m_wp=="Default" && ispflow) m_wp = "Tight"; + + m_jvtCutBorder = -2.; + if (m_wp=="Loose" && !ispflow) m_jvtCut = 0.11; + else if (m_wp=="Medium" && ispflow) m_jvtCut = 0.2; + else if (m_wp=="Tight" && ispflow) m_jvtCut = 0.5; + else if (m_wp=="Medium"){ + m_jvtCut = 0.59; + m_jvtCutBorder = 0.11; + } else if (m_wp=="Tight") m_jvtCut = 0.91; else if (m_wp=="None") { m_jvtCut = -2; @@ -53,8 +69,11 @@ StatusCode JetJvtEfficiency::initialize(){ m_wp = "Medium"; } else { - ATH_MSG_ERROR("Invalid jvt working point name"); - return StatusCode::FAILURE; + // don't crash for fjvt WP names + if(!(m_dofJVT || m_doMVfJVT)){ + ATH_MSG_ERROR("Invalid jvt working point name"); + return StatusCode::FAILURE; + } } if (m_file.empty()) return StatusCode::SUCCESS; @@ -68,28 +87,71 @@ StatusCode JetJvtEfficiency::initialize(){ TFile *infile = TFile::Open(filename.c_str()); - if (m_wp=="Loose") m_h_JvtHist = dynamic_cast<TH2*>(infile->Get("JvtLoose")) ; - else if (m_wp=="Medium") m_h_JvtHist = dynamic_cast<TH2*>(infile->Get("JvtDefault")) ; - else if (m_wp=="Tight") m_h_JvtHist = dynamic_cast<TH2*>(infile->Get("JvtTight")) ; + std::string histname = "Jvt"; - m_h_JvtHist->SetDirectory(0); + if (m_wp=="Loose") histname+="Loose"; + else if (m_wp=="Medium") histname+="Default";//this is a legacy working point + else if (m_wp=="Tight") histname+="Tight"; + else if (m_wp=="Tighter") histname+="Tighter"; - if (m_wp=="Loose") m_h_EffHist = dynamic_cast<TH2*>(infile->Get("EffLoose")); - else if (m_wp=="Medium") m_h_EffHist = dynamic_cast<TH2*>(infile->Get("EffDefault")); - else if (m_wp=="Tight") m_h_EffHist = dynamic_cast<TH2*>(infile->Get("EffTight")); + m_h_JvtHist.reset( dynamic_cast<TH2*>(infile->Get(histname.c_str())) ); + if(!m_h_JvtHist){ + ATH_MSG_ERROR("Histogram does not exist! " << histname << " If you are using Default please update to Loose"); + return StatusCode::FAILURE; + } + m_h_JvtHist->SetDirectory(0); + histname.replace(0,3,"Eff"); + m_h_EffHist.reset( dynamic_cast<TH2*>(infile->Get(histname.c_str())) ); m_h_EffHist->SetDirectory(0); - if (!addAffectingSystematic(JvtEfficiencyUp,true) || !addAffectingSystematic(JvtEfficiencyDown,true)) { - ATH_MSG_ERROR("failed to set up Jvt systematics"); + // Check consistency between config file and requested SF binning + if ( !(m_dofJVT || m_doMVfJVT) && m_useMuBinsSF ){ + ATH_MSG_ERROR( "Mismatch in SF format. Please set UseMuSFFormat to false for JVT."); + return StatusCode::FAILURE; + } + if( m_dofJVT || m_doMVfJVT ){ + if (m_useMuBinsSF && m_h_JvtHist->GetYaxis()->GetBinUpEdge(m_h_JvtHist->GetNbinsY())<=5. ){ + ATH_MSG_ERROR( "Mismatch in fJVT SF format. Please set UseMuSFFormat to false to match the current configuration file."); + return StatusCode::FAILURE; + } + if (!m_useMuBinsSF && m_h_JvtHist->GetYaxis()->GetBinUpEdge(m_h_JvtHist->GetNbinsY())>5. ){ + ATH_MSG_ERROR( "Mismatch in fJVT SF format. Please set UseMuSFFormat to true to match the current configuration file"); + return StatusCode::FAILURE; + } + } + + if(m_h_JvtHist.get()==nullptr || m_h_EffHist.get()==nullptr) { + ATH_MSG_ERROR("Failed to retrieve histograms."); + return StatusCode::FAILURE; + } + + if (m_dofJVT){ + if ( !addAffectingSystematic(fJvtEfficiencyUp,true) + || !addAffectingSystematic(fJvtEfficiencyDown,true)) { + ATH_MSG_ERROR("failed to set up fJvt systematics"); + return StatusCode::FAILURE; + } + } else if (m_doMVfJVT){ + if ( !addAffectingSystematic(MVfJvtEfficiencyUp,true) + || !addAffectingSystematic(MVfJvtEfficiencyDown,true)) { + ATH_MSG_ERROR("failed to set up MVfJvt systematics"); + return StatusCode::FAILURE; + } + } else { + if (!addAffectingSystematic(JvtEfficiencyUp,true) + || !addAffectingSystematic(JvtEfficiencyDown,true)) { + ATH_MSG_ERROR("failed to set up Jvt systematics"); + return StatusCode::FAILURE; + } + } + + // Configure for nominal systematics + if (applySystematicVariation(CP::SystematicSet()) != CP::SystematicCode::Ok) { + ATH_MSG_ERROR("Could not configure for nominal settings"); return StatusCode::FAILURE; } - return StatusCode::SUCCESS; -} -StatusCode JetJvtEfficiency::finalize(){ - delete m_h_JvtHist; - delete m_h_EffHist; return StatusCode::SUCCESS; } @@ -98,13 +160,42 @@ CorrectionCode JetJvtEfficiency::getEfficiencyScaleFactor( const xAOD::Jet& jet, sf = 1; return CorrectionCode::OutOfValidityRange; } - int jetbin = m_h_JvtHist->FindBin(jet.pt(),fabs(jet.getAttribute<float>(m_jetEtaName))); + if (m_doTruthRequirement) { + if(!m_isHSAcc->isAvailable(jet)) { + ATH_MSG_ERROR("Truth tagging required but decoration not available. Please call JetJvtEfficiency::tagTruth(...) first."); + return CorrectionCode::Error; + } else { + if (!(*m_isHSAcc)(jet)) { + sf = 1; + return CorrectionCode::Ok; + } + } + } + + int jetbin = 0; + if( m_useMuBinsSF ){ // fJVT SFs used (pT,eta) binning, changed to (pT,mu) starting with 'Nov2019' calibration + const xAOD::EventInfo *eventInfo = nullptr; + if ( evtStore()->retrieve(eventInfo, "EventInfo").isFailure() ) + { + ATH_MSG_ERROR(" Could not retrieve EventInfo "); + return CorrectionCode::Error; + } + jetbin = m_h_JvtHist->FindBin(jet.pt(),eventInfo->actualInteractionsPerCrossing()); + } else { + jetbin = m_h_JvtHist->FindBin(jet.pt(),std::abs(jet.getAttribute<float>(m_jetEtaName))); + } + float baseFactor = m_h_JvtHist->GetBinContent(jetbin); float errorTerm = m_h_JvtHist->GetBinError(jetbin); - if (m_appliedSystEnum==JVT_EFFICIENCY_UP) baseFactor += errorTerm; - else if (m_appliedSystEnum==JVT_EFFICIENCY_DOWN) baseFactor -= errorTerm; - if (m_doTruthRequirement && !jet.auxdata<char>(m_truthLabel)) sf = 1; - else sf = baseFactor; + + if ( !m_dofJVT && !m_doMVfJVT && m_appliedSystEnum==JVT_EFFICIENCY_UP ) baseFactor += errorTerm; + else if ( !m_dofJVT && !m_doMVfJVT && m_appliedSystEnum==JVT_EFFICIENCY_DOWN ) baseFactor -= errorTerm; + else if ( m_dofJVT && !m_doMVfJVT && m_appliedSystEnum==FJVT_EFFICIENCY_UP ) baseFactor += errorTerm; + else if ( m_dofJVT && !m_doMVfJVT && m_appliedSystEnum==FJVT_EFFICIENCY_DOWN ) baseFactor -= errorTerm; + else if ( !m_dofJVT && m_doMVfJVT && m_appliedSystEnum==MVFJVT_EFFICIENCY_UP ) baseFactor += errorTerm; + else if ( !m_dofJVT && m_doMVfJVT && m_appliedSystEnum==MVFJVT_EFFICIENCY_DOWN ) baseFactor -= errorTerm; + + sf = baseFactor; return CorrectionCode::Ok; } @@ -113,17 +204,51 @@ CorrectionCode JetJvtEfficiency::getInefficiencyScaleFactor( const xAOD::Jet& je sf = 1; return CorrectionCode::OutOfValidityRange; } - int jetbin = m_h_JvtHist->FindBin(jet.pt(),fabs(jet.getAttribute<float>(m_jetEtaName))); + if (m_doTruthRequirement) { + if(!m_isHSAcc->isAvailable(jet)) { + ATH_MSG_ERROR("Truth tagging required but decoration not available. Please call JetJvtEfficiency::tagTruth(...) first."); + return CorrectionCode::Error; + } else { + if(!(*m_isHSAcc)(jet)) { + sf = 1; + return CorrectionCode::Ok; + } + } + } + + int jetbin = 0; + if( m_useMuBinsSF ){ + const xAOD::EventInfo *eventInfo = nullptr; + if ( evtStore()->retrieve(eventInfo, "EventInfo").isFailure() ) + { + ATH_MSG_ERROR(" Could not retrieve EventInfo "); + return CorrectionCode::Error; + } + jetbin = m_h_JvtHist->FindBin(jet.pt(),eventInfo->actualInteractionsPerCrossing()); + } else { + jetbin = m_h_JvtHist->FindBin(jet.pt(),std::abs(jet.getAttribute<float>(m_jetEtaName))); + } + float baseFactor = m_h_JvtHist->GetBinContent(jetbin); float effFactor = m_h_EffHist->GetBinContent(jetbin); float errorTerm = m_h_JvtHist->GetBinError(jetbin); float errorEffTerm = m_h_EffHist->GetBinError(jetbin); - if (m_appliedSystEnum==JVT_EFFICIENCY_UP) baseFactor += errorTerm; - else if (m_appliedSystEnum==JVT_EFFICIENCY_DOWN) baseFactor -= errorTerm; - if (m_appliedSystEnum==JVT_EFFICIENCY_UP) effFactor += errorEffTerm; - else if (m_appliedSystEnum==JVT_EFFICIENCY_DOWN) effFactor -= errorEffTerm; - if (m_doTruthRequirement && !jet.auxdata<char>(m_truthLabel)) sf = 1; - else sf = (1-baseFactor*effFactor)/(1-effFactor); + + if ( !m_dofJVT && !m_doMVfJVT && m_appliedSystEnum==JVT_EFFICIENCY_UP ) baseFactor += errorTerm; + else if ( !m_dofJVT && !m_doMVfJVT && m_appliedSystEnum==JVT_EFFICIENCY_DOWN ) baseFactor -= errorTerm; + else if ( m_dofJVT && !m_doMVfJVT && m_appliedSystEnum==FJVT_EFFICIENCY_UP ) baseFactor += errorTerm; + else if ( m_dofJVT && !m_doMVfJVT && m_appliedSystEnum==FJVT_EFFICIENCY_DOWN ) baseFactor -= errorTerm; + else if ( !m_dofJVT && m_doMVfJVT && m_appliedSystEnum==MVFJVT_EFFICIENCY_UP ) baseFactor += errorTerm; + else if ( !m_dofJVT && m_doMVfJVT && m_appliedSystEnum==MVFJVT_EFFICIENCY_DOWN ) baseFactor -= errorTerm; + + if ( !m_dofJVT && !m_doMVfJVT && m_appliedSystEnum==JVT_EFFICIENCY_UP ) effFactor += errorEffTerm; + else if ( !m_dofJVT && !m_doMVfJVT && m_appliedSystEnum==JVT_EFFICIENCY_DOWN ) effFactor -= errorEffTerm; + else if ( m_dofJVT && !m_doMVfJVT && m_appliedSystEnum==FJVT_EFFICIENCY_UP ) effFactor += errorEffTerm; + else if ( m_dofJVT && !m_doMVfJVT && m_appliedSystEnum==FJVT_EFFICIENCY_DOWN ) effFactor -= errorEffTerm; + else if ( !m_dofJVT && m_doMVfJVT && m_appliedSystEnum==MVFJVT_EFFICIENCY_UP ) effFactor += errorEffTerm; + else if ( !m_dofJVT && m_doMVfJVT && m_appliedSystEnum==MVFJVT_EFFICIENCY_DOWN ) effFactor -= errorEffTerm; + + sf = (1-baseFactor*effFactor)/(1-effFactor); return CorrectionCode::Ok; } @@ -144,22 +269,34 @@ CorrectionCode JetJvtEfficiency::applyInefficiencyScaleFactor(const xAOD::Jet& j CorrectionCode JetJvtEfficiency::applyAllEfficiencyScaleFactor(const xAOD::IParticleContainer *jets,float& sf) { sf = 1; const xAOD::JetContainer *truthJets = nullptr; - if( evtStore()->retrieve(truthJets, "AntiKt4TruthJets").isFailure()) { - ATH_MSG_WARNING("Unable to retrieve AntiKt4TruthJets container"); + if( evtStore()->retrieve(truthJets, m_truthJetContName).isFailure()) { + ATH_MSG_ERROR("Unable to retrieve truth jet container with name " << m_truthJetContName); + return CP::CorrectionCode::Error; + } - if(tagTruth(jets,truthJets).isFailure()) { - ATH_MSG_WARNING("Unable to match truthJets to jets in tagTruth() method"); + if(!truthJets || tagTruth(jets,truthJets).isFailure()) { + ATH_MSG_ERROR("Unable to match truthJets to jets in tagTruth() method"); + return CP::CorrectionCode::Error; } for(const auto& ipart : *jets) { if (ipart->type()!=xAOD::Type::Jet) { - ATH_MSG_WARNING("Input is not a jet"); + ATH_MSG_ERROR("Input is not a jet"); return CP::CorrectionCode::Error; } const xAOD::Jet *jet = static_cast<const xAOD::Jet*>(ipart); float current_sf = 0; - CorrectionCode result = (m_dofJVT?jet->getAttribute<char>(m_jetfJvtMomentName):passesJvtCut(*jet))?this->getEfficiencyScaleFactor(*jet,current_sf):this->getInefficiencyScaleFactor(*jet,current_sf); + + CorrectionCode result; + if( ( m_dofJVT && jet->getAttribute<char>(m_jetfJvtMomentName) ) || + ( m_doMVfJVT && jet->getAttribute<char>(m_jetMVfJvtMomentName) ) || + ( (!m_dofJVT && ! m_doMVfJVT) && passesJvtCut(*jet) ) ){ + result = this->getEfficiencyScaleFactor(*jet,current_sf); + } else { + result = this->getInefficiencyScaleFactor(*jet,current_sf); + } + if (result == CP::CorrectionCode::Error) { - ATH_MSG_WARNING("Inexplicably failed JVT calibration" ); + ATH_MSG_ERROR("Inexplicably failed JVT calibration" ); return result; } (*m_sfDec)(*jet) = current_sf; @@ -168,44 +305,23 @@ CorrectionCode JetJvtEfficiency::applyAllEfficiencyScaleFactor(const xAOD::IPart return CorrectionCode::Ok; } -CorrectionCode JetJvtEfficiency::applyRandomDropping( const xAOD::Jet& jet ) { - float sf = 0; - CorrectionCode result = this->getEfficiencyScaleFactor(jet,sf); - if (result == CP::CorrectionCode::Error) { - ATH_MSG_WARNING("Inexplicably failed JVT calibration" ); - return result; - } - if (!isInRange(jet) || jet.getAttribute<float>(m_jetJvtMomentName)<m_jvtCut || (m_doTruthRequirement && !jet.auxdata<char>(m_truthLabel))) (*m_dropDec)(jet) = 0; - else (*m_dropDec)(jet) = m_rand.Rndm()>sf?1:0; - return result; -} -CorrectionCode JetJvtEfficiency::applyAllRandomDropping(const xAOD::IParticleContainer *jets) { - for(const auto& ipart : *jets) { - if (ipart->type()!=xAOD::Type::Jet) { - ATH_MSG_WARNING("Input is not a jet"); - return CP::CorrectionCode::Error; - } - const xAOD::Jet *jet = static_cast<const xAOD::Jet*>(ipart); - CorrectionCode result = this->applyRandomDropping(*jet); - if (result == CP::CorrectionCode::Error) { - ATH_MSG_WARNING("Inexplicably failed JVT calibration" ); - return result; - } - } - return CorrectionCode::Ok; -} -bool JetJvtEfficiency::passesJvtCut(const xAOD::Jet& jet) { - if (jet.isAvailable<char>(m_drop_decoration_name) && jet.auxdata<char>(m_drop_decoration_name)) return false; +bool JetJvtEfficiency::passesJvtCut(const xAOD::Jet& jet) const { if (!isInRange(jet)) return true; + if (std::abs(jet.getAttribute<float>(m_jetEtaName))>2.4 && std::abs(jet.getAttribute<float>(m_jetEtaName))<2.5) return jet.getAttribute<float>(m_jetJvtMomentName)>m_jvtCutBorder; return jet.getAttribute<float>(m_jetJvtMomentName)>m_jvtCut; } -bool JetJvtEfficiency::isInRange(const xAOD::Jet& jet) { +bool JetJvtEfficiency::isInRange(const xAOD::Jet& jet) const { if (m_doOR && !jet.getAttribute<char>(m_ORdec)) return false; - if (fabs(jet.getAttribute<float>(m_jetEtaName))<m_h_JvtHist->GetYaxis()->GetBinLowEdge(1)) return false; - if (fabs(jet.getAttribute<float>(m_jetEtaName))>m_h_JvtHist->GetYaxis()->GetBinUpEdge(m_h_JvtHist->GetNbinsY())) return false; + if ( m_useMuBinsSF ){ + if (std::abs(jet.getAttribute<float>(m_jetEtaName))<2.5) return false; + if (std::abs(jet.getAttribute<float>(m_jetEtaName))>4.5) return false; + } else { + if (std::abs(jet.getAttribute<float>(m_jetEtaName))<m_h_JvtHist->GetYaxis()->GetBinLowEdge(1)) return false; + if (std::abs(jet.getAttribute<float>(m_jetEtaName))>m_h_JvtHist->GetYaxis()->GetBinUpEdge(m_h_JvtHist->GetNbinsY())) return false; + } if (jet.pt()<m_h_JvtHist->GetXaxis()->GetBinLowEdge(1)) return false; if (jet.pt()>m_h_JvtHist->GetXaxis()->GetBinUpEdge(m_h_JvtHist->GetNbinsX())) return false; if (jet.pt()>m_maxPtForJvt) return false; @@ -223,21 +339,18 @@ SystematicCode JetJvtEfficiency::sysApplySystematicVariation(const CP::Systemati } SystematicVariation systVar = *systSet.begin(); if (systVar == SystematicVariation("")) m_appliedSystEnum = NONE; - else if (systVar == JvtEfficiencyUp) m_appliedSystEnum = JVT_EFFICIENCY_UP; - else if (systVar == JvtEfficiencyDown) m_appliedSystEnum = JVT_EFFICIENCY_DOWN; - else { - ATH_MSG_WARNING("unsupported systematic applied"); - return SystematicCode::Unsupported; - } + else if (!m_dofJVT && !m_doMVfJVT && systVar == JvtEfficiencyUp ) m_appliedSystEnum = JVT_EFFICIENCY_UP; + else if (!m_dofJVT && !m_doMVfJVT && systVar == JvtEfficiencyDown ) m_appliedSystEnum = JVT_EFFICIENCY_DOWN; + else if (m_dofJVT && !m_doMVfJVT && systVar == fJvtEfficiencyUp ) m_appliedSystEnum = FJVT_EFFICIENCY_UP; + else if (m_dofJVT && !m_doMVfJVT && systVar == fJvtEfficiencyDown ) m_appliedSystEnum = FJVT_EFFICIENCY_DOWN; + else if (!m_dofJVT && m_doMVfJVT && systVar == MVfJvtEfficiencyUp ) m_appliedSystEnum = MVFJVT_EFFICIENCY_UP; + else if (!m_dofJVT && m_doMVfJVT && systVar == MVfJvtEfficiencyDown ) m_appliedSystEnum = MVFJVT_EFFICIENCY_DOWN; + else m_appliedSystEnum = NONE; ATH_MSG_DEBUG("applied systematic is " << m_appliedSystEnum); return SystematicCode::Ok; } - void JetJvtEfficiency::setRandomSeed(int seed){ - m_rand.SetSeed(seed); - } - StatusCode JetJvtEfficiency::tagTruth(const xAOD::IParticleContainer *jets,const xAOD::IParticleContainer *truthJets) { for(const auto& jet : *jets) { bool ishs = false; @@ -246,8 +359,8 @@ StatusCode JetJvtEfficiency::tagTruth(const xAOD::IParticleContainer *jets,const if (tjet->p4().DeltaR(jet->p4())<0.3 && tjet->pt()>10e3) ishs = true; if (tjet->p4().DeltaR(jet->p4())<0.6) ispu = false; } - isHS(*jet)=ishs; - isPU(*jet)=ispu; + (*m_isHSDec)(*jet)=ishs; + isPUDec(*jet)=ispu; } return StatusCode::SUCCESS; } diff --git a/Reconstruction/Jet/JetJvtEfficiency/python/JetJvtEfficiencyToolConfig.py b/Reconstruction/Jet/JetJvtEfficiency/python/JetJvtEfficiencyToolConfig.py new file mode 100644 index 0000000000000000000000000000000000000000..174f312d0ed817c66a049aa71af3c69fd11d7e23 --- /dev/null +++ b/Reconstruction/Jet/JetJvtEfficiency/python/JetJvtEfficiencyToolConfig.py @@ -0,0 +1,35 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + +######################################################################## +# # +# JetJvtEfficiencyToolConfig: A helper module for configuring jet jvt # +# efficiency configurations. This way the derivation framework can # +# easily be kept up to date with the latest recommendations. # +# Author: mswiatlo +# # +######################################################################## + +from AnaAlgorithm import Logging +jetjvttoollog = Logging.logging.getLogger('JetJvtEfficiencyToolConfig') + +def getJvtEffTool( jetalg , toolname = ''): + from AthenaCommon import CfgMgr + if not toolname: + toolname = getJvtEffToolName( jetalg ) + + configs = { + "AntiKt4EMTopo": "JetJvtEfficiency/Moriond2018/JvtSFFile_EMTopoJets.root", + "AntiKt4EMPFlow": "JetJvtEfficiency/Moriond2018/JvtSFFile_EMPFlow.root" + } + + jvtefftool = CfgMgr.CP__JetJvtEfficiency(toolname) + jvtefftool.SFFile=configs[ jetalg ] + + jetjvttoollog.info("Configured JetJvtEfficiencyTool {} for jetalg {}".format(toolname, jetalg)) + + return jvtefftool + +# return the default toolname for the specified alg +def getJvtEffToolName( jetalg ): + toolname = "JVTEff_{0}".format(jetalg) + return toolname diff --git a/Reconstruction/Jet/JetJvtEfficiency/python/__init__.py b/Reconstruction/Jet/JetJvtEfficiency/python/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/Reconstruction/Jet/JetMomentTools/CMakeLists.txt b/Reconstruction/Jet/JetMomentTools/CMakeLists.txt index 00d9ffb3b84ca02d8a7c64129d2d28da1e28345d..79333ec13f2aef45cf32405fb5b53b2fda007c84 100644 --- a/Reconstruction/Jet/JetMomentTools/CMakeLists.txt +++ b/Reconstruction/Jet/JetMomentTools/CMakeLists.txt @@ -19,6 +19,9 @@ if( XAOD_STANDALONE OR XAOD_ANALYSIS ) Event/xAOD/xAODJet Event/xAOD/xAODMissingET Event/xAOD/xAODTracking + Event/xAOD/xAODTruth + InnerDetector/InDetRecTools/InDetTrackSelectionTool + InnerDetector/InDetRecTools/TrackVertexAssociationTool Reconstruction/Jet/JetEDM Reconstruction/Jet/JetInterface Reconstruction/Jet/JetRec @@ -39,6 +42,9 @@ else() Event/xAOD/xAODJet Event/xAOD/xAODMissingET Event/xAOD/xAODTracking + Event/xAOD/xAODTruth + InnerDetector/InDetRecTools/InDetTrackSelectionTool + InnerDetector/InDetRecTools/TrackVertexAssociationTool Reconstruction/Jet/JetEDM Reconstruction/Jet/JetInterface Reconstruction/Jet/JetRec @@ -66,7 +72,7 @@ atlas_add_library( JetMomentToolsLib PUBLIC_HEADERS JetMomentTools PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} - AsgTools xAODCaloEvent xAODJet xAODMissingET xAODTracking JetEDM JetInterface + AsgTools xAODCaloEvent xAODJet xAODMissingET xAODTracking xAODTruth JetEDM JetInterface TrackVertexAssociationToolLib JetRecLib JetUtils PRIVATE_LINK_LIBRARIES CaloGeoHelpers xAODEventInfo xAODPFlow PathResolver ) diff --git a/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetQGTaggerVariableTool.h b/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetQGTaggerVariableTool.h new file mode 100644 index 0000000000000000000000000000000000000000..236272322f31a75dc35ea25b1eabf0c802f85a16 --- /dev/null +++ b/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetQGTaggerVariableTool.h @@ -0,0 +1,77 @@ +/* + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +*/ + +// JetQGTaggerVariableTool.h + +#ifndef JETMOMENTTOOLS_JETQGTAGGERVARIABLETOOL_H +#define JETMOMENTTOOLS_JETQGTAGGERVARIABLETOOL_H + +/// Properties: +/// VertexContainer - name of the vertex container +/// EventInfo - name of EventInfo container +/// AssociatedTracks - name for attribute holding the list of associated tracks +/// TVATool - tool to do track-vertex association +/// TrkSelTool - tool to select tracks (none ==> no selection) + +#include "AsgTools/ToolHandle.h" +#include "AsgTools/AsgTool.h" +#include "StoreGate/ReadDecorHandleKey.h" +#include "StoreGate/WriteDecorHandleKey.h" + +#include "xAODTracking/Vertex.h" +#include "xAODTracking/VertexContainer.h" +#include "xAODTracking/TrackParticle.h" +#include "xAODTracking/TrackParticleContainer.h" + +#include "InDetTrackSelectionTool/IInDetTrackSelectionTool.h" +#include "TrackVertexAssociationTool/ITrackVertexAssociationTool.h" + +#include "xAODEventInfo/EventInfo.h" + +#include "xAODTruth/TruthParticle.h" + +#include "JetInterface/IJetDecorator.h" + +#include <vector> +#include <string> + +class JetQGTaggerVariableTool : public asg::AsgTool, + virtual public IJetDecorator { + ASG_TOOL_CLASS(JetQGTaggerVariableTool,IJetDecorator) + +public: + // Constructor from tool name + JetQGTaggerVariableTool(const std::string& name); + + // Initialization. + StatusCode initialize() override; + + // Inherited method to decorate a jet container + virtual StatusCode decorate(const xAOD::JetContainer& jetCont) const override; + + // Local method to return the HS vertex - that of type PriVtx + const xAOD::Vertex* findHSVertex(const xAOD::VertexContainer*&) const; + +private: // data + + // Configurable parameters + Gaudi::Property<std::string> m_jetContainerName{this,"JetContainer", "", "SG key for the input jet container"}; + SG::ReadHandleKey<xAOD::VertexContainer> m_vertexContainer_key{this, "VertexContainer", "PrimaryVertices", "SG key for input vertex container"}; + SG::ReadHandleKey<xAOD::EventInfo> m_eventInfo_key{this, "EventInfo", "EventInfo", "SG key for input EventInfo"}; + + ToolHandle<InDet::IInDetTrackSelectionTool> m_trkSelectionTool{this, "TrkSelTool", "Track selector tool"}; + ToolHandle<CP::ITrackVertexAssociationTool> m_trkVertexAssocTool{this, "TVATool", "Track-vertex association tool"}; + + SG::WriteDecorHandleKey<xAOD::JetContainer> m_nTrkKey{this, "NTrksDecorName", "DFCommonJets_QGTagger_NTracks", "SG key for output NTracks decoration"}; + SG::WriteDecorHandleKey<xAOD::JetContainer> m_trkWidthKey{this, "TracksWidthDecorName", "DFCommonJets_QGTagger_TracksWidth", "SG key for output TracksWidth decoration"}; + SG::WriteDecorHandleKey<xAOD::JetContainer> m_trkC1Key{this, "TracksC1DecorName", "DFCommonJets_QGTagger_TracksC1", "SG key for output TracksC1 decoration"}; + SG::WriteDecorHandleKey<xAOD::JetContainer> m_nChargedKey{this, "nChargedDecorName", "DFCommonJets_QGTagger_truthjet_nCharged", "SG key for output truthjet_nCharged decoration"}; + SG::WriteDecorHandleKey<xAOD::JetContainer> m_truthPtKey{this, "truthPtDecorName", "DFCommonJets_QGTagger_truthjet_pt", "SG key for output truthjet_pt decoration"}; + SG::WriteDecorHandleKey<xAOD::JetContainer> m_truthEtaKey{this, "truthEtaDecorName", "DFCommonJets_QGTagger_truthjet_eta", "SG key for output truthjet_eta decoration"}; + +}; + + +#endif + diff --git a/Reconstruction/Jet/JetMomentTools/Root/JetConstitFourMomTool.cxx b/Reconstruction/Jet/JetMomentTools/Root/JetConstitFourMomTool.cxx index 145bf52d03541b5888f326b04fb2304e225e98d6..53c52473715208ea7a83ca1d6be4103c266c775e 100644 --- a/Reconstruction/Jet/JetMomentTools/Root/JetConstitFourMomTool.cxx +++ b/Reconstruction/Jet/JetMomentTools/Root/JetConstitFourMomTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // JetConstitFourMomTool.cxx @@ -155,10 +155,13 @@ StatusCode JetConstitFourMomTool::modify(xAOD::JetContainer& jets) const { if(m_isDetectorEtaPhi[iScale]) { const static SG::AuxElement::Accessor<float> acc_modEta("DetectorEta"); const static SG::AuxElement::Accessor<float> acc_modPhi("DetectorPhi"); + const static SG::AuxElement::Accessor<float> acc_modY("DetectorY"); acc_modEta(*jet) = constitFourVecs[iScale].Eta(); acc_modPhi(*jet) = constitFourVecs[iScale].Phi(); + acc_modY(*jet) = constitFourVecs[iScale].Rapidity(); ATH_MSG_VERBOSE("Detector eta: " << constitFourVecs[iScale].Eta() - << ", phi: " << constitFourVecs[iScale].Phi()); + << ", phi: " << constitFourVecs[iScale].Phi() + << ", rapidity: " << constitFourVecs[iScale].Rapidity()); } else { jet->setJetP4(m_jetScaleNames[iScale], constitFourVecs[iScale]); } diff --git a/Reconstruction/Jet/JetMomentTools/Root/JetMomentToolsDict.h b/Reconstruction/Jet/JetMomentTools/Root/JetMomentToolsDict.h index 1af9a28b11be4c61855dc19f57e4b95718c1aa37..0904e1b560e8bf80e3e564fb819d148868ad44a1 100644 --- a/Reconstruction/Jet/JetMomentTools/Root/JetMomentToolsDict.h +++ b/Reconstruction/Jet/JetMomentTools/Root/JetMomentToolsDict.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef JETMOMENTTOOLS_JETMOMENTTOOLSDICT_H @@ -20,5 +20,6 @@ #include "JetMomentTools/JetVertexFractionTool.h" #include "JetMomentTools/JetVertexTaggerTool.h" #include "JetMomentTools/JetWidthTool.h" +#include "JetMomentTools/JetQGTaggerVariableTool.h" #endif diff --git a/Reconstruction/Jet/JetMomentTools/Root/JetQGTaggerVariableTool.cxx b/Reconstruction/Jet/JetMomentTools/Root/JetQGTaggerVariableTool.cxx new file mode 100644 index 0000000000000000000000000000000000000000..45211aed74ca16168469b167e0d649e37a18bf76 --- /dev/null +++ b/Reconstruction/Jet/JetMomentTools/Root/JetQGTaggerVariableTool.cxx @@ -0,0 +1,254 @@ +///////////////////////// -*- C++ -*- //////////////////////////// + +/* + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +*/ + +/////////////////////////////////////////////////////////////////// + +#include "JetMomentTools/JetQGTaggerVariableTool.h" +#include "PathResolver/PathResolver.h" +#include "StoreGate/ReadDecorHandle.h" +#include "StoreGate/WriteDecorHandle.h" + + +using std::string; +using xAOD::JetFourMom_t; + +//********************************************************************** + +JetQGTaggerVariableTool::JetQGTaggerVariableTool(const std::string& name) +: asg::AsgTool(name){ + declareInterface<IJetDecorator>(this); +} + +//********************************************************************** + +StatusCode JetQGTaggerVariableTool::initialize() { + ATH_MSG_INFO("Initializing JetQGTaggerVariableTool " << name()); + + if(m_jetContainerName.empty()){ + ATH_MSG_ERROR("JetQGTaggerVariableTool needs to have its input jet container configured!"); + return StatusCode::FAILURE; + } + + m_nTrkKey = m_jetContainerName + "." + m_nTrkKey.key(); + m_trkWidthKey = m_jetContainerName + "." + m_trkWidthKey.key(); + m_trkC1Key = m_jetContainerName + "." + m_trkC1Key.key(); + m_nChargedKey = m_jetContainerName + "." + m_nChargedKey.key(); + m_truthPtKey = m_jetContainerName + "." + m_truthPtKey.key(); + m_truthEtaKey = m_jetContainerName + "." + m_truthEtaKey.key(); + + ATH_CHECK(m_vertexContainer_key.initialize()); + ATH_CHECK(m_eventInfo_key.initialize()); + + ATH_CHECK(m_nTrkKey.initialize()); + ATH_CHECK(m_trkWidthKey.initialize()); + ATH_CHECK(m_trkC1Key.initialize()); + ATH_CHECK(m_nChargedKey.initialize()); + ATH_CHECK(m_truthPtKey.initialize()); + ATH_CHECK(m_truthEtaKey.initialize()); + + return StatusCode::SUCCESS; +} + +//********************************************************************** + +StatusCode JetQGTaggerVariableTool::decorate(const xAOD::JetContainer& jetCont) const { + + + SG::WriteDecorHandle<xAOD::JetContainer, int> nTrkHandle(m_nTrkKey); + SG::WriteDecorHandle<xAOD::JetContainer, float> trkWidthHandle(m_trkWidthKey); + SG::WriteDecorHandle<xAOD::JetContainer, float> trkC1Handle(m_trkC1Key); + SG::WriteDecorHandle<xAOD::JetContainer, int> nChargedHandle(m_nChargedKey); + SG::WriteDecorHandle<xAOD::JetContainer, float> truthPtHandle(m_truthPtKey); + SG::WriteDecorHandle<xAOD::JetContainer, float> truthEtaHandle(m_truthEtaKey); + + // Get input vertex collection + auto vertexContainer = SG::makeHandle (m_vertexContainer_key); + if (!vertexContainer.isValid()){ + ATH_MSG_ERROR("Invalid VertexContainer datahandle: " << m_vertexContainer_key.key()); + return StatusCode::FAILURE; + } + + auto vertices = vertexContainer.cptr(); + + ATH_MSG_DEBUG("Successfully retrieved VertexContainer: " << m_vertexContainer_key.key()); + + if (vertices->size() == 0 ) { + ATH_MSG_WARNING("There are no vertices in the container. Exiting"); + + for(const xAOD::Jet* jet : jetCont){ + nTrkHandle(*jet) = -1; + trkWidthHandle(*jet) = -1.; + trkC1Handle(*jet) = -1.; + nChargedHandle(*jet) = -1; + truthPtHandle(*jet) = -1.; + truthEtaHandle(*jet) = -1.; + } + + return StatusCode::SUCCESS; + } + + //Find the HS vertex + const xAOD::Vertex* HSvertex = findHSVertex(vertices); + + //Loop over the jets + for(const xAOD::Jet* jet : jetCont){ + + int nTracksCount = 0; + float TracksWidth = 0., SumTracks_pTs = 0., TracksC1 = 0., beta = 0.2; + + //Get ghost-associated tracks + std::vector<const xAOD::IParticle*> jettracks; + jet->getAssociatedObjects<xAOD::IParticle>(xAOD::JetAttribute::GhostTrack,jettracks); + + //Loop over the tracks + std::vector<bool> IsGoodTrack; + TLorentzVector tracki_TLV, trackj_TLV; + TLorentzVector jet_TLV = jet -> p4(); + for (size_t i = 0; i < jettracks.size(); i++) { + + if(!jettracks[i]){ + IsGoodTrack.push_back(false); + continue; + } + + const xAOD::TrackParticle* trk = static_cast<const xAOD::TrackParticle*>(jettracks[i]); + + // only count tracks with selections + // 1) pt>500 MeV + // 2) accepted track from InDetTrackSelectionTool with CutLevel==Loose + // 3) associated to primary vertex OR within 3mm of the primary vertex + + bool accept = (trk->pt()>500 && + m_trkSelectionTool->accept(*trk) && + (m_trkVertexAssocTool->isCompatible(*trk,*HSvertex) || (!m_trkVertexAssocTool->isCompatible(*trk,*HSvertex) && fabs((trk->z0()+trk->vz()-HSvertex->z())*sin(trk->theta()))<3.)) + ); + + IsGoodTrack.push_back(accept); + if (!accept) continue; + + nTracksCount++; + + tracki_TLV = trk -> p4(); + double DR_tracki_jet = tracki_TLV.DeltaR(jet_TLV); + TracksWidth += trk -> pt() * DR_tracki_jet; + SumTracks_pTs += trk -> pt(); + + }// end loop over jettracks + + if(SumTracks_pTs>0.) TracksWidth = TracksWidth / SumTracks_pTs; + else TracksWidth = -1.; + + //Calculate C1 from tracks + for(size_t i = 0; i < jettracks.size(); i++) { + const xAOD::TrackParticle* trki = static_cast<const xAOD::TrackParticle*>(jettracks[i]); + if( !( IsGoodTrack.at(i) ) ) continue; + + for(size_t j = i+1; j < jettracks.size(); j++) { + const xAOD::TrackParticle* trkj = static_cast<const xAOD::TrackParticle*>(jettracks[j]); + if( !( IsGoodTrack.at(j) ) ) continue; + + tracki_TLV = trki -> p4(); + trackj_TLV = trkj -> p4(); + double DR_tracki_trackj = tracki_TLV.DeltaR(trackj_TLV); + TracksC1 += trki -> pt() * trkj -> pt() * pow( DR_tracki_trackj, beta) ; + + }//end loop over j + }//end double loop over ij + + if(SumTracks_pTs>0.) TracksC1 = TracksC1 / ( pow(SumTracks_pTs, 2.) ); + else TracksC1 = -1.; + + // Add truth variables for QG tagging + + auto eventInfoContainer = SG::makeHandle (m_eventInfo_key); + if (!eventInfoContainer.isValid()){ + ATH_MSG_ERROR("Invalid EventInfo datahandle: " << m_eventInfo_key.key()); + return StatusCode::FAILURE; + } + + auto eventInfo = eventInfoContainer.cptr(); + + bool isMC = eventInfo->eventType(xAOD::EventInfo::IS_SIMULATION); + int tntrk = 0; + float truthjet_pt = -999.0; + float truthjet_eta = -999.0; + + if(isMC){ + const xAOD::Jet* tjet=nullptr; + if(jet->isAvailable< ElementLink<xAOD::JetContainer> >("GhostTruthAssociationLink") ){ + ATH_MSG_DEBUG("Accessing GhostTruthAssociationLink: is available"); + if(jet->auxdata< ElementLink<xAOD::JetContainer> >("GhostTruthAssociationLink").isValid() ){ + ATH_MSG_DEBUG("Accessing GhostTruthAssociationLink: is valid"); + ElementLink<xAOD::JetContainer> truthlink = jet->auxdata< ElementLink<xAOD::JetContainer> >("GhostTruthAssociationLink"); + if(truthlink) + tjet = * truthlink; + else{ + ATH_MSG_DEBUG("Skipping...truth link is broken"); + }//endelse NULL pointer + } + else { + ATH_MSG_DEBUG("Invalid truth link: setting weight to 1"); + } //endelse isValid + } //endif isAvailable + else { + ATH_MSG_DEBUG("Cannot access truth Link: setting weight to 1"); + }//endelse isAvailable + + if(tjet){ + ATH_MSG_DEBUG("Truth Jet: " << tjet->numConstituents()); + + truthjet_pt = tjet->pt(); + truthjet_eta = tjet->eta(); + + //Calculate the number of charged final state particles with pT > 500 MeV + for (size_t ind = 0; ind < tjet->numConstituents(); ind++) { + const xAOD::TruthParticle *part = static_cast<const xAOD::TruthParticle*>(tjet->rawConstituent(ind)); + ATH_MSG_DEBUG("part: " << part ); + // dont count invalid truth particles + if (!part) continue; + // require the particle in the final state + ATH_MSG_DEBUG("status: " << (part->status()) ); + if( ! (part->status() == 1) ) continue; + // require that the particle type (e.g. production type) be valid (e.g. not primaries) + ATH_MSG_DEBUG("barcode: " << (part->barcode()) ); + if ((part->barcode())>2e5) continue; + // pt>500 MeV + ATH_MSG_DEBUG("pt: " << (part->pt()) ); + if( ! (part->pt()>500.) ) continue; + // charged + ATH_MSG_DEBUG("isCharged: " << (part->isCharged()) ); + if( !(part->isCharged()) ) continue; + tntrk++; + } + } + } + + nTrkHandle(*jet) = nTracksCount; + trkWidthHandle(*jet) = TracksWidth; + trkC1Handle(*jet) = TracksC1; + nChargedHandle(*jet) = tntrk; + truthPtHandle(*jet) = truthjet_pt; + truthEtaHandle(*jet) = truthjet_eta; + + } + + return StatusCode::SUCCESS; +} + +//********************************************************************** + +const xAOD::Vertex* JetQGTaggerVariableTool::findHSVertex(const xAOD::VertexContainer*& vertices) const +{ + for ( size_t iVertex = 0; iVertex < vertices->size(); ++iVertex ) { + if(vertices->at(iVertex)->vertexType() == xAOD::VxType::PriVtx) { + + ATH_MSG_VERBOSE("JetQGTaggerVariableTool " << name() << " Found HS vertex at index: "<< iVertex); + return vertices->at(iVertex); + } + } + ATH_MSG_VERBOSE("There is no vertex of type PriVx. Taking default vertex."); + return vertices->at(0); +} diff --git a/Reconstruction/Jet/JetMomentTools/Root/LinkDef.h b/Reconstruction/Jet/JetMomentTools/Root/LinkDef.h index 608de1d77d845008676a2359f6e0c623a614f7ea..e893f68c72928edd9e777ee0a738a42c915fd194 100644 --- a/Reconstruction/Jet/JetMomentTools/Root/LinkDef.h +++ b/Reconstruction/Jet/JetMomentTools/Root/LinkDef.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "PFlowUtils/IWeightPFOTool.h" @@ -17,6 +17,7 @@ #include "JetMomentTools/JetVertexTaggerTool.h" #include "JetMomentTools/JetWidthTool.h" #include "JetMomentTools/JetCaloEnergies.h" +#include "JetMomentTools/JetQGTaggerVariableTool.h" #ifdef __CINT__ @@ -39,6 +40,6 @@ #pragma link C++ class JetVertexTaggerTool+; #pragma link C++ class JetWidthTool+; #pragma link C++ class JetCaloEnergies+; - +#pragma link C++ class JetQGTaggerVariableTool+; #endif diff --git a/Reconstruction/Jet/JetMomentTools/Root/selection.xml b/Reconstruction/Jet/JetMomentTools/Root/selection.xml index f2be0c3e7a37e5685c08b8f7ef19b6168e75e3b9..75c2e45b4e20224eb49e577a75c4fba9e3ae0505 100644 --- a/Reconstruction/Jet/JetMomentTools/Root/selection.xml +++ b/Reconstruction/Jet/JetMomentTools/Root/selection.xml @@ -13,4 +13,5 @@ <class name="JetVertexFractionTool"/> <class name="JetVertexTaggerTool"/> <class name="JetWidthTool"/> +<class name="JetQGTaggerVariableTool"/> </lcgdict> diff --git a/Reconstruction/Jet/JetMomentTools/src/components/JetMomentTools_entries.cxx b/Reconstruction/Jet/JetMomentTools/src/components/JetMomentTools_entries.cxx index c5f220232aaf8f632aba7a29d932764f457b5551..4b8bd610fc09d0912c42d18cf61c8221441a7bf7 100644 --- a/Reconstruction/Jet/JetMomentTools/src/components/JetMomentTools_entries.cxx +++ b/Reconstruction/Jet/JetMomentTools/src/components/JetMomentTools_entries.cxx @@ -16,6 +16,7 @@ #include "JetMomentTools/JetOriginCorrectionTool.h" #include "JetMomentTools/JetECPSFractionTool.h" #include "JetMomentTools/JetConstitFourMomTool.h" +#include "JetMomentTools/JetQGTaggerVariableTool.h" #ifndef XAOD_ANALYSIS #include "JetMomentTools/JetBadChanCorrTool.h" @@ -39,6 +40,7 @@ DECLARE_COMPONENT( JetLArHVTool ) DECLARE_COMPONENT( JetOriginCorrectionTool ) DECLARE_COMPONENT( JetECPSFractionTool ) DECLARE_COMPONENT( JetConstitFourMomTool ) +DECLARE_COMPONENT( JetQGTaggerVariableTool ) #ifndef XAOD_ANALYSIS DECLARE_COMPONENT( JetBadChanCorrTool ) diff --git a/Reconstruction/Jet/JetRec/python/JetRecStandardToolManager.py b/Reconstruction/Jet/JetRec/python/JetRecStandardToolManager.py index da2507bb949cb9274417ab0c288002493910b625..725707b5f7742a8b12442ae047ebdd4f288a3416 100644 --- a/Reconstruction/Jet/JetRec/python/JetRecStandardToolManager.py +++ b/Reconstruction/Jet/JetRec/python/JetRecStandardToolManager.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # JetRecStandardToolManager.py # @@ -249,6 +249,9 @@ pflow_groomed_modifiers = [] pflow_groomed_modifiers += [jtm.constitfourmom_pflow] pflow_groomed_modifiers += groomed_modifiers +# For truth jets, don't add track moments +truth_groomed_modifiers = filterout(["trksummoms"], groomed_modifiers) + # Here add tools to be run for topo jets and NOT for pflow. # Cluster moments. @@ -324,6 +327,7 @@ jtm.modifiersMap["pflow_reduced"] = list(pflow_reduced_modifiers) if jetFlags.useTruth(): jtm.modifiersMap["truth_ungroomed"] = list(truth_ungroomed_modifiers) + jtm.modifiersMap["truth_groomed"] = list(truth_groomed_modifiers) jtm.modifiersMap["track_ungroomed"] = list(track_ungroomed_modifiers) # Also index modifier type names by input type name. diff --git a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCaloTagTool.cxx b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCaloTagTool.cxx index cb54becfc0e1bb6836e301706bce9ebdf660701c..9dfdec550926a9a1ed8b0c06150fe91d03bc4a2e 100644 --- a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCaloTagTool.cxx +++ b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCaloTagTool.cxx @@ -13,7 +13,6 @@ // (c) ATLAS Combined Muon software ////////////////////////////////////////////////////////////////////////////// -//<<<<<< INCLUDES >>>>>> #include "MuonCombinedToolInterfaces/IMuonCombinedTagTool.h" #include "MuonCombinedEvent/InDetCandidate.h" @@ -42,7 +41,6 @@ namespace MuonCombined { - //<<<<<< CLASS STRUCTURE INITIALIZATION >>>>>> MuonCaloTagTool::MuonCaloTagTool (const std::string& type, const std::string& name, const IInterface* parent) : AthAlgTool(type, name, parent), @@ -92,7 +90,6 @@ namespace MuonCombined { MuonCaloTagTool::~MuonCaloTagTool() {} - //<<<<<< PUBLIC MEMBER FUNCTION DEFINITIONS >>>>>> StatusCode MuonCaloTagTool::initialize() { diff --git a/Reconstruction/egamma/egammaAlgs/python/EMBremCollectionBuilder.py b/Reconstruction/egamma/egammaAlgs/python/EMBremCollectionBuilder.py index 97a1a5657977208a22b2b794a05121861002654a..9084f01e87a444fbb49f9c5a9646eb5fe5c09599 100644 --- a/Reconstruction/egamma/egammaAlgs/python/EMBremCollectionBuilder.py +++ b/Reconstruction/egamma/egammaAlgs/python/EMBremCollectionBuilder.py @@ -14,7 +14,6 @@ from egammaRec.Factories import AlgFactory from egammaTools.egammaExtrapolators import (AtlasPublicExtrapolator, egammaExtrapolator) # default configuration of the EMBremCollectionBuilder -from egammaTrackTools.egammaTrackToolsFactories import EMExtrapolationTools from InDetRecExample.InDetJobProperties import InDetFlags from InDetRecExample.InDetKeys import InDetKeys from RecExConfig.RecFlags import rec @@ -108,6 +107,7 @@ class egammaBremCollectionBuilder (egammaAlgsConf.EMBremCollectionBuilder): # Track Particle Creator tool (private not in ToolSvc) # But needs a public extrapolator and # InDetTrackSummaryTool still... + # from TrkParticleCreator.TrkParticleCreatorConf import ( Trk__TrackParticleCreatorTool) @@ -138,7 +138,6 @@ class egammaBremCollectionBuilder (egammaAlgsConf.EMBremCollectionBuilder): EMBremCollectionBuilder = AlgFactory( egammaBremCollectionBuilder, name='EMBremCollectionBuilder', - ExtrapolationTool=EMExtrapolationTools, TrackParticleContainerName=InDetKeys.xAODTrackParticleContainer(), OutputTrkPartContainerName=egammaKeys.outputTrackParticleKey(), OutputTrackContainerName=egammaKeys.outputTrackKey(), diff --git a/Reconstruction/egamma/egammaAlgs/python/EMGSFCaloExtensionBuilder.py b/Reconstruction/egamma/egammaAlgs/python/EMGSFCaloExtensionBuilder.py index fd48f34e3b839fa9abb0eba3cf13e029a676d425..ec3efeba67d6238b800b1b0bd268ef62d0232bde 100644 --- a/Reconstruction/egamma/egammaAlgs/python/EMGSFCaloExtensionBuilder.py +++ b/Reconstruction/egamma/egammaAlgs/python/EMGSFCaloExtensionBuilder.py @@ -6,12 +6,14 @@ __author__ = "Christos" from egammaAlgs import egammaAlgsConf from egammaRec.Factories import AlgFactory from egammaRec import egammaKeys -from egammaTrackTools.egammaTrackToolsFactories import EMLastCaloExtensionTool,EMParticleCaloExtensionTool +from egammaTrackTools.egammaTrackToolsFactories import ( + EMLastCaloExtensionTool, EMParticleCaloExtensionTool) -EMGSFCaloExtensionBuilder = AlgFactory( egammaAlgsConf.EMGSFCaloExtensionBuilder, - name = 'EMGSFCaloExtensionBuilder', - LastCaloExtensionTool=EMLastCaloExtensionTool, - PerigeeCaloExtensionTool=EMParticleCaloExtensionTool, - GSFPerigeeCache='GSFPerigeeCaloExtension', - GSFLastCache='GSFLastCaloExtension', - GFFTrkPartContainerName=egammaKeys.outputTrackParticleKey()) +EMGSFCaloExtensionBuilder = AlgFactory( + egammaAlgsConf.EMGSFCaloExtensionBuilder, + name='EMGSFCaloExtensionBuilder', + LastCaloExtensionTool=EMLastCaloExtensionTool, + PerigeeCaloExtensionTool=EMParticleCaloExtensionTool, + GSFPerigeeCache='GSFPerigeeCaloExtension', + GSFLastCache='GSFLastCaloExtension', + GFFTrkPartContainerName=egammaKeys.outputTrackParticleKey()) diff --git a/Reconstruction/egamma/egammaAlgs/python/EMVertexBuilder.py b/Reconstruction/egamma/egammaAlgs/python/EMVertexBuilder.py index b4fd2393605026d468974e8c8e3303427af156f4..0738f9e6f45a85e5db1fb2330f3bf6c1f89d00a9 100644 --- a/Reconstruction/egamma/egammaAlgs/python/EMVertexBuilder.py +++ b/Reconstruction/egamma/egammaAlgs/python/EMVertexBuilder.py @@ -1,6 +1,7 @@ # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -__doc__ = "ToolFactory to instantiate EMVertexBuilder with default configuration" +__doc__ = """ToolFactory to instantiate EMVertexBuilder +with default configuration""" __author__ = "Bruno Lenzi" import InDetRecExample.TrackingCommon as TrackingCommon @@ -14,28 +15,23 @@ from egammaTools.egammaExtrapolators import AtlasPublicExtrapolator class VertexFinderToolInstance(FcnWrapper): def __call__(self): - # Loading Configurable HoleSearchTool - egammaInDetHoleSearchTool = TrackingCommon.getInDetHoleSearchTool( - name="egammaInDetHoleSearchTool", - Extrapolator=AtlasPublicExtrapolator() - ) - - # Load the InDetTrackSummaryHelperTool - egammaInDetTrackSummaryHelperTool = ( + # In reality we do NOT need a summary tool + # but the confgured Secondary vertex + # still asks for one (TODO) + egammaVtxInDetTrackSummaryHelperTool = ( TrackingCommon.getInDetSummaryHelper( - name="egammaInDetSummaryHelper", + name="egammaVtxInDetSummaryHelper", AssoTool=None, + HoleSearch=None, DoSharedHits=False, - HoleSearch=egammaInDetHoleSearchTool, private=True)) - # - egammaInDetTrackSummaryTool = ( + egammaVtxInDetTrackSummaryTool = ( TrackingCommon.getInDetTrackSummaryTool( - name="egammaInDetTrackSummaryTool", - InDetSummaryHelperTool=egammaInDetTrackSummaryHelperTool, + name="egammaVtxInDetTrackSummaryTool", + InDetSummaryHelperTool=egammaVtxInDetTrackSummaryHelperTool, doSharedHits=False, - doHolesInDet=True)) + doHolesInDet=False)) # # Configured conversion vertex reconstruction cuts @@ -55,7 +51,7 @@ class VertexFinderToolInstance(FcnWrapper): TrackParticles=egammaKeys.outputTrackParticleKey(), SecVertices=egammaKeys.outputConversionKey(), Extrapolator=AtlasPublicExtrapolator(), - TrackSummaryTool=egammaInDetTrackSummaryTool, + TrackSummaryTool=egammaVtxInDetTrackSummaryTool, printConfig=False) return theemvertexfindertool.toolInstance() diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaLargeClusterMakerAlg.py b/Reconstruction/egamma/egammaAlgs/python/egammaLargeClusterMakerAlg.py index e66be31947ddc2fd3a0842ca6d3bd4003ed439bb..19b9c52a87aa3e7d39e29c55d6cee321189e5f5f 100644 --- a/Reconstruction/egamma/egammaAlgs/python/egammaLargeClusterMakerAlg.py +++ b/Reconstruction/egamma/egammaAlgs/python/egammaLargeClusterMakerAlg.py @@ -1,6 +1,7 @@ # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -__doc__ = "ToolFactory to instantiate egammaLargeClusterMaker with default configuration" +__doc__ = """ToolFactory to instantiate egammaLargeClusterMaker +with default configuration""" __author__ = "Jovan Mitrevski" from egammaTools.egammaToolsFactories import egammaLargeClusterMakerTool @@ -9,15 +10,18 @@ from egammaRec.Factories import AlgFactory, FcnWrapper from egammaRec import egammaKeys from CaloClusterCorrection.CaloSwCorrections import make_CaloSwCorrections + def clusMakerTools(): return [egammaLargeClusterMakerTool()] -egammaLargeClusterMakerAlg = AlgFactory( CaloRecConf.CaloClusterMaker, - name = "egammaLargeClusterMaker", - SaveUncalibratedSignalState = False, - ClustersOutputName = egammaKeys.EgammaLargeClustersKey(), - ClusterMakerTools = FcnWrapper(clusMakerTools), - ClusterCorrectionTools=make_CaloSwCorrections("ele7_11", - suffix="Nocorr", - version="none", - cells_name=egammaKeys.caloCellKey())) + +egammaLargeClusterMakerAlg = AlgFactory( + CaloRecConf.CaloClusterMaker, + name="egammaLargeClusterMaker", + SaveUncalibratedSignalState=False, + ClustersOutputName=egammaKeys.EgammaLargeClustersKey(), + ClusterMakerTools=FcnWrapper(clusMakerTools), + ClusterCorrectionTools=make_CaloSwCorrections("ele7_11", + suffix="Nocorr", + version="none", + cells_name=egammaKeys.caloCellKey())) diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaRecBuilder.py b/Reconstruction/egamma/egammaAlgs/python/egammaRecBuilder.py index 5b42f69420304078f4000f461e4a97b96e17ec59..f80be96ec0f9a68067352d6a0934d09eeb428d0c 100644 --- a/Reconstruction/egamma/egammaAlgs/python/egammaRecBuilder.py +++ b/Reconstruction/egamma/egammaAlgs/python/egammaRecBuilder.py @@ -1,22 +1,23 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -__doc__ = "ToolFactory to instantiate egammaRecBuilder with default configuration" +__doc__ = """ToolFactory to instantiate +egammaRecBuilder with default configuration""" __author__ = "Jovan Mitrevski" from egammaAlgs import egammaAlgsConf from egammaRec.Factories import AlgFactory -from egammaRec.egammaRecFlags import jobproperties # to set jobproperties.egammaRecFlags +from egammaRec.egammaRecFlags import jobproperties from egammaRec import egammaKeys from egammaTools.egammaToolsFactories import \ EMTrackMatchBuilder, EMConversionBuilder -egammaRecBuilder = AlgFactory( egammaAlgsConf.egammaRecBuilder, - name = 'egammaRecBuilder' , - InputTopoClusterContainerName=jobproperties.egammaRecFlags.egammaTopoClusterCollection(), - egammaRecContainer=egammaKeys.EgammaRecKey(), - # Builder tools - TrackMatchBuilderTool = EMTrackMatchBuilder, - ConversionBuilderTool = EMConversionBuilder - ) - +egammaRecBuilder = AlgFactory( + egammaAlgsConf.egammaRecBuilder, + name='egammaRecBuilder', + InputTopoClusterContainerName=jobproperties.egammaRecFlags.egammaTopoClusterCollection(), + egammaRecContainer=egammaKeys.EgammaRecKey(), + # Builder tools + TrackMatchBuilderTool=EMTrackMatchBuilder, + ConversionBuilderTool=EMConversionBuilder +) diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaSelectedTrackCopy.py b/Reconstruction/egamma/egammaAlgs/python/egammaSelectedTrackCopy.py index 8de23bed129368bf8f86508c96ae7aac68a92530..95249d385d6745e4d1c7c2a628eb038bd413a41f 100644 --- a/Reconstruction/egamma/egammaAlgs/python/egammaSelectedTrackCopy.py +++ b/Reconstruction/egamma/egammaAlgs/python/egammaSelectedTrackCopy.py @@ -1,6 +1,7 @@ -# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -__doc__ = "ToolFactory to instantiate egammaSelectedTrackCopy with default configuration" +__doc__ = """ToolFactory to instantiate +egammaSelectedTrackCopy with default configuration""" __author__ = "Christos" from egammaAlgs import egammaAlgsConf @@ -8,21 +9,24 @@ from egammaRec.Factories import ToolFactory, AlgFactory # to set jobproperties.egammaRecFlags from egammaRec.egammaRecFlags import jobproperties from InDetRecExample.InDetKeys import InDetKeys -from egammaTrackTools.egammaTrackToolsFactories import EMExtrapolationTools, EMExtrapolationToolsCommonCache +from egammaTrackTools.egammaTrackToolsFactories import ( + EMExtrapolationTools, EMExtrapolationToolsCommonCache) from egammaCaloTools import egammaCaloToolsConf -egammaCaloClusterGSFSelector = ToolFactory(egammaCaloToolsConf.egammaCaloClusterSelector, - name='caloClusterGSFSelector', - EMEtCut=2250., - EMEtSplittingFraction = 0.7, - EMFCut=0.5 - ) +egammaCaloClusterGSFSelector = ToolFactory( + egammaCaloToolsConf.egammaCaloClusterSelector, + name='caloClusterGSFSelector', + EMEtCut=2250., + EMEtSplittingFraction=0.7, + EMFCut=0.5 +) -egammaSelectedTrackCopy = AlgFactory(egammaAlgsConf.egammaSelectedTrackCopy, - name='egammaSelectedTrackCopy', - ExtrapolationTool=EMExtrapolationTools, - ExtrapolationToolCommonCache=EMExtrapolationToolsCommonCache, - ClusterContainerName=jobproperties.egammaRecFlags.egammaTopoClusterCollection(), - TrackParticleContainerName=InDetKeys.xAODTrackParticleContainer(), - egammaCaloClusterSelector=egammaCaloClusterGSFSelector - ) +egammaSelectedTrackCopy = AlgFactory( + egammaAlgsConf.egammaSelectedTrackCopy, + name='egammaSelectedTrackCopy', + ExtrapolationTool=EMExtrapolationTools, + ExtrapolationToolCommonCache=EMExtrapolationToolsCommonCache, + ClusterContainerName=jobproperties.egammaRecFlags.egammaTopoClusterCollection(), + TrackParticleContainerName=InDetKeys.xAODTrackParticleContainer(), + egammaCaloClusterSelector=egammaCaloClusterGSFSelector +) diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaSuperClusterBuilder.py b/Reconstruction/egamma/egammaAlgs/python/egammaSuperClusterBuilder.py index 1f4b3f4fc2f09fa3d9a8b137ec312545cd5a0080..0de10c4dee171458544d367f47491f2925e1c49b 100644 --- a/Reconstruction/egamma/egammaAlgs/python/egammaSuperClusterBuilder.py +++ b/Reconstruction/egamma/egammaAlgs/python/egammaSuperClusterBuilder.py @@ -1,35 +1,38 @@ # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -__doc__ = "ToolFactory to instantiate the two supercluster builders with default configuration" +__doc__ = """ToolFactory to instantiate the +two supercluster builders with default configuration""" __author__ = "Jovan Mitrevski" from egammaAlgs import egammaAlgsConf from egammaRec.Factories import AlgFactory -from egammaRec.egammaRecFlags import jobproperties # noqa: F401 # to set jobproperties.egammaRecFlags from egammaRec import egammaKeys -from egammaTools.egammaToolsFactories import \ - EMTrackMatchBuilder, EMConversionBuilder, egammaSwTool, egammaMVASvc +from egammaTools.egammaToolsFactories import ( + EMTrackMatchBuilder, EMConversionBuilder, egammaSwTool, egammaMVASvc) -from egammaCaloTools.egammaCaloToolsFactories import egammaCheckEnergyDepositTool +from egammaCaloTools.egammaCaloToolsFactories import ( + egammaCheckEnergyDepositTool) -electronSuperClusterBuilder = AlgFactory( egammaAlgsConf.electronSuperClusterBuilder, - name = 'electronSuperClusterBuilder', - InputEgammaRecContainerName=egammaKeys.EgammaRecKey(), - SuperElectronRecCollectionName=egammaKeys.ElectronSuperRecKey(), - ClusterCorrectionTool=egammaSwTool, - egammaCheckEnergyDepositTool = egammaCheckEnergyDepositTool, - MVACalibSvc=egammaMVASvc, - EtThresholdCut=1000, - TrackMatchBuilderTool = EMTrackMatchBuilder - ) +electronSuperClusterBuilder = AlgFactory( + egammaAlgsConf.electronSuperClusterBuilder, + name='electronSuperClusterBuilder', + InputEgammaRecContainerName=egammaKeys.EgammaRecKey(), + SuperElectronRecCollectionName=egammaKeys.ElectronSuperRecKey(), + ClusterCorrectionTool=egammaSwTool, + egammaCheckEnergyDepositTool=egammaCheckEnergyDepositTool, + MVACalibSvc=egammaMVASvc, + EtThresholdCut=1000, + TrackMatchBuilderTool=EMTrackMatchBuilder +) -photonSuperClusterBuilder = AlgFactory( egammaAlgsConf.photonSuperClusterBuilder, - name = 'photonSuperClusterBuilder', - InputEgammaRecContainerName=egammaKeys.EgammaRecKey(), - SuperPhotonRecCollectionName=egammaKeys.PhotonSuperRecKey(), - ClusterCorrectionTool=egammaSwTool, - egammaCheckEnergyDepositTool = egammaCheckEnergyDepositTool, - MVACalibSvc= egammaMVASvc, - ConversionBuilderTool = EMConversionBuilder - ) +photonSuperClusterBuilder = AlgFactory( + egammaAlgsConf.photonSuperClusterBuilder, + name='photonSuperClusterBuilder', + InputEgammaRecContainerName=egammaKeys.EgammaRecKey(), + SuperPhotonRecCollectionName=egammaKeys.PhotonSuperRecKey(), + ClusterCorrectionTool=egammaSwTool, + egammaCheckEnergyDepositTool=egammaCheckEnergyDepositTool, + MVACalibSvc=egammaMVASvc, + ConversionBuilderTool=EMConversionBuilder +) diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaTopoClusterCopier.py b/Reconstruction/egamma/egammaAlgs/python/egammaTopoClusterCopier.py index a127a20457af601048dae2a71018ad4c50bd0064..3b314af0653a123e0cf6cfe7d70850b5d738d486 100644 --- a/Reconstruction/egamma/egammaAlgs/python/egammaTopoClusterCopier.py +++ b/Reconstruction/egamma/egammaAlgs/python/egammaTopoClusterCopier.py @@ -1,16 +1,18 @@ -# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -__doc__ = "ToolFactory to instantiate egammaTopoClusterCopier with default configuration" +__doc__ = """ +ToolFactory to instantiate egammaTopoClusterCopier with default configuration""" __author__ = "Jovan Mitrevski" from egammaAlgs import egammaAlgsConf from egammaRec.Factories import AlgFactory -from egammaRec.egammaRecFlags import jobproperties # to set jobproperties.egammaRecFlags - -egammaTopoClusterCopier = AlgFactory( egammaAlgsConf.egammaTopoClusterCopier, - name = 'egammaTopoClusterCopier' , - InputTopoCollection=jobproperties.egammaRecFlags.inputTopoClusterCollection(), - OutputTopoCollection=jobproperties.egammaRecFlags.egammaTopoClusterCollection(), - OutputTopoCollectionShallow="tmp_"+jobproperties.egammaRecFlags.egammaTopoClusterCollection() - ) +from egammaRec.egammaRecFlags import jobproperties +egammaTopoClusterCopier = AlgFactory( + egammaAlgsConf.egammaTopoClusterCopier, + name='egammaTopoClusterCopier', + InputTopoCollection=jobproperties.egammaRecFlags.inputTopoClusterCollection(), + OutputTopoCollection=jobproperties.egammaRecFlags.egammaTopoClusterCollection(), + OutputTopoCollectionShallow="tmp_" + + jobproperties.egammaRecFlags.egammaTopoClusterCollection() +) diff --git a/Reconstruction/egamma/egammaAlgs/python/topoEgammaBuilder.py b/Reconstruction/egamma/egammaAlgs/python/topoEgammaBuilder.py index 82351fa7dbfca762d19feffc1d7a42d0b844005f..21ef1e92eefdaa641bdc8dfc15f89c6d0c4fe85d 100644 --- a/Reconstruction/egamma/egammaAlgs/python/topoEgammaBuilder.py +++ b/Reconstruction/egamma/egammaAlgs/python/topoEgammaBuilder.py @@ -1,21 +1,21 @@ # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -__doc__ = "ToolFactory to instantiate the two supercluster builders with default configuration" +__doc__ = """ToolFactory to instantiate the +two supercluster builders with default configuration""" __author__ = "Jovan Mitrevski" from egammaAlgs import egammaAlgsConf from egammaRec.Factories import AlgFactory -from egammaRec.egammaRecFlags import jobproperties # noqa: F401 # to set jobproperties.egammaRecFlags from egammaRec import egammaKeys from egammaTools.egammaToolsFactories import EGammaAmbiguityTool -topoEgammaBuilder = AlgFactory( egammaAlgsConf.topoEgammaBuilder, - name = 'topoEgammaBuilder', - SuperElectronRecCollectionName=egammaKeys.ElectronSuperRecKey(), - SuperPhotonRecCollectionName=egammaKeys.PhotonSuperRecKey(), - ElectronOutputName = egammaKeys.outputElectronKey(), - PhotonOutputName = egammaKeys.outputPhotonKey(), - AmbiguityTool = EGammaAmbiguityTool - ) - +topoEgammaBuilder = AlgFactory( + egammaAlgsConf.topoEgammaBuilder, + name='topoEgammaBuilder', + SuperElectronRecCollectionName=egammaKeys.ElectronSuperRecKey(), + SuperPhotonRecCollectionName=egammaKeys.PhotonSuperRecKey(), + ElectronOutputName=egammaKeys.outputElectronKey(), + PhotonOutputName=egammaKeys.outputPhotonKey(), + AmbiguityTool=EGammaAmbiguityTool +) diff --git a/Reconstruction/egamma/egammaAlgs/src/EMBremCollectionBuilder.cxx b/Reconstruction/egamma/egammaAlgs/src/EMBremCollectionBuilder.cxx index 16ca1b03c981f25d4dbb7ad24f801d1b7a765166..969e7ee50f97c250df82079f369467d3057394bb 100644 --- a/Reconstruction/egamma/egammaAlgs/src/EMBremCollectionBuilder.cxx +++ b/Reconstruction/egamma/egammaAlgs/src/EMBremCollectionBuilder.cxx @@ -52,8 +52,6 @@ StatusCode EMBremCollectionBuilder::initialize() { ATH_CHECK(m_slimTool.retrieve()); /* Get the track summary tool */ ATH_CHECK(m_summaryTool.retrieve()); - /* the extrapolation tool*/ - ATH_CHECK(m_extrapolationTool.retrieve()); return StatusCode::SUCCESS; } @@ -194,9 +192,9 @@ EMBremCollectionBuilder::refitTracks( StatusCode EMBremCollectionBuilder::createCollections( - const std::vector<TrackWithIndex>& refitted, - const std::vector<TrackWithIndex>& failedfit, - const std::vector<TrackWithIndex>& trtAlone, + std::vector<TrackWithIndex>& refitted, + std::vector<TrackWithIndex>& failedfit, + std::vector<TrackWithIndex>& trtAlone, TrackCollection* finalTracks, xAOD::TrackParticleContainer* finalTrkPartContainer, const xAOD::TrackParticleContainer* AllTracks) const @@ -225,87 +223,83 @@ EMBremCollectionBuilder::createCollections( StatusCode EMBremCollectionBuilder::createNew( - const TrackWithIndex& Info, + TrackWithIndex& Info, TrackCollection* finalTracks, xAOD::TrackParticleContainer* finalTrkPartContainer, const xAOD::TrackParticleContainer* AllTracks) const { - Trk::Track* track= Info.track.get(); - size_t origIndex = Info.origIndex; + size_t origIndex = Info.origIndex; const xAOD::TrackParticle* original = AllTracks->at(origIndex); /* * Create TrackParticle it should be now owned by finalTrkPartContainer */ xAOD::TrackParticle* aParticle = m_particleCreatorTool->createParticle( - *track, finalTrkPartContainer, nullptr, xAOD::electron); + *(Info.track), finalTrkPartContainer, nullptr, xAOD::electron); - if (!aParticle){ - ATH_MSG_WARNING("Could not create TrackParticle!!! for Track: " << *track); + if (!aParticle) { + ATH_MSG_WARNING( + "Could not create TrackParticle!!! for Track: " << *(Info.track)); return StatusCode::SUCCESS; } - //Add an element link back to original Track Particle collection + // Add an element link back to original Track Particle collection static const SG::AuxElement::Accessor< ElementLink<xAOD::TrackParticleContainer>> tP("originalTrackParticle"); - ElementLink<xAOD::TrackParticleContainer> linkToOriginal(*AllTracks,origIndex); - tP(*aParticle) = linkToOriginal; + ElementLink<xAOD::TrackParticleContainer> linkToOriginal(*AllTracks, + origIndex); + tP(*aParticle) = linkToOriginal; - if(m_doTruth){ - //Add Truth decorations. Copy from the original. + if (m_doTruth) { + // Add Truth decorations. Copy from the original. static const SG::AuxElement::Accessor< ElementLink<xAOD::TruthParticleContainer>> tPL("truthParticleLink"); - if(tPL.isAvailable(*original)){ - ElementLink<xAOD::TruthParticleContainer> linkToTruth= tPL(*original); - tPL(*aParticle) = linkToTruth; - } - static const SG::AuxElement::Accessor<float > tMP ("truthMatchProbability"); - if(tMP.isAvailable(*original)){ + if (tPL.isAvailable(*original)) { + ElementLink<xAOD::TruthParticleContainer> linkToTruth = tPL(*original); + tPL(*aParticle) = linkToTruth; + } + static const SG::AuxElement::Accessor<float> tMP("truthMatchProbability"); + if (tMP.isAvailable(*original)) { float originalProbability = tMP(*original); - tMP(*aParticle)= originalProbability ; + tMP(*aParticle) = originalProbability; } - static const SG::AuxElement::Accessor<int> tT("truthType") ; - if(tT.isAvailable(*original)){ + static const SG::AuxElement::Accessor<int> tT("truthType"); + if (tT.isAvailable(*original)) { int truthType = tT(*original); - tT(*aParticle) = truthType ; + tT(*aParticle) = truthType; } - static const SG::AuxElement::Accessor<int> tO("truthOrigin") ; - if(tO.isAvailable(*original)){ + static const SG::AuxElement::Accessor<int> tO("truthOrigin"); + if (tO.isAvailable(*original)) { int truthOrigin = tO(*original); - tO(*aParticle) = truthOrigin ; - } - }//End truth + tO(*aParticle) = truthOrigin; + } + } // End truth /* * Add qoverP from the last measurement */ - static const SG::AuxElement::Accessor<float > QoverPLM ("QoverPLM"); + static const SG::AuxElement::Accessor<float> QoverPLM("QoverPLM"); float QoverPLast(0); - auto rtsos = track->trackStateOnSurfaces()->rbegin(); - for (;rtsos != track->trackStateOnSurfaces()->rend(); ++rtsos){ - if ((*rtsos)->type(Trk::TrackStateOnSurface::Measurement) - && (*rtsos)->trackParameters()!=nullptr - &&(*rtsos)->measurementOnTrack()!=nullptr - && !(*rtsos)->measurementOnTrack()->type(Trk::MeasurementBaseType::PseudoMeasurementOnTrack)) { - QoverPLast = (*rtsos)->trackParameters()->parameters()[Trk::qOverP]; + auto rtsos = Info.track->trackStateOnSurfaces()->rbegin(); + for (; rtsos != Info.track->trackStateOnSurfaces()->rend(); ++rtsos) { + if ((*rtsos)->type(Trk::TrackStateOnSurface::Measurement) && + (*rtsos)->trackParameters() != nullptr && + (*rtsos)->measurementOnTrack() != nullptr && + !(*rtsos)->measurementOnTrack()->type( + Trk::MeasurementBaseType::PseudoMeasurementOnTrack)) { + QoverPLast = (*rtsos)->trackParameters()->parameters()[Trk::qOverP]; break; } } QoverPLM(*aParticle) = QoverPLast; - //Now Slim the TrK::Track for writing to disk - std::unique_ptr<Trk::Track> slimmed = m_slimTool->slimCopy(*track); - if(!slimmed){ - ATH_MSG_WARNING ("TrackSlimming failed"); - ElementLink<TrackCollection> dummy; - aParticle->setTrackLink(dummy); - }else{ - finalTracks->push_back(std::move(slimmed)); - ElementLink<TrackCollection> trackLink(*finalTracks,finalTracks->size()-1); - aParticle->setTrackLink( trackLink ); - } + // Now Slim the Trk::Track for writing to disk + m_slimTool->slimTrack(*(Info.track)); + finalTracks->push_back(std::move(Info.track)); + ElementLink<TrackCollection> trackLink(*finalTracks,finalTracks->size()-1); + aParticle->setTrackLink( trackLink ); return StatusCode::SUCCESS; } diff --git a/Reconstruction/egamma/egammaAlgs/src/EMBremCollectionBuilder.h b/Reconstruction/egamma/egammaAlgs/src/EMBremCollectionBuilder.h index d9af48a6a4409eac8459b57131d1191bef99eabc..8dbb3cf1a1f1559c3958094f074ee4fc05ca62a5 100644 --- a/Reconstruction/egamma/egammaAlgs/src/EMBremCollectionBuilder.h +++ b/Reconstruction/egamma/egammaAlgs/src/EMBremCollectionBuilder.h @@ -73,14 +73,14 @@ private: std::vector<TrackWithIndex>& failedfit) const; StatusCode createCollections( - const std::vector<TrackWithIndex>& refitted, - const std::vector<TrackWithIndex>& failedfit, - const std::vector<TrackWithIndex>& trtAlone, + std::vector<TrackWithIndex>& refitted, + std::vector<TrackWithIndex>& failedfit, + std::vector<TrackWithIndex>& trtAlone, TrackCollection* finalTracks, xAOD::TrackParticleContainer* finalTrkPartContainer, const xAOD::TrackParticleContainer* AllTracks) const; - StatusCode createNew(const TrackWithIndex& Info, + StatusCode createNew(TrackWithIndex& Info, TrackCollection* finalTracks, xAOD::TrackParticleContainer* finalTrkPartContainer, const xAOD::TrackParticleContainer* AllTracks) const; @@ -106,10 +106,6 @@ private: ToolHandle<Trk::ITrackSummaryTool> m_summaryTool {this, "TrackSummaryTool", "InDetTrackSummaryTool", "Track summary tool"}; - /** @brief Tool for extrapolation */ - ToolHandle<IEMExtrapolationTools> m_extrapolationTool {this, - "ExtrapolationTool", "EMExtrapolationTools", "Extrapolation tool"}; - /** @brief Option to do truth*/ Gaudi::Property<bool> m_doTruth {this, "DoTruth", false, "do truth"}; diff --git a/Reconstruction/egamma/egammaAlgs/src/EMVertexBuilder.cxx b/Reconstruction/egamma/egammaAlgs/src/EMVertexBuilder.cxx index f748863279684768ce8a67b9b90f7b4a1740780b..45da08a28dbfe924090e6875d94c416aeea67848 100644 --- a/Reconstruction/egamma/egammaAlgs/src/EMVertexBuilder.cxx +++ b/Reconstruction/egamma/egammaAlgs/src/EMVertexBuilder.cxx @@ -64,10 +64,9 @@ StatusCode EMVertexBuilder::finalize() { return StatusCode::SUCCESS; } -StatusCode EMVertexBuilder::execute() +StatusCode EMVertexBuilder::execute_r(const EventContext& ctx) const { - const EventContext& ctx =Algorithm::getContext(); //retrieve TrackParticleContainer SG::ReadHandle<xAOD::TrackParticleContainer> TPCol(m_inputTrackParticleContainerKey,ctx); diff --git a/Reconstruction/egamma/egammaAlgs/src/EMVertexBuilder.h b/Reconstruction/egamma/egammaAlgs/src/EMVertexBuilder.h index 270fa1f0fc2a885d9b324fae5a5636723304e6b0..c3ec77f7ed9493c6bc1f89caddbc38cdd3531a67 100644 --- a/Reconstruction/egamma/egammaAlgs/src/EMVertexBuilder.h +++ b/Reconstruction/egamma/egammaAlgs/src/EMVertexBuilder.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef EGAMMAALGS_EMVERTEXBUILDER_H @@ -11,6 +11,7 @@ #include "egammaInterfaces/IEMExtrapolationTools.h" #include "AthenaBaseComps/AthAlgorithm.h" #include "GaudiKernel/ToolHandle.h" +#include "GaudiKernel/EventContext.h" #include "GaudiKernel/ServiceHandle.h" #include "StoreGate/ReadHandleKey.h" #include "StoreGate/WriteHandleKey.h" @@ -28,9 +29,15 @@ class EMVertexBuilder : public AthAlgorithm { virtual StatusCode initialize() override final; virtual StatusCode finalize() override final; - virtual StatusCode execute() override final; + virtual StatusCode execute() override final + { + return execute_r(Algorithm::getContext()); + } private: + // This will become the normal execute when + // inheriting from AthReentrantAlgorithm + StatusCode execute_r(const EventContext& ctx) const; /** Maximum radius accepted for conversion vertices **/ Gaudi::Property<float> m_maxRadius {this, "MaxRadius", 800., diff --git a/Reconstruction/egamma/egammaTools/python/egammaToolsFactories.py b/Reconstruction/egamma/egammaTools/python/egammaToolsFactories.py index c7dc2ab67b0e5dc93388d9c37eb03c03146e0989..7eefbda677df40d888292df6533e693bb8df797b 100644 --- a/Reconstruction/egamma/egammaTools/python/egammaToolsFactories.py +++ b/Reconstruction/egamma/egammaTools/python/egammaToolsFactories.py @@ -25,20 +25,23 @@ from egammaRec.egammaRecFlags import jobproperties import six -def configureClusterCorrections(swTool): - "Add attributes ClusterCorrectionToolsXX to egammaSwTool object" +_clusterTypes = dict( + Ele35='ele35', Ele55='ele55', Ele37='ele37', + Gam35='gam35_unconv', Gam55='gam55_unconv', Gam37='gam37_unconv', + Econv35='gam35_conv', Econv55='gam55_conv', Econv37='gam37_conv' +) + + +# Configure fixed-size (non-supercell) corrections +def configureFixedSizeClusterCorrections(swTool): + "Add attributes ClusterCorrectionToolsXX to egammaSwTool object for fixed-size cluster corrections." from CaloClusterCorrection.CaloSwCorrections import ( make_CaloSwCorrections, rfac, etaoff_b1, etaoff_e1, etaoff_b2, etaoff_e2, phioff_b2, phioff_e2, update, time, listBadChannel) from CaloRec.CaloRecMakers import _process_tools - clusterTypes = dict( - Ele35='ele35', Ele55='ele55', Ele37='ele37', - Gam35='gam35_unconv', Gam55='gam55_unconv', Gam37='gam37_unconv', - Econv35='gam35_conv', Econv55='gam55_conv', Econv37='gam37_conv' - ) - for attrName, clName in six.iteritems(clusterTypes): + for attrName, clName in _clusterTypes.items(): x = 'ClusterCorrectionTools' + attrName if not hasattr(swTool, x) or getattr(swTool, x): continue @@ -49,37 +52,57 @@ def configureClusterCorrections(swTool): cells_name=egammaKeys.caloCellKey()) setattr(swTool, x, _process_tools(swTool, y)) - # Super cluster position only corrections + +# Configure corrections for superclusters. +def configureSuperClusterCorrections(swTool): + "Add attributes ClusterCorrectionToolsXX to egammaSwTool object for corrections for superclusters." + from CaloClusterCorrection.CaloSwCorrections import ( + make_CaloSwCorrections, rfac, etaoff_b1, etaoff_e1, + etaoff_b2, etaoff_e2, phioff_b2, phioff_e2, update, + time, listBadChannel) + from CaloRec.CaloRecMakers import _process_tools + + for attrName, clName in _clusterTypes.items(): + n = 'ClusterCorrectionToolsSuperCluster' + attrName + if not hasattr(swTool, n) or getattr(swTool, n): + continue + + setattr(swTool, n, _process_tools( + swTool, + make_CaloSwCorrections( + clName, + suffix='EGSuperCluster', + version=jobproperties.egammaRecFlags.clusterCorrectionVersion(), + corrlist=[ + [rfac, 'v5'], + [etaoff_b1, 'v5'], + [etaoff_e1, 'v5'], + [etaoff_b2, 'v5'], + [etaoff_e2, 'v5'], + [phioff_b2, 'v5data'], + [phioff_e2, 'v5data'], + [update], + [time], + [listBadChannel]], + cells_name=egammaKeys.caloCellKey()))) + + + +def configureClusterCorrections(swTool): + "Add attributes ClusterCorrectionToolsXX to egammaSwTool object" + configureFixedSizeClusterCorrections(swTool) if jobproperties.egammaRecFlags.doSuperclusters(): - for attrName, clName in six.iteritems(clusterTypes): - n = 'ClusterCorrectionToolsSuperCluster' + attrName - if not hasattr(swTool, n) or getattr(swTool, n): - continue - - setattr(swTool, n, _process_tools( - swTool, - make_CaloSwCorrections( - clName, - suffix='EGSuperCluster', - corrlist=[ - [rfac, 'v5'], - [etaoff_b1, 'v5'], - [etaoff_e1, 'v5'], - [etaoff_b2, 'v5'], - [etaoff_e2, 'v5'], - [phioff_b2, 'v5data'], - [phioff_e2, 'v5data'], - [update], - [time], - [listBadChannel]], - cells_name=egammaKeys.caloCellKey()))) - # End of super cluster position only corrections + configureSuperClusterCorrections(swTool) egammaSwTool = ToolFactory(egammaToolsConf.egammaSwTool, postInit=[configureClusterCorrections]) +egammaSwSuperClusterTool = ToolFactory(egammaToolsConf.egammaSwTool, + postInit=[configureSuperClusterCorrections]) + + EMClusterTool = ToolFactory( egammaToolsConf.EMClusterTool, OutputClusterContainerName=egammaKeys.outputClusterKey(), diff --git a/Reconstruction/egamma/egammaValidation/src/ClusterHistograms.cxx b/Reconstruction/egamma/egammaValidation/src/ClusterHistograms.cxx index d32ad1a47764e0ccda0aef8bad19e7aeabf6f4c3..b9de6cc501a99804469a9a080d8fad7622ebfc03 100644 --- a/Reconstruction/egamma/egammaValidation/src/ClusterHistograms.cxx +++ b/Reconstruction/egamma/egammaValidation/src/ClusterHistograms.cxx @@ -15,7 +15,7 @@ StatusCode ClusterHistograms::initializePlots() { histo2DMap["number_cells_vs_et_in_layer_0_2D"] = (new TH2D(Form("%s_%s",m_name.c_str(),"number_cells_vs_et_in_layer_0_2D"), "Number of cells;E_{T}", 60,0,300,50, 0,100.)); histo2DMap["number_cells_vs_et_in_layer_1_2D"] = (new TH2D(Form("%s_%s",m_name.c_str(),"number_cells_vs_et_in_layer_1_2D"), "Number of cells;E_{T}", 60,0,300,50, 0,100.)); histo2DMap["number_cells_vs_et_in_layer_2_2D"] = (new TH2D(Form("%s_%s",m_name.c_str(),"number_cells_vs_et_in_layer_2_2D"), "Number of cells;E_{T}", 60,0,300,50, 0,100.)); - histo2DMap["number_cells_vs_et_in_layer_3_2D"] = (new TH2D(Form("%s_%s",m_name.c_str(),"number_cells_vs_et_in_layer_3_2D"), "Number of cells;E_{T}", 600,0,300,50, 0,100.)); + histo2DMap["number_cells_vs_et_in_layer_3_2D"] = (new TH2D(Form("%s_%s",m_name.c_str(),"number_cells_vs_et_in_layer_3_2D"), "Number of cells;E_{T}", 60,0,300,50, 0,100.)); histo2DMap["number_cell_in_layer"] = (new TH2D(Form("%s_%s",m_name.c_str(),"number_cell_in_layer"), ";Number of cells;Layer",100,0,200, 4,0,4)); histo2DMap["mu_energy_resolution_2D"] = (new TH2D(Form("%s_%s",m_name.c_str(),"mu_energy_resolution_2D"), ";<#mu>; Energy Resolution", 5,0,80,20,-1,1)); diff --git a/Reconstruction/egamma/egammaValidation/src/ShowerShapesHistograms.cxx b/Reconstruction/egamma/egammaValidation/src/ShowerShapesHistograms.cxx index d17464aaaea9fec8c74100a59df4deaa2449afb4..69c66784f5bd467db03942c72c0540ca92b1f2a9 100644 --- a/Reconstruction/egamma/egammaValidation/src/ShowerShapesHistograms.cxx +++ b/Reconstruction/egamma/egammaValidation/src/ShowerShapesHistograms.cxx @@ -17,9 +17,9 @@ StatusCode ShowerShapesHistograms::initializePlots() { histoMap["rphi"] = (new TH1D(Form("%s_%s",m_name.c_str(),"rphi" ), ";R_{#phi}; R_{#phi} Events" , 355, 0. , 1.1005)); histoMap["weta2"] = (new TH1D(Form("%s_%s",m_name.c_str(),"weta2" ), ";W_{#etas2}; W_{#etas2} Events" , 100, 0. , 0.03 )); histoMap["eratio"] = (new TH1D(Form("%s_%s",m_name.c_str(),"eratio" ), ";E_{ratio}; E_{ratio} Events" , 100, 0. , 1. )); - histoMap["deltae"] = (new TH1D(Form("%s_%s",m_name.c_str(),"deltae" ), ";#DeltaE [GeV]; #DeltaE Events" , 250, 0. , 0.5 )); + histoMap["deltae"] = (new TH1D(Form("%s_%s",m_name.c_str(),"deltae" ), ";#DeltaE [GeV]; #DeltaE Events" , 100, 0. , 0.1 )); histoMap["f1"] = (new TH1D(Form("%s_%s",m_name.c_str(),"f1" ), ";f_{1}; f_{1} Events" , 100, 0. , 1.0 )); - histoMap["fside"] = (new TH1D(Form("%s_%s",m_name.c_str(),"fside" ), ";f_{side}; f_{side} Events" , 350, 0. , 3.5 )); + histoMap["fside"] = (new TH1D(Form("%s_%s",m_name.c_str(),"fside" ), ";f_{side}; f_{side} Events" , 100, 0. , 2.0 )); histoMap["wtots1"] = (new TH1D(Form("%s_%s",m_name.c_str(),"wtots1" ), ";w_{s, tot}; w_{s, tot} Events" , 100, 0. , 10. )); histoMap["ws3"] = (new TH1D(Form("%s_%s",m_name.c_str(),"ws3" ), ";w_{s, 3}; w_{s, 3} Events" , 100, 0. , 1. )); histoMap["lateral"] = (new TH1D(Form("%s_%s",m_name.c_str(),"lateral"), ";Lateral of seed; Events", 50, 0, 1)); diff --git a/Reconstruction/egamma/egammaValidation/src/TruthElectronHistograms.cxx b/Reconstruction/egamma/egammaValidation/src/TruthElectronHistograms.cxx index 7cac5c16162bf9dbc8672d1cda0d2ec5abe4a4bb..07d7b265cefc434ef0f7eb5f0af2bd80139c669c 100644 --- a/Reconstruction/egamma/egammaValidation/src/TruthElectronHistograms.cxx +++ b/Reconstruction/egamma/egammaValidation/src/TruthElectronHistograms.cxx @@ -13,11 +13,11 @@ using namespace egammaMonitoring; StatusCode TruthElectronHistograms::initializePlots() { - histoMap["deltaPhi2"] = new TH1D(Form("%s_%s",m_name.c_str(),"deltaPhi2"), ";deltaPhi2; Events", 20, -0.06, 0.06); - histoMap["deltaEta2"] = new TH1D(Form("%s_%s",m_name.c_str(),"deltaEta2"), ";deltaEta2; Events", 20, -0.04, 0.04); - histoMap["deltaPhiRescaled2"] = new TH1D(Form("%s_%s",m_name.c_str(),"deltaPhiRescaled2"), ";deltaPhi2; Events", 20, -0.04, 0.04); + histoMap["deltaPhi2"] = new TH1D(Form("%s_%s",m_name.c_str(),"deltaPhi2"), ";deltaPhi2; Events", 40, -0.06, 0.06); + histoMap["deltaEta2"] = new TH1D(Form("%s_%s",m_name.c_str(),"deltaEta2"), ";deltaEta2; Events", 40, -0.04, 0.04); + histoMap["deltaPhiRescaled2"] = new TH1D(Form("%s_%s",m_name.c_str(),"deltaPhiRescaled2"), ";deltaPhi2; Events", 40, -0.04, 0.04); - histoMap["d0Oversigmad0"] = new TH1D(Form("%s_%s",m_name.c_str(),"d0Oversigmad0"), "; d0Oversigmad0; Events", 20, -10, 10); + histoMap["d0Oversigmad0"] = new TH1D(Form("%s_%s",m_name.c_str(),"d0Oversigmad0"), "; d0Oversigmad0; Events", 40, -10, 10); histoMap["qOverp_resolution"] = new TH1D(Form("%s_%s",m_name.c_str(),"qOverp_resolution"), ";(q/P reco - q/P truth)/ q/p truth; Events", 60, -1, 1.5); diff --git a/Reconstruction/tauRec/share/run_tau_standalone.py b/Reconstruction/tauRec/share/run_tau_standalone.py index e1893d8c36eb0518f223856783454bd3a26c4774..a85c4ca41c735a8ffb1103ed4a90a1c8f356683d 100644 --- a/Reconstruction/tauRec/share/run_tau_standalone.py +++ b/Reconstruction/tauRec/share/run_tau_standalone.py @@ -142,7 +142,7 @@ logRecoOutputItemList_jobOptions = logging.getLogger( 'py:RecoOutputItemList_job from OutputStreamAthenaPool.CreateOutputStreams import createOutputStream StreamESD=createOutputStream("StreamESD","myESD.pool.root",True) -print StreamESD.ItemList +print (StreamESD.ItemList) # tau stuff diff --git a/Simulation/FastSimulation/FastChainPileup/test/test_g4ms_validation.sh b/Simulation/FastSimulation/FastChainPileup/test/test_g4ms_validation.sh new file mode 100755 index 0000000000000000000000000000000000000000..b0daa560e85fe5302956b801d0e6cf4d0fe84de2 --- /dev/null +++ b/Simulation/FastSimulation/FastChainPileup/test/test_g4ms_validation.sh @@ -0,0 +1,107 @@ +#!/bin/sh +# +# art-description: test +# +# art-type: grid +# art-include: master/Athena +# art-cores: 10 +# art-output: *.root +# art-output: art_core* +# art-output: dcube-* +# art-html: dcube-g4msVsaf2 + +echo "ArtProcess: $ArtProcess" + +case $ArtProcess in + + "start") + echo "Starting" + echo "List of files = " ${ArtInFile} + ;; + + "end") + + echo "Ending" + + echo "Merging PHYS_VAL outputs" + echo "Unsetting ATHENA_NUM_PROC=${ATHENA_NUM_PROC}" + unset ATHENA_NUM_PROC + + # merge the outputs + merge_ntup_file=physval_g4ms_validation_merge.root + NTUPMerge_tf.py --inputNTUP_PHYSVALFile=art_core_*/physval_g4ms_* --outputNTUP_PHYSVAL_MRGFile=${merge_ntup_file} + echo "art-result: $? ntup-merge" + + dcubeXmlNTUP="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/DCube-configs/${AtlasBuildBranch}/physval-validation.xml" + dcubeRefNTUP="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/DCube-refs/${AtlasBuildBranch}/test_g4ms_validation/${merge_ntup_file}" + dcubeRefAF2NTUP="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/DCube-refs/${AtlasBuildBranch}/test_af2_validation/physval_af2_validation_all.root" + + # Histogram comparison of G4MS with AF2 DCube + $ATLAS_LOCAL_ROOT/dcube/current/DCubeClient/python/dcube.py \ + -p -x dcube-physval \ + -c ${dcubeXmlNTUP} -r ${dcubeRefNTUP} ./${merge_ntup_file} + echo "art-result: $? dcube-physval" + + # Histogram comparison of G4MS with AF2 DCube + $ATLAS_LOCAL_ROOT/dcube/current/DCubeClient/python/dcube.py \ + -p -x dcube-g4msVsaf2 \ + -c ${dcubeXmlNTUP} -r ${dcubeRefAF2NTUP} ./${merge_ntup_file} + echo "art-result: $? dcube-g4msVsaf2" + + ;; + + *) + echo "Test $ArtProcess" + + mkdir "art_core_${ArtProcess}" + cd "art_core_${ArtProcess}" + + max_events=1000 + skip_events=$((${max_events}*${ArtProcess})) + echo "Skipping ${skip_events} events, processing ${max_events} events" + + echo "Unsetting ATHENA_NUM_PROC=${ATHENA_NUM_PROC}" + unset ATHENA_NUM_PROC + + # Output files to be saved + hist_file=HITS_${ArtProcess}.pool.root + aod_file=AOD_${ArtProcess}.pool.root + ntup_file=physval_g4ms_${ArtProcess}.root + + # Sim & Reco step + Sim_tf.py --conditionsTag 'default:OFLCOND-MC16-SDR-14' \ + --physicsList 'FTFP_BERT_ATL' --truthStrategy 'MC15aPlus' \ + --simulator 'ATLFASTIIF_G4MS' \ + --postInclude 'default:PyJobTransforms/UseFrontier.py' 'EVNTtoHITS:G4AtlasTests/postInclude.DCubeTest.py' \ + --preInclude 'EVNTtoHITS:SimulationJobOptions/preInclude.BeamPipeKill.py' \ + --preExec 'EVNTtoHITS:simFlags.TightMuonStepping=True' \ + --DataRunNumber '284500' --geometryVersion 'default:ATLAS-R2-2016-01-00-01' \ + --inputEVNTFile='/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/FastChainPileup/mc16_13TeV.410470.PhPy8EG_A14_ttbar_hdamp258p75_nonallhad.merge.EVNT.e6337_e5984_tid12860049_00/EVNT.12860049._002516.pool.root.1' \ + --outputHITSFile=${hist_file} \ + --maxEvents ${max_events} --skipEvents ${skip_events} \ + --randomSeed=1234 --imf False + rc=$? + echo "art-result: $rc Sim_${ArtProcess}" + if [ $rc -eq 0 ] + then + Reco_tf.py --autoConfiguration 'everything' \ + --inputHITSFile=${hist_file} --conditionsTag 'default:OFLCOND-MC16-SDR-25' \ + --geometryVersion 'default:ATLAS-R2-2016-01-00-01' \ + --postExec "all:CfgMgr.MessageSvc().setError+=['HepMcParticleLink']" \ + --postInclude "default:PyJobTransforms/UseFrontier.py" \ + --preExec "all:rec.Commissioning.set_Value_and_Lock(True);from AthenaCommon.BeamFlags import jobproperties;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(20.0);from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True); from LArDigitization.LArDigitizationFlags import jobproperties;jobproperties.LArDigitizationFlags.useEmecIwHighGain.set_Value_and_Lock(False)" 'HITtoRDO:userRunLumiOverride={"run":310000,"lb":61,"starttstamp":1550003600,"mu":60.500};' "from InDetPhysValMonitoring.InDetPhysValJobProperties import InDetPhysValFlags; InDetPhysValFlags.doValidateTightPrimaryTracks.set_Value_and_Lock(True);rec.doCalo=True;rec.doForwardDet=False; rec.doInDet=True;" 'RAWtoESD:from EventTagRawAlgs.EventTagRawAlgsConf import RawInfoSummaryForTagWriter;RawInfoSummaryForTagWriter.BCM_RDOKey=""' \ + --outputAODFile=${aod_file} \ + --valid=True --validationFlags 'doInDet,doMET,doMuon,doZee,doJet' \ + --outputNTUP_PHYSVALFile=${ntup_file} \ + --maxEvents -1 --skipEvents 0 --imf False + rc2=$? + echo "art-result: $rc2 Reco_${ArtProcess}" + # if no problem, remove all files except the output files + fi + # for i in `ls | grep -v "${aod_file}\|${hist_file}\|${ntup_file}"` ; do rm -vrf $i; done + for i in `ls | grep -v "${aod_file}\|${ntup_file}"` ; do rm -vrf $i; done + + + ;; +esac + diff --git a/Simulation/Overlay/IDC_OverlayBase/IDC_OverlayBase/IDC_OverlayBase.icc b/Simulation/Overlay/IDC_OverlayBase/IDC_OverlayBase/IDC_OverlayBase.icc index 084c7dd45373ce167de0606ae34a09e35d529905..6717791a367ac0d48fbca33bca951572ae3a69a2 100644 --- a/Simulation/Overlay/IDC_OverlayBase/IDC_OverlayBase/IDC_OverlayBase.icc +++ b/Simulation/Overlay/IDC_OverlayBase/IDC_OverlayBase/IDC_OverlayBase.icc @@ -20,15 +20,13 @@ StatusCode IDC_OverlayBase::overlayContainer(const IDC_Container *bkgContainer, typedef typename IDC_Container::base_value_type Collection; - // Get all the hashes for the signal container - const std::vector<IdentifierHash> signalHashes = signalContainer->GetAllCurrentHashes(); // There are some use cases where background is empty if (!bkgContainer) { // Only loop through the signal collections and copy them over - for (const IdentifierHash &hashId : signalHashes) { + for (const auto &[hashId, ptr] : signalContainer->GetAllHashPtrPair()) { // Copy the signal collection - std::unique_ptr<Collection> signalCollection = Overlay::copyCollection(hashId, signalContainer->indexFindPtr(hashId)); + std::unique_ptr<Collection> signalCollection = Overlay::copyCollection(hashId, ptr); if (outputContainer->addCollection(signalCollection.get(), hashId).isFailure()) { ATH_MSG_ERROR("Adding signal Collection with hashId " << hashId << " failed"); @@ -41,23 +39,23 @@ StatusCode IDC_OverlayBase::overlayContainer(const IDC_Container *bkgContainer, return StatusCode::SUCCESS; } - // Get all the hashes for the background container - const std::vector<IdentifierHash> bkgHashes = bkgContainer->GetAllCurrentHashes(); // The MC signal container should typically be smaller than bkgContainer, // because the latter contains all the noise, minimum bias and pile up. // Thus we firstly iterate over signal hashes and store them in a map. - std::map<IdentifierHash, bool> overlapMap; - for (const IdentifierHash &hashId : signalHashes) { - overlapMap.emplace(hashId, false); + std::vector < std::pair<IdentifierHash, bool> > overlapMap; + overlapMap.reserve(signalContainer->numberOfCollections()); + for (const auto &[hashId, ptr] : signalContainer->GetAllHashPtrPair()) { + overlapMap.emplace_back(hashId, false); } // Now loop through the background hashes and copy unique ones over - for (const IdentifierHash &hashId : bkgHashes) { - auto search = overlapMap.find(hashId); - if (search == overlapMap.end()) { + for (const auto &[hashId, ptr] : bkgContainer->GetAllHashPtrPair()) { + auto search = std::lower_bound( overlapMap.begin(), overlapMap.end(), hashId, + [](const std::pair<IdentifierHash, bool> &lhs, IdentifierHash rhs) -> bool { return lhs.first < rhs; } ); + if (search == overlapMap.end() || search->first != hashId) { // Copy the background collection - std::unique_ptr<Collection> bkgCollection = Overlay::copyCollection(hashId, bkgContainer->indexFindPtr(hashId)); + std::unique_ptr<Collection> bkgCollection = Overlay::copyCollection(hashId, ptr); if (outputContainer->addCollection(bkgCollection.get(), hashId).isFailure()) { ATH_MSG_ERROR("Adding background Collection with hashId " << hashId << " failed"); diff --git a/TileCalorimeter/TileConditions/python/TileInfoConfigurator.py b/TileCalorimeter/TileConditions/python/TileInfoConfigurator.py index 53acd1b57ac9b8546835aaf02466bde79d9a9766..cdc26888927730087c9fc352544a624c34ba6904 100644 --- a/TileCalorimeter/TileConditions/python/TileInfoConfigurator.py +++ b/TileCalorimeter/TileConditions/python/TileInfoConfigurator.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration ############################################################## # @@ -78,19 +78,18 @@ class _TileInfoConfigurator( TileInfoLoader ): self._coolIsConfigured = True #=== connect all tools to COOL - from AthenaCommon.AppMgr import ToolSvc self.msg.info("Changing default TileBadChanTool configuration to COOL source") from .TileCondToolConf import getTileBadChanTool - ToolSvc += getTileBadChanTool('COOL') + getTileBadChanTool('COOL') self.msg.info("Changing default TileCondToolEmscale configuration to COOL source") from .TileCondToolConf import getTileCondToolEmscale - ToolSvc += getTileCondToolEmscale('COOL') + getTileCondToolEmscale('COOL') self.msg.info("Changing default TileCondToolNoiseSample configuration to COOL source") from .TileCondToolConf import getTileCondToolNoiseSample - ToolSvc += getTileCondToolNoiseSample('COOL') + getTileCondToolNoiseSample('COOL') # self.msg.info("Changing default TileCondToolNoiseAutoCr configuration to COOL source") # from .TileCondToolConf import getTileCondToolAutoCr @@ -102,7 +101,7 @@ class _TileInfoConfigurator( TileInfoLoader ): self.msg.info("Changing default TileCondToolTiming configuration to COOL source") from .TileCondToolConf import getTileCondToolTiming - ToolSvc += getTileCondToolTiming('COOL',type) + getTileCondToolTiming('COOL',type) # self.msg.info("Changing default TileCondToolPulseShape configuration to COOL source") # from .TileCondToolConf import getTileCondToolPulseShape @@ -144,12 +143,10 @@ class _TileInfoConfigurator( TileInfoLoader ): return False #=== connect TileCondToolOfcCool to COOL - from AthenaCommon.AppMgr import ToolSvc from .TileCondToolConf import getTileCondToolOfcCool toolOfcCool = getTileCondToolOfcCool('COOL', type, ofcType, name ) if toolOfcCool is not None: self.msg.info("Changing default TileCondToolOfcCool configuration to COOL source for %s", ofcType) - ToolSvc += toolOfcCool return True elif ofcType == 'OF1': self._coolof1ofcIsConfigured = False @@ -185,11 +182,9 @@ class _TileInfoConfigurator( TileInfoLoader ): name = 'TileCondToolOnlineTiming' #=== connect TileCondToolTiming to COOL - from AthenaCommon.AppMgr import ToolSvc - self.msg.info("Changing default TileCondToolTiming configuration to COOL source") from .TileCondToolConf import getTileCondToolTiming - ToolSvc += getTileCondToolTiming('COOL', type, online, name ) + getTileCondToolTiming('COOL', type, online, name ) @@ -226,14 +221,12 @@ class _TileInfoConfigurator( TileInfoLoader ): self._coolcispulseIsConfigured = True #=== connect all tools to COOL - from AthenaCommon.AppMgr import ToolSvc - self.msg.info("Changing default TileCondToolPulseShape configuration to COOL source") from .TileCondToolConf import getTileCondToolPulseShape - ToolSvc += getTileCondToolPulseShape('COOL','CISPULSE100','TileCondToolPulseShape') - ToolSvc += getTileCondToolPulseShape('COOL','CISPULSE5P2','TileCondToolPulse5p2Shape') - ToolSvc += getTileCondToolPulseShape('COOL','CISLEAK100','TileCondToolLeak100Shape') - ToolSvc += getTileCondToolPulseShape('COOL','CISLEAK5P2','TileCondToolLeak5p2Shape') + getTileCondToolPulseShape('COOL','CISPULSE100','TileCondToolPulseShape') + getTileCondToolPulseShape('COOL','CISPULSE5P2','TileCondToolPulse5p2Shape') + getTileCondToolPulseShape('COOL','CISLEAK100','TileCondToolLeak100Shape') + getTileCondToolPulseShape('COOL','CISLEAK5P2','TileCondToolLeak5p2Shape') #_______________________________________________________________ def setupCOOLLASPULSE(self, defTag = "", dbConnection = ""): @@ -251,11 +244,9 @@ class _TileInfoConfigurator( TileInfoLoader ): self._coollaspulseIsConfigured = True #=== connect TileCondToolOfcCool to COOL - from AthenaCommon.AppMgr import ToolSvc - self.msg.info("Changing default TileCondToolPulseShape configuration to COOL source") from .TileCondToolConf import getTileCondToolPulseShape - ToolSvc += getTileCondToolPulseShape('COOL','LAS','TileCondToolPulseShape') + getTileCondToolPulseShape('COOL','LAS','TileCondToolPulseShape') #_______________________________________________________________ def setupCOOLPHYPULSE(self, defTag = "", dbConnection = ""): @@ -273,11 +264,9 @@ class _TileInfoConfigurator( TileInfoLoader ): self._coolphypulseIsConfigured = True #=== connect TileCondToolOfcCool to COOL - from AthenaCommon.AppMgr import ToolSvc - self.msg.info("Changing default TileCondToolPHYPULSECool configuration to COOL source") from .TileCondToolConf import getTileCondToolPulseShape - ToolSvc += getTileCondToolPulseShape('COOL') + getTileCondToolPulseShape('COOL') #_______________________________________________________________ def setupCOOLINTEGRATOR(self, defTag = "", dbConnection = ""): @@ -295,11 +284,9 @@ class _TileInfoConfigurator( TileInfoLoader ): self._coolintegratorIsConfigured = True #=== connect TileCondToolIntegrator to COOL - from AthenaCommon.AppMgr import ToolSvc - self.msg.info("Changing default TileCondToolIntegrator configuration to COOL source") from .TileCondToolConf import getTileCondToolIntegrator - ToolSvc += getTileCondToolIntegrator('COOL','TileCondToolIntegrator') + getTileCondToolIntegrator('COOL','TileCondToolIntegrator') #_______________________________________________________________ def setupCOOLMUID(self, defTag = "", dbConnection = ""): @@ -317,11 +304,9 @@ class _TileInfoConfigurator( TileInfoLoader ): self._coolmuidIsConfigured = True #=== connect TileCondToolMuID to COOL - from AthenaCommon.AppMgr import ToolSvc - self.msg.info("Changing default TileCondToolMuID configuration to COOL source") from .TileCondToolConf import getTileCondToolMuID - ToolSvc += getTileCondToolMuID('COOL','TileCondToolMuID') + getTileCondToolMuID('COOL','TileCondToolMuID') #_______________________________________________________________ @@ -340,11 +325,9 @@ class _TileInfoConfigurator( TileInfoLoader ): self._coolacrIsConfigured = True #=== connect TileCondToolMuID to COOL - from AthenaCommon.AppMgr import ToolSvc - self.msg.info("Changing default TileCondToolNoiseAutoCr configuration to COOL source") from .TileCondToolConf import getTileCondToolAutoCr - ToolSvc += getTileCondToolAutoCr('COOL','TileCondToolAutoCr') + getTileCondToolAutoCr('COOL','TileCondToolAutoCr') #_______________________________________________________________ def setupCOOLEMEXPERT(self, defTag = "", dbConnection = ""): @@ -362,11 +345,9 @@ class _TileInfoConfigurator( TileInfoLoader ): self._coolEmExpertIsConfigured = True #=== connect TileExpertToolEmscale to COOL - from AthenaCommon.AppMgr import ToolSvc - self.msg.info("Changing default TileExpertToolEmscale configuration to COOL source") from .TileCondToolConf import getTileExpertToolEmscale - ToolSvc += getTileExpertToolEmscale('COOL') + getTileExpertToolEmscale('COOL') return @@ -429,12 +410,10 @@ class _TileInfoConfigurator( TileInfoLoader ): return True #=== connect TileCondToolMuID to COOL - from AthenaCommon.AppMgr import ToolSvc from .TileCondToolConf import getTileCondToolDspThreshold toolDspThreshold = getTileCondToolDspThreshold('COOL','TileCondToolDspThreshold') if toolDspThreshold is not None: self.msg.info("Changing default TileCondToolDspThreshold configuration to COOL source") - ToolSvc += toolDspThreshold self._coolDspThresholdIsConfigured = True return True else: diff --git a/TileCalorimeter/TileMonitoring/src/TileDigitsFlxMonitorAlgorithm.cxx b/TileCalorimeter/TileMonitoring/src/TileDigitsFlxMonitorAlgorithm.cxx index a0c545e5cbe2fd7c3f72fd2b726e02c71f52b292..f7e963f19700bc3619e933b1174ecd3027671b96 100644 --- a/TileCalorimeter/TileMonitoring/src/TileDigitsFlxMonitorAlgorithm.cxx +++ b/TileCalorimeter/TileMonitoring/src/TileDigitsFlxMonitorAlgorithm.cxx @@ -47,8 +47,7 @@ StatusCode TileDigitsFlxMonitorAlgorithm::fillHistograms( const EventContext& ct SG::ReadHandle<TileDigitsContainer> digitsContainer(m_digitsContainerKey, ctx); ATH_CHECK( digitsContainer.isValid() ); - for (IdentifierHash hash : digitsContainer->GetAllCurrentHashes()) { - const TileDigitsCollection* digitsCollection = digitsContainer->indexFindPtr (hash); + for (const TileDigitsCollection* digitsCollection : *digitsContainer) { int fragId = digitsCollection->identify(); unsigned int drawer = (fragId & 0x3F); diff --git a/TileCalorimeter/TileRecUtils/src/TileBeamElemDumper.cxx b/TileCalorimeter/TileRecUtils/src/TileBeamElemDumper.cxx index b499f0469013e9a40f3b94912f81599daf24c649..4936dd55fb40bd8ac5a887ec492d6790934fb60b 100644 --- a/TileCalorimeter/TileRecUtils/src/TileBeamElemDumper.cxx +++ b/TileCalorimeter/TileRecUtils/src/TileBeamElemDumper.cxx @@ -68,8 +68,7 @@ StatusCode TileBeamElemDumper::execute (const EventContext& ctx) const << ") BSflags: 0x" << std::hex << cont->get_bsflags() << std::dec << std::endl; - for (IdentifierHash hash : cont->GetAllCurrentHashes()) { - const TileBeamElemCollection* coll = cont->indexFindPtr (hash); + for (auto coll : *cont) { fout << static_cast<std::string> (*coll); fout << "\n"; } diff --git a/TileCalorimeter/TileRecUtils/src/TileDigitsDumper.cxx b/TileCalorimeter/TileRecUtils/src/TileDigitsDumper.cxx index cd07abe81bbbb7316dcda558b8ead6f03f68e3a0..e675acdc28671b8582daeacc47fc06ab1ba8e726 100644 --- a/TileCalorimeter/TileRecUtils/src/TileDigitsDumper.cxx +++ b/TileCalorimeter/TileRecUtils/src/TileDigitsDumper.cxx @@ -76,8 +76,7 @@ StatusCode TileDigitsDumper::execute (const EventContext& ctx) const << ") BSflags: 0x" << std::hex << cont->get_bsflags() << std::dec << std::endl; - for (IdentifierHash hash : cont->GetAllCurrentHashes()) { - const TileDigitsCollection* coll = cont->indexFindPtr (hash); + for (const TileDigitsCollection* coll : *cont) { fout << static_cast<std::string> (*coll); coll->printExtra (fout); fout << "\n"; diff --git a/TileCalorimeter/TileRecUtils/src/TileRawChannelDumper.cxx b/TileCalorimeter/TileRecUtils/src/TileRawChannelDumper.cxx index 368de8a6a7b8fc43ba64e2c94520047023edc3f6..36fdf13a58e56d9c5ba8b0e7488219c28669a368 100644 --- a/TileCalorimeter/TileRecUtils/src/TileRawChannelDumper.cxx +++ b/TileCalorimeter/TileRecUtils/src/TileRawChannelDumper.cxx @@ -76,8 +76,7 @@ StatusCode TileRawChannelDumper::execute (const EventContext& ctx) const << ") BSflags: 0x" << std::hex << cont->get_bsflags() << std::dec << std::endl; - for (IdentifierHash hash : cont->GetAllCurrentHashes()) { - const TileRawChannelCollection* coll = cont->indexFindPtr (hash); + for (const TileRawChannelCollection* coll : *cont) { fout << static_cast<std::string> (*coll); fout << "\n"; } diff --git a/TileCalorimeter/TileSimAlgs/src/TileDigitsMaker.cxx b/TileCalorimeter/TileSimAlgs/src/TileDigitsMaker.cxx index a23e580a210c4f8d02a7cee174142a5318c61800..475c7a6b043021427d2ef2bf3fc34a467422b244 100644 --- a/TileCalorimeter/TileSimAlgs/src/TileDigitsMaker.cxx +++ b/TileCalorimeter/TileSimAlgs/src/TileDigitsMaker.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ //**************************************************************************** @@ -1188,8 +1188,6 @@ StatusCode TileDigitsMaker::FillDigitCollection(const TileHitCollection* hitColl IdContext drawer_context = m_tileHWID->drawer_context(); /* Set up buffers for handling information in a single collection. */ - IdentifierHash idhash; - HWIdentifier drawer_id = m_tileHWID->drawer_id(hitCollection->identify()); int ros = m_tileHWID->ros(drawer_id); int drawer = m_tileHWID->drawer(drawer_id); diff --git a/Tools/PROCTools/python/RunTier0TestsTools.py b/Tools/PROCTools/python/RunTier0TestsTools.py index 02fcca2f770ba40847c30e72fa1f7349f291891c..2a64d9fa180006f6f7c1d9cc668aac0937869992 100644 --- a/Tools/PROCTools/python/RunTier0TestsTools.py +++ b/Tools/PROCTools/python/RunTier0TestsTools.py @@ -25,10 +25,10 @@ ciRefFileMap = { 's3505-21.0' : 'v1', 's3505-21.3' : 'v1', 's3505-21.9' : 'v1', - 's3505-22.0' : 'v3', + 's3505-22.0' : 'v4', # OverlayTier0Test_required-test 'overlay-d1498-21.0' : 'v2', - 'overlay-d1498-22.0' : 'v31', + 'overlay-d1498-22.0' : 'v32', 'overlay-bkg-21.0' : 'v1', 'overlay-bkg-22.0' : 'v4', } diff --git a/Tools/PyUtils/bin/checkMetaSG.py b/Tools/PyUtils/bin/checkMetaSG.py index 26211f16f569ec56499ab172afd3b7e0da0e1698..66e6e22f25989172733ea2eed4658704a09606bf 100755 --- a/Tools/PyUtils/bin/checkMetaSG.py +++ b/Tools/PyUtils/bin/checkMetaSG.py @@ -15,7 +15,6 @@ from __future__ import print_function -__version__ = "$Revision: 724150 $" __author__ = "Will Buttinger <will@cern.ch>" import sys diff --git a/Tools/PyUtils/bin/checkTP.py b/Tools/PyUtils/bin/checkTP.py index 325faa77b50f5c49c930b9da53fd83a345bdc03e..5494a43340ac8a5a72b63e85a86dd2fa105bc76b 100755 --- a/Tools/PyUtils/bin/checkTP.py +++ b/Tools/PyUtils/bin/checkTP.py @@ -20,7 +20,6 @@ from __future__ import print_function import sys import os -__version__ = "$Revision: 1.3 $" __author__ = "Sebastien Binet" # MN: this has no effect when using RootType diff --git a/Tools/PyUtils/bin/checkxAOD.py b/Tools/PyUtils/bin/checkxAOD.py index cd09a7b2865313846301b1913c62e00230eaa58f..c694d0a0bcd59f35ab836410a45c3de32c8f8af3 100755 --- a/Tools/PyUtils/bin/checkxAOD.py +++ b/Tools/PyUtils/bin/checkxAOD.py @@ -10,7 +10,6 @@ from __future__ import print_function -__version__ = "$Revision: 776263 $" __author__ = "Sebastien Binet <binet@cern.ch>, " \ "Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>, " \ "RD Schaffer R.D.Schaffer@cern.ch" diff --git a/Tools/PyUtils/bin/diff-jobo-cfg.py b/Tools/PyUtils/bin/diff-jobo-cfg.py index bd2d7009a02a955e2826fadc87c174dd06c71bec..8b6d464d6f6fbb546742636d13992eb68851e553 100755 --- a/Tools/PyUtils/bin/diff-jobo-cfg.py +++ b/Tools/PyUtils/bin/diff-jobo-cfg.py @@ -16,7 +16,6 @@ from __future__ import print_function -__version__ = "$Revision: 298860 $" __author__ = "Sebastien Binet, Adrien Renaud" import sys diff --git a/Tools/PyUtils/bin/filter-and-merge-d3pd.py b/Tools/PyUtils/bin/filter-and-merge-d3pd.py index f53ff2638255d37b2d047f9a559b48df7f8a9c74..6cae1e2dfa6c05da86e73ce202f2655eda7acce9 100755 --- a/Tools/PyUtils/bin/filter-and-merge-d3pd.py +++ b/Tools/PyUtils/bin/filter-and-merge-d3pd.py @@ -747,7 +747,6 @@ Accepted command line options: # @author http://code.activestate.com/recipes/573463 # slightly adapted to follow PEP8 conventions -__version__ = "$Revision: 547442 $" __doc__ = """\ functions to convert an XML file into a python dict, back and forth """ diff --git a/Tools/PyUtils/bin/print_auditor_callgraph.py b/Tools/PyUtils/bin/print_auditor_callgraph.py index e3bf1cc952c81286fe11e5750ef14723ac845b99..5d4c72751b17bf1f475ac35305ea769fd28f7cf5 100755 --- a/Tools/PyUtils/bin/print_auditor_callgraph.py +++ b/Tools/PyUtils/bin/print_auditor_callgraph.py @@ -16,7 +16,6 @@ from __future__ import print_function -__version__ = "$Revision: 1.1 $" __author__ = "Sebastien Binet <binet@cern.ch>" import os @@ -30,11 +29,11 @@ class Steps: ALLOWED = ('ini', 'exe', 'fin') def parse_log_file(fname, step=Steps.ini): - beg_pat = re.compile(r"NameAuditor.*?About to Enter "\ - r"(?P<CompName>.*?) "\ + beg_pat = re.compile(r"NameAuditor.*?About to Enter " + r"(?P<CompName>.*?) " r"%s Method"%step) - end_pat = re.compile(r"NameAuditor.*?Just Exited "\ - r"(?P<CompName>.*?) "\ + end_pat = re.compile(r"NameAuditor.*?Just Exited " + r"(?P<CompName>.*?) " r"%s Method"%step) stack = 0 diff --git a/Tools/PyUtils/python/Logging.py b/Tools/PyUtils/python/Logging.py index 5459479b4db34a8e5bff7a9841073fb256fa4271..4646514d31405ff40a4a7a12e762962efa6edaa5 100644 --- a/Tools/PyUtils/python/Logging.py +++ b/Tools/PyUtils/python/Logging.py @@ -5,7 +5,6 @@ ## @purpose: try to import Logging from AthenaCommon. ## falls back on stdlib's one -__version__ = "$Revision$" __author__ = "Sebastien Binet" __all__ = ['msg', 'logging'] diff --git a/Tools/PyUtils/python/scripts/__init__.py b/Tools/PyUtils/python/scripts/__init__.py index dbf2414bfc45b73fa5cb28b33a9a672864d0b1d7..55cac552735daa7c39c652d7499a893d9d602537 100644 --- a/Tools/PyUtils/python/scripts/__init__.py +++ b/Tools/PyUtils/python/scripts/__init__.py @@ -4,20 +4,17 @@ import PyUtils.acmdlib as acmdlib acmdlib.register('chk-file', 'PyUtils.scripts.check_file') +acmdlib.register('chk-sg', 'PyUtils.scripts.check_sg') +acmdlib.register('chk-rflx', 'PyUtils.scripts.check_reflex') acmdlib.register('diff-pool', 'PyUtils.scripts.diff_pool_files') acmdlib.register('diff-root', 'PyUtils.scripts.diff_root_files') acmdlib.register('dump-root', 'PyUtils.scripts.dump_root_file') -acmdlib.register('chk-sg', 'PyUtils.scripts.check_sg') acmdlib.register('ath-dump', 'PyUtils.scripts.ath_dump') -acmdlib.register('chk-rflx', 'PyUtils.scripts.check_reflex') acmdlib.register('gen-klass', 'PyUtils.scripts.gen_klass') acmdlib.register('merge-files', 'PyUtils.scripts.merge_files') acmdlib.register('filter-files', 'PyUtils.scripts.filter_files') -acmdlib.register('cmake.new-skeleton', 'PyUtils.scripts.cmake_newskeleton') -acmdlib.register('cmake.new-pkg', 'PyUtils.scripts.cmake_newpkg') -acmdlib.register('cmake.new-analysisalg', 'PyUtils.scripts.cmake_newanalysisalg') acmdlib.register('cmake.depends', 'PyUtils.scripts.cmake_depends') acmdlib.register('jira.issues', 'PyUtils.scripts.jira_issues') diff --git a/Tools/PyUtils/python/scripts/cmake_depends.py b/Tools/PyUtils/python/scripts/cmake_depends.py index b0ab8de345e6727afe86b2971639be0f6bdeca8d..d598e41b096673e750b9273d4b22bfc09d70b2b6 100644 --- a/Tools/PyUtils/python/scripts/cmake_depends.py +++ b/Tools/PyUtils/python/scripts/cmake_depends.py @@ -186,6 +186,7 @@ class AthGraph: @acmdlib.argument('--cmakedot', help=argparse.SUPPRESS) def main(args): + """Inspect cmake build dependencies""" # Find packages.dot: if not args.cmakedot: diff --git a/Tools/PyUtils/python/scripts/cmake_newanalysisalg.py b/Tools/PyUtils/python/scripts/cmake_newanalysisalg.py deleted file mode 100644 index db945efeb73b8f638b4cd57a87888d897615e82f..0000000000000000000000000000000000000000 --- a/Tools/PyUtils/python/scripts/cmake_newanalysisalg.py +++ /dev/null @@ -1,408 +0,0 @@ -# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration - -# @file PyUtils.scripts.cmt_newanalysisalg -# @purpose streamline and ease the creation of new athena algs -# @author Will Buttinger -# @date February 2017 - -#Note - this code could use a serious rewrite, I just hacked it together to get something working - -from __future__ import with_statement, print_function - -__author__ = "Will Buttinger" -__doc__ = "streamline and ease the creation of new AthAnalysisAlgorithm" - -### imports ------------------------------------------------------------------- -import os -import textwrap -import PyUtils.acmdlib as acmdlib -import fileinput - -from future import standard_library -standard_library.install_aliases() -import subprocess - -class Templates: - alg_hdr_template = """\ -#ifndef %(guard)s -#define %(guard)s 1 - -#include "AthAnalysisBaseComps/AthAnalysisAlgorithm.h" - -//Example ROOT Includes -//#include "TTree.h" -//#include "TH1D.h" - -%(namespace_begin)s - -class %(klass)s: public ::AthAnalysisAlgorithm { - public: - %(klass)s( const std::string& name, ISvcLocator* pSvcLocator ); - virtual ~%(klass)s(); - - ///uncomment and implement methods as required - - //IS EXECUTED: - virtual StatusCode initialize(); //once, before any input is loaded - virtual StatusCode beginInputFile(); //start of each input file, only metadata loaded - //virtual StatusCode firstExecute(); //once, after first eventdata is loaded (not per file) - virtual StatusCode execute(); //per event - //virtual StatusCode endInputFile(); //end of each input file - //virtual StatusCode metaDataStop(); //when outputMetaStore is populated by MetaDataTools - virtual StatusCode finalize(); //once, after all events processed - - - ///Other useful methods provided by base class are: - ///evtStore() : ServiceHandle to main event data storegate - ///inputMetaStore() : ServiceHandle to input metadata storegate - ///outputMetaStore() : ServiceHandle to output metadata storegate - ///histSvc() : ServiceHandle to output ROOT service (writing TObjects) - ///currentFile() : TFile* to the currently open input file - ///retrieveMetadata(...): See twiki.cern.ch/twiki/bin/view/AtlasProtected/AthAnalysisBase#ReadingMetaDataInCpp - - - private: - - //Example algorithm property, see constructor for declaration: - //int m_nProperty = 0; - - //Example histogram, see initialize method for registration to output histSvc - //TH1D* m_myHist = 0; - //TTree* m_myTree = 0; - -}; -%(namespace_end)s -#endif //> !%(guard)s -""" - - alg_cxx_template = """\ -// %(pkg)s includes -#include "%(namespace_klass)s.h" - -//#include "xAODEventInfo/EventInfo.h" - - -%(namespace_begin)s - -%(klass)s::%(klass)s( const std::string& name, ISvcLocator* pSvcLocator ) : AthAnalysisAlgorithm( name, pSvcLocator ){ - - //declareProperty( "Property", m_nProperty = 0, "My Example Integer Property" ); //example property declaration - -} - - -%(klass)s::~%(klass)s() {} - - -StatusCode %(klass)s::initialize() { - ATH_MSG_INFO ("Initializing " << name() << "..."); - // - //This is called once, before the start of the event loop - //Retrieves of tools you have configured in the joboptions go here - // - - //HERE IS AN EXAMPLE - //We will create a histogram and a ttree and register them to the histsvc - //Remember to configure the histsvc stream in the joboptions - // - //m_myHist = new TH1D("myHist","myHist",100,0,100); - //CHECK( histSvc()->regHist("/MYSTREAM/myHist", m_myHist) ); //registers histogram to output stream - //m_myTree = new TTree("myTree","myTree"); - //CHECK( histSvc()->regTree("/MYSTREAM/SubDirectory/myTree", m_myTree) ); //registers tree to output stream inside a sub-directory - - - return StatusCode::SUCCESS; -} - -StatusCode %(klass)s::finalize() { - ATH_MSG_INFO ("Finalizing " << name() << "..."); - // - //Things that happen once at the end of the event loop go here - // - - - return StatusCode::SUCCESS; -} - -StatusCode %(klass)s::execute() { - ATH_MSG_DEBUG ("Executing " << name() << "..."); - setFilterPassed(false); //optional: start with algorithm not passed - - - - // - //Your main analysis code goes here - //If you will use this algorithm to perform event skimming, you - //should ensure the setFilterPassed method is called - //If never called, the algorithm is assumed to have 'passed' by default - // - - - //HERE IS AN EXAMPLE - //const xAOD::EventInfo* ei = 0; - //CHECK( evtStore()->retrieve( ei , "EventInfo" ) ); - //ATH_MSG_INFO("eventNumber=" << ei->eventNumber() ); - //m_myHist->Fill( ei->averageInteractionsPerCrossing() ); //fill mu into histogram - - - setFilterPassed(true); //if got here, assume that means algorithm passed - return StatusCode::SUCCESS; -} - -StatusCode %(klass)s::beginInputFile() { - // - //This method is called at the start of each input file, even if - //the input file contains no events. Accumulate metadata information here - // - - //example of retrieval of CutBookkeepers: (remember you will need to include the necessary header files and use statements in requirements file) - // const xAOD::CutBookkeeperContainer* bks = 0; - // CHECK( inputMetaStore()->retrieve(bks, "CutBookkeepers") ); - - //example of IOVMetaData retrieval (see https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/AthAnalysisBase#How_to_access_file_metadata_in_C) - //float beamEnergy(0); CHECK( retrieveMetadata("/TagInfo","beam_energy",beamEnergy) ); - //std::vector<float> bunchPattern; CHECK( retrieveMetadata("/Digitiation/Parameters","BeamIntensityPattern",bunchPattern) ); - - - - return StatusCode::SUCCESS; -} - -%(namespace_end)s -""" - testxml_template = """\ - <TEST name="%(namespace_klass)s" type="athena" suite="ASGTests"> - <options_atn>%(pkg)s/%(namespace_klass)sJobOptions.py</options_atn> - <timelimit>5</timelimit> - <author> PLEASE ENTER A NAME </author> - <mailto> PLEASEENTER@cern.ch </mailto> - <expectations> - <errorMessage> Athena exited abnormally </errorMessage> - <errorMessage>FAILURE (ERROR)</errorMessage> - <returnValue>0</returnValue> - </expectations> - </TEST> -""" - - -### functions ----------------------------------------------------------------- -@acmdlib.command( - name='cmake.new-analysisalg' - ) -@acmdlib.argument( - 'algname', - help="name of the new alg" - ) -@acmdlib.argument( - '--newJobo', - action='store_true', - default=False, - help='Create a skeleton joboption for execution of the new algorithm' - ) - -def main(args): - """create a new AthAnalysisAlgorithm inside the current package. Call from within the package directory - - ex: - $ acmd cmake new-analysisalg MyAlg - """ - sc = 0 - - full_alg_name = args.algname - - #determine the package from the cwd - cwd = os.getcwd() - #check that src dir exists and CMakeLists.txt exists (i.e. this is a package) - if not os.path.isdir(cwd+"/src") or not os.path.isfile(cwd+"/CMakeLists.txt"): - print ("ERROR you must call new-analysisalg from within the package you want to add the algorithm to") - return -1 - - - full_pkg_name = os.path.basename(cwd) - print (textwrap.dedent("""\ - ::: create alg [%(full_alg_name)s] in pkg [%(full_pkg_name)s]""" %locals())) - - - #first we must check that CMakeLists.txt file has the AthAnalysisBaseComps dependency in it - foundBaseComps=False - hasxAODEventInfo=False - hasAtlasROOT=False - hasAsgTools=False - lastUse=0 - lineCount=0 - hasLibraryLine=False - hasComponentLine=False - for line in open('CMakeLists.txt'): - lineCount +=1 - if "atlas_add_library" in line: hasLibraryLine=True - if "atlas_add_component" in line: hasComponentLine=True - -#GOT THIS FAR WITH EDITING - - - - - - #following code borrowed from gen_klass - hdr = getattr(Templates, 'alg_hdr_template') - cxx = getattr(Templates, 'alg_cxx_template') - - namespace_klass = full_alg_name.replace('::','__') - namespace_begin,namespace_end = "","" - namespace = "" - if full_alg_name.count("::")>0: - namespace = full_alg_name.split("::")[0] - full_alg_name = full_alg_name.split("::")[1] - namespace_begin = "namespace %s {" % namespace - namespace_end = "} //> end namespace %s" % namespace - pass - - guard = "%s_%s_H" % (full_pkg_name.upper(), namespace_klass.upper()) - - d = dict( pkg=full_pkg_name, - klass=full_alg_name, - guard=guard, - namespace_begin=namespace_begin, - namespace_end=namespace_end,namespace_klass=namespace_klass,namespace=namespace - ) - fname = os.path.splitext("src/%s"%namespace_klass)[0] - #first check doesn't exist - if os.path.isfile(fname+'.h'): - print ("::: ERROR %s.h already exists" % fname) - return -1 - print ("::: INFO Creating %s.h" % fname) - o_hdr = open(fname+'.h', 'w') - o_hdr.writelines(hdr%d) - o_hdr.flush() - o_hdr.close() - - if os.path.isfile(fname+'.cxx'): - print ("::: ERROR %s.cxx already exists" % fname) - return -1 - print ("::: INFO Creating %s.cxx" % fname) - o_cxx = open(fname+'.cxx', 'w') - o_cxx.writelines(cxx%d) - o_cxx.flush() - o_cxx.close() - - #now add the algorithm to the _entries.cxx file in the components folder - #first check they exist - if not os.path.exists("src/components"): os.mkdir("src/components") - if not os.path.isfile("src/components/%s_load.cxx"%full_pkg_name): - print ("::: INFO Creating src/components/%s_load.cxx"%full_pkg_name) - loadFile = open("src/components/%s_load.cxx"%full_pkg_name,'w') - loadFile.writelines(""" -#include "GaudiKernel/LoadFactoryEntries.h" -LOAD_FACTORY_ENTRIES(%(pkg)s) -"""%d) - loadFile.flush() - loadFile.close() - - if not os.path.isfile("src/components/%s_entries.cxx"%full_pkg_name): - print ("::: INFO Creating src/components/%s_entries.cxx"%full_pkg_name) - loadFile = open("src/components/%s_entries.cxx"%full_pkg_name,'w') - if len(namespace_begin)>0: - d["namespace"] = args.algname.split("::")[0] - loadFile.writelines(""" -#include "GaudiKernel/DeclareFactoryEntries.h" - -#include "../%(namespace_klass)s.h" - -DECLARE_NAMESPACE_ALGORITHM_FACTORY(%(namespace)s, %(klass)s ) - -DECLARE_FACTORY_ENTRIES( %(pkg)s ) -{ - DECLARE_NAMESPACE_ALGORITHM(%(namespace)s, %(klass)s ); -} -"""%d) - else: - loadFile.writelines(""" -#include "GaudiKernel/DeclareFactoryEntries.h" - -#include "../%(namespace_klass)s.h" - -DECLARE_ALGORITHM_FACTORY( %(klass)s ) - -DECLARE_FACTORY_ENTRIES( %(pkg)s ) -{ - DECLARE_ALGORITHM( %(klass)s ); -} -"""%d) - loadFile.flush() - loadFile.close() - else: - #first check algorithm not already in _entries file - inFile=False - for line in open("src/components/%s_entries.cxx"%full_pkg_name): - if len(namespace_begin)==0 and "DECLARE_ALGORITHM" in line and d["klass"] in line: inFile=True - if len(namespace_begin)>0 and "DECLARE_NAMESPACE_ALGORITHM" in line and d["klass"] in line and d["namespace"]: inFile=True - - if not inFile: - print ("::: INFO Adding %s to src/components/%s_entries.cxx"% (args.algname,full_pkg_name)) - nextAdd=False - for line in fileinput.input("src/components/%s_entries.cxx"%full_pkg_name, inplace=1): - if nextAdd and "{" not in line: - nextAdd=False - if len(namespace_begin)>0: - print (""" DECLARE_NAMESPACE_ALGORITHM(%(namespace)s, %(klass)s );"""%d) - else: - print (""" DECLARE_ALGORITHM( %(klass)s );"""%d) - if line.startswith("DECLARE_FACTORY_ENTRIES"): - nextAdd=True - if len(namespace_begin)>0: - - print (""" -#include "../%(namespace_klass)s.h" -DECLARE_NAMESPACE_ALGORITHM_FACTORY( %(namespace)s, %(klass)s ) -"""%d) - else: - print (""" -#include "../%(namespace_klass)s.h" -DECLARE_ALGORITHM_FACTORY( %(klass)s ) -"""%d) - print (line, end='') - - - if args.newJobo: - #make the joboptions file too - full_jobo_name = namespace_klass + "JobOptions" - full_alg_name = namespace_klass - - print (textwrap.dedent("""\ - ::: create jobo [%(full_jobo_name)s] for alg [%(full_alg_name)s]""" %locals())) - - #following code borrowed from gen_klass - from cmt_newjobo import Templates as joboTemplates - jobo = getattr(joboTemplates, 'jobo_template') - - e = dict( klass=full_alg_name, - inFile=os.environ['ASG_TEST_FILE_MC'], - ) - fname = 'share/%s.py' % full_jobo_name - #first check doesn't exist - if os.path.isfile(fname): - print ("::: WARNING %s already exists .. will not overwrite" % fname) - else: - o_hdr = open(fname, 'w') - o_hdr.writelines(jobo%e) - o_hdr.flush() - o_hdr.close() - - #need to reconfigure cmake so it knows about the new files - #rely on the WorkDir_DIR env var for this - workDir = os.environ.get("WorkDir_DIR") - if workDir is None: - print ("::: ERROR No WorkDir_DIR env var, did you forget to source the setup.sh script?") - print ("::: ERROR Please do this and reconfigure cmake manually!") - else: - print ("::: INFO Reconfiguring cmake %s/../." % workDir) - res = subprocess.getstatusoutput('cmake %s/../.' % workDir) - if res[0]!=0: - print ("::: WARNING reconfigure unsuccessful. Please reconfigure manually!") - - - print ("::: INFO Please ensure your CMakeLists.txt file has ") - print ("::: atlas_add_component( %s src/component/*.cxx ... )" % full_pkg_name) - print ("::: INFO and necessary dependencies declared ") - print ("::: INFO Minimum dependency is: Control/AthAnalysisBaseComps") - diff --git a/Tools/PyUtils/python/scripts/cmake_newpkg.py b/Tools/PyUtils/python/scripts/cmake_newpkg.py deleted file mode 100644 index 3451bd557cb133c89513caacf80b6b2719df0c1b..0000000000000000000000000000000000000000 --- a/Tools/PyUtils/python/scripts/cmake_newpkg.py +++ /dev/null @@ -1,154 +0,0 @@ -# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration - -# @file PyUtils.scripts.cmake_newpkg -# @purpose streamline and ease the creation of new cmake packages -# @author Will Buttinger -# @date Feb 2017 - -from __future__ import with_statement, print_function - -__author__ = "Will buttinger" -__doc__ = "streamline and ease the creation of new cmake packages" - -### imports ------------------------------------------------------------------- -import os -import textwrap -import PyUtils.acmdlib as acmdlib - -from future import standard_library -standard_library.install_aliases() -import subprocess - -### functions ----------------------------------------------------------------- -@acmdlib.command( - name='cmake.new-pkg' - ) -@acmdlib.argument( - 'pkgname', - help="(fully qualified) name of the new package" - ) -@acmdlib.argument( - '--author', - default='${USER}', - help='name of the author of this new package' - ) - -def main(args): - """create a new cmake package with sensible atlas-oriented defaults - - ex: - $ acmd cmake new-pkg Control/MyContainer/NewPackage - """ - sc = 0 - - full_pkg_name = args.pkgname - if full_pkg_name[0] == '/': - full_pkg_name = full_pkg_name[1:] - - pkg_path = os.path.dirname(os.getcwd() + "/" + full_pkg_name) - pkg_name = os.path.basename(full_pkg_name) - pkg_vers = '%s-00-00-00' % pkg_name - author = os.path.expanduser(os.path.expandvars(args.author)) - - if os.path.exists(pkg_path+"/"+pkg_name): - print ("ERROR: %s package already exists" % full_pkg_name) - return 1 - - print (textwrap.dedent("""\ - ::: creating package [%(full_pkg_name)s]... - ::: - pkg name: %(pkg_name)s - ::: - pkg version: %(pkg_vers)s - ::: - pkg path: %(pkg_path)s - ::: - author: %(author)s""" % locals())) - - - #create the directories - try: - os.makedirs(pkg_path+"/"+pkg_name+"/src") - os.makedirs(pkg_path+"/"+pkg_name+"/share") - os.makedirs(pkg_path+"/"+pkg_name+"/python") - os.makedirs(pkg_path+"/"+pkg_name+"/data") - os.makedirs(pkg_path+"/"+pkg_name+"/util") - except OSError: - print ("ERROR while making directories for " % (pkg_path+"/"+pkg_name+"/src")) - return -1 - - - with open(os.path.join(pkg_path+"/"+pkg_name,'CMakeLists.txt'), 'w') as req: - print (textwrap.dedent("""\ - ## automatically generated CMakeLists.txt file - - # Declare the package - atlas_subdir( %(pkg_name)s ) - - # Declare external dependencies ... default here is to include ROOT - find_package( ROOT COMPONENTS MathCore RIO Core Tree Hist ) - - # Declare public and private dependencies - # Public dependencies are anything that appears in the headers in public include dir - # Private is anything else - - # An example is included - atlas_depends_on_subdirs( - PUBLIC - - PRIVATE - # Control/AthAnalysisBaseComps - ) - - # Declare package as a library - # Note the convention that library names get "Lib" suffix - # Any package you add to dependencies above, you should add - # to LINK_LIBRARIES line below (see the example) - atlas_add_library( %(pkg_name)sLib src/*.cxx - PUBLIC_HEADERS %(pkg_name)s - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} - #AthAnalysisBaseCompsLib - ) - - # if you add components (tools, algorithms) to this package - # uncomment the next lines - # atlas_add_component( %(pkg_name)s src/components/*.cxx - # LINK_LIBRARIES %(pkg_name)sLib - # ) - - # if you add an application (exe) to this package - # declare it like this (note convention that apps live in util dir) - # atlas_add_executable( MyApp util/myApp.cxx - # LINK_LIBRARIES %(pkg_name)sLib - # ) - - # Install python modules, joboptions, and share content - atlas_install_python_modules( python/*.py ) - atlas_install_joboptions( share/*.py ) - atlas_install_data( data/* ) - # You can access your data from code using path resolver, e.g. - # PathResolverFindCalibFile("%(pkg_name)s/file.txt") - - - """%locals()), file=req) - - #also create a version.cmake file with PackageName-00-00-01 in it - with open(os.path.join(pkg_path+"/"+pkg_name,'version.cmake'), 'w') as req: - print (("%s-00-00-01" % pkg_name), file=req) - - #need to reconfigure cmake so it knows about the new files - #rely on the WorkDir_DIR env var for this - workDir = os.environ.get("WorkDir_DIR") - if workDir is None: - print ("::: ERROR No WorkDir_DIR env var, did you forget to source the setup.sh script?") - print ("::: ERROR Please do this and reconfigure cmake manually!") - else: - print ("::: INFO Reconfiguring cmake %s/../." % workDir) - res = subprocess.getstatusoutput('cmake %s/../.' % workDir) - if res[0]!=0: - print ("::: WARNING reconfigure unsuccessful. Please reconfigure manually!") - - - print ("::: creating package [%(full_pkg_name)s]... [done]" % locals()) - - - - return sc - diff --git a/Tools/PyUtils/python/scripts/cmake_newskeleton.py b/Tools/PyUtils/python/scripts/cmake_newskeleton.py deleted file mode 100644 index b48dd07188ccaa10317c88abc5cd29acecffe02e..0000000000000000000000000000000000000000 --- a/Tools/PyUtils/python/scripts/cmake_newskeleton.py +++ /dev/null @@ -1,131 +0,0 @@ -# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration - -# @file PyUtils.scripts.cmt_newanalysisalg -# @purpose streamline and ease the creation of new athena algs -# @author Will Buttinger -# @date February 2017 - -#Note - this code could use a serious rewrite, I just hacked it together to get something working - -from __future__ import with_statement, print_function - -__author__ = "Will Buttinger" -__doc__ = "streamline and ease the creation of new AthAnalysisAlgorithm in a new package" - -### imports ------------------------------------------------------------------- -import os -import textwrap -import PyUtils.acmdlib as acmdlib - -from future import standard_library -standard_library.install_aliases() -import subprocess - - -### functions ----------------------------------------------------------------- -@acmdlib.command( - name='cmake.new-skeleton' - ) -@acmdlib.argument( - 'pkgname', - help="name of the new pkg" - ) - - -def main(args): - """create a new skeleton package - - ex: - $ acmd cmake new-skeleton MyPackage - """ - sc = 0 - - full_pkg_name = args.pkgname - - #make new package - res = subprocess.getstatusoutput('acmd cmake new-pkg %s' % full_pkg_name) - if res[0]!=0: - print ("::: ERROR could not create new package") - return -1 - - - #add algorithm - res = subprocess.getstatusoutput('cd %s;acmd cmake new-analysisalg --newJobo %sAlg' % (full_pkg_name,full_pkg_name)) - if res[0]!=0: - print ("::: ERROR could not create new alg") - return -1 - - pkg_name = full_pkg_name - - # overwrite CMakeLists with our skeleton - with open(os.path.join(full_pkg_name,'CMakeLists.txt'), 'w') as req: - print (textwrap.dedent("""\ - ## automatically generated CMakeLists.txt file - - # Declare the package - atlas_subdir( %(pkg_name)s ) - - # Declare external dependencies ... default here is to include ROOT - find_package( ROOT COMPONENTS MathCore RIO Core Tree Hist ) - - # Declare public and private dependencies - # Public dependencies are anything that appears in the headers in public include dir - # Private is anything else - - # An example is included - atlas_depends_on_subdirs( - PUBLIC - - PRIVATE - Control/AthAnalysisBaseComps - ) - - # Declare package as a library - # Note the convention that library names get "Lib" suffix - # Any package you add to dependencies above, you should add - # to LINK_LIBRARIES line below (see the example) - atlas_add_library( %(pkg_name)sLib src/*.cxx - PUBLIC_HEADERS %(pkg_name)s - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} - AthAnalysisBaseCompsLib - ) - - # if you add components (tools, algorithms) to this package - # these lines are needed so you can configure them in joboptions - atlas_add_component( %(pkg_name)s src/components/*.cxx - LINK_LIBRARIES %(pkg_name)sLib - ) - - # if you add an application (exe) to this package - # declare it like this (note convention that apps go in the util dir) - # atlas_add_executable( MyApp util/myApp.cxx - # LINK_LIBRARIES %(pkg_name)sLib - # ) - - # Install python modules, joboptions, and share content - atlas_install_python_modules( python/*.py ) - atlas_install_joboptions( share/*.py ) - atlas_install_data( data/* ) - # You can access your data from code using path resolver, e.g. - # PathResolverFindCalibFile("%(pkg_name)s/file.txt") - - - """%locals()), file=req) - - - - - #need to reconfigure cmake so it knows about the new files - #rely on the WorkDir_DIR env var for this - workDir = os.environ.get("WorkDir_DIR") - if workDir is None: - print ("::: ERROR No WorkDir_DIR env var, did you forget to source the setup.sh script?") - print ("::: ERROR Please do this and reconfigure cmake manually!") - else: - print ("::: INFO Reconfiguring cmake %s/../." % workDir) - res = subprocess.getstatusoutput('cmake %s/../.' % workDir) - if res[0]!=0: - print ("::: WARNING reconfigure unsuccessful. Please reconfigure manually!") - - diff --git a/Tools/PyUtils/python/scripts/cmt_newjobo.py b/Tools/PyUtils/python/scripts/cmt_newjobo.py deleted file mode 100644 index 4d09dd880f44fda67cfb10c2560382803438c95b..0000000000000000000000000000000000000000 --- a/Tools/PyUtils/python/scripts/cmt_newjobo.py +++ /dev/null @@ -1,139 +0,0 @@ -# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration - -# @file PyUtils.scripts.cmt_newalg -# @purpose streamline and ease the creation of a skeleton joboption -# @author Will Buttinger -# @date March 2015 - -#Note - this code could use a serious rewrite, I just hacked it together to get something working - -from __future__ import with_statement, print_function - -__author__ = "Will Buttinger" -__doc__ = "streamline and ease the creation of new skeleton joboption for analysis" - -### imports ------------------------------------------------------------------- -import os -import textwrap -import PyUtils.acmdlib as acmdlib - -class Templates: - jobo_template = """\ -#Skeleton joboption for a simple analysis job - -#---- Minimal joboptions ------- - -theApp.EvtMax=10 #says how many events to run over. Set to -1 for all events -jps.AthenaCommonFlags.FilesInput = ["%(inFile)s"] #insert your list of input files here (do this before next lines) - -#Now choose your read mode (POOL, xAOD, or TTree): - -#POOL: -#import AthenaPoolCnvSvc.ReadAthenaPool #sets up reading of any POOL files (but POOL is slow) - -#xAOD: -import AthenaRootComps.ReadAthenaxAODHybrid #FAST xAOD reading! - -#TTree: -#import AthenaRootComps.ReadAthenaRoot #read a flat TTree, very fast, but no EDM objects -#svcMgr.EventSelector.TupleName="MyTree" #You usually must specify the name of the tree (default: CollectionTree) - -algseq = CfgMgr.AthSequencer("AthAlgSeq") #gets the main AthSequencer -algseq += CfgMgr.%(klass)s() #adds an instance of your alg to it - -#------------------------------- - - -#note that if you edit the input files after this point you need to pass the new files to the EventSelector: -#like this: svcMgr.EventSelector.InputCollections = ["new","list"] - - - - - -##-------------------------------------------------------------------- -## This section shows up to set up a HistSvc output stream for outputing histograms and trees -## See https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/AthAnalysisBase#How_to_output_trees_and_histogra for more details and examples - -#if not hasattr(svcMgr, 'THistSvc'): svcMgr += CfgMgr.THistSvc() #only add the histogram service if not already present (will be the case in this jobo) -#svcMgr.THistSvc.Output += ["MYSTREAM DATAFILE='myfile.root' OPT='RECREATE'"] #add an output root file stream - -##-------------------------------------------------------------------- - - -##-------------------------------------------------------------------- -## The lines below are an example of how to create an output xAOD -## See https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/AthAnalysisBase#How_to_create_an_output_xAOD for more details and examples - -#from OutputStreamAthenaPool.MultipleStreamManager import MSMgr -#xaodStream = MSMgr.NewPoolRootStream( "StreamXAOD", "xAOD.out.root" ) - -##EXAMPLE OF BASIC ADDITION OF EVENT AND METADATA ITEMS -##AddItem and AddMetaDataItem methods accept either string or list of strings -#xaodStream.AddItem( ["xAOD::JetContainer#*","xAOD::JetAuxContainer#*"] ) #Keeps all JetContainers (and their aux stores) -#xaodStream.AddMetaDataItem( ["xAOD::TriggerMenuContainer#*","xAOD::TriggerMenuAuxContainer#*"] ) -#ToolSvc += CfgMgr.xAODMaker__TriggerMenuMetaDataTool("TriggerMenuMetaDataTool") #MetaDataItems needs their corresponding MetaDataTool -#svcMgr.MetaDataSvc.MetaDataTools += [ ToolSvc.TriggerMenuMetaDataTool ] #Add the tool to the MetaDataSvc to ensure it is loaded - -##EXAMPLE OF SLIMMING (keeping parts of the aux store) -#xaodStream.AddItem( ["xAOD::ElectronContainer#Electrons","xAOD::ElectronAuxContainer#ElectronsAux.pt.eta.phi"] ) #example of slimming: only keep pt,eta,phi auxdata of electrons - -##EXAMPLE OF SKIMMING (keeping specific events) -#xaodStream.AddAcceptAlgs( "%(klass)s" ) #will only keep events where 'setFilterPassed(false)' has NOT been called in the given algorithm - -##-------------------------------------------------------------------- - - -include("AthAnalysisBaseComps/SuppressLogging.py") #Optional include to suppress as much athena output as possible. Keep at bottom of joboptions so that it doesn't suppress the logging of the things you have configured above - -""" - - - -### functions ----------------------------------------------------------------- -@acmdlib.command( - name='cmt.new-jobo' - ) -@acmdlib.argument( - 'joboName', - help="name of the joboption" - ) -@acmdlib.argument( - 'alg', - default='MyAlg', - help='name of the algorithm to add to sequence' - ) -@acmdlib.argument( - '--inFile', - default='my.pool.root', - help='name of an input file to add to EventSelector' - ) -def main(args): - """create a new algorithm inside the current package. Call from within the package directory - - ex: - $ acmd cmt new-jobo myJobo MyAlg - """ - - full_jobo_name = args.joboName - full_alg_name = args.alg - - print (textwrap.dedent("""\ - ::: create jobo [%(full_jobo_name)s] for alg [%(full_alg_name)s]""" %locals())) - - #following code borrowed from gen_klass - jobo = getattr(Templates, 'jobo_template') - - d = dict( klass=args.alg, - inFile=args.inFile, - ) - fname = args.joboName+'.py' - #first check doesn't exist - if os.path.isfile(fname): - print ("::: ERROR %s already exists" % fname) - return -1 - o_hdr = open(fname, 'w') - o_hdr.writelines(jobo%d) - o_hdr.flush() - o_hdr.close() - diff --git a/Tools/PyUtils/python/scripts/diff_pool_files.py b/Tools/PyUtils/python/scripts/diff_pool_files.py index 5f9de6453525f9689e00439371295e4008192019..90db00dbcd32425354efed1faa01e76fe5bc992e 100644 --- a/Tools/PyUtils/python/scripts/diff_pool_files.py +++ b/Tools/PyUtils/python/scripts/diff_pool_files.py @@ -1,12 +1,11 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # @file PyUtils.scripts.diff_pool_files # @purpose check that 2 POOL files have same content (containers and sizes). # @author Sebastien Binet # @date February 2010 -__version__ = "$Revision: 276362 $" -__doc__ = "check that 2 POOL files have same content (containers and sizes)." +__doc__ = "diff two POOL files (containers and sizes)" __author__ = "Sebastien Binet" @@ -23,8 +22,7 @@ import PyUtils.acmdlib as acmdlib default=False, help="""Enable verbose printout""") def main(args): - """check that 2 POOL files have same content (containers and sizes) - """ + """diff two POOL files (containers and sizes)""" import os.path as osp old = osp.expandvars(osp.expanduser(args.old)) diff --git a/Tools/PyUtils/python/scripts/diff_root_files.py b/Tools/PyUtils/python/scripts/diff_root_files.py index 33797a6742ef18152bc474520889721536c11626..f5c785f992ec91d92df8c74e1f9765484796dbe5 100644 --- a/Tools/PyUtils/python/scripts/diff_root_files.py +++ b/Tools/PyUtils/python/scripts/diff_root_files.py @@ -5,7 +5,7 @@ # @author Sebastien Binet # @date February 2010 -__doc__ = "check that 2 ROOT files have same content (containers and sizes)." +__doc__ = "diff two ROOT files (containers and sizes)" __author__ = "Sebastien Binet" ### imports ------------------------------------------------------------------- @@ -96,8 +96,8 @@ allowed: %(choices)s help="""Compare nan as equal to nan""") def main(args): - """check that 2 ROOT files have same content (containers and sizes) - """ + """diff two ROOT files (containers and sizes)""" + global g_args g_args = args diff --git a/Tools/PyUtils/python/scripts/filter_files.py b/Tools/PyUtils/python/scripts/filter_files.py index 4c93e976cb0d92708209a647f045af2fb1cf74c9..6114b95c221ae3aed5a268f73c9370371e2a788d 100644 --- a/Tools/PyUtils/python/scripts/filter_files.py +++ b/Tools/PyUtils/python/scripts/filter_files.py @@ -7,12 +7,13 @@ # @date March 2010 from __future__ import with_statement -__doc__ = "take a bunch of input (pool/bs) files and produce a filtered one" +__doc__ = "filter multiple input (pool/bs) files" __author__ = "Sebastien Binet" ### imports ------------------------------------------------------------------- import PyUtils.acmdlib as acmdlib +import six @acmdlib.command( name='filter-files' @@ -33,8 +34,8 @@ import PyUtils.acmdlib as acmdlib help='comma separated list of tuples (run,event) numbers to select or an ascii file containg a list of such run+event numbers to select' ) def main(args): - """take a bunch of input (pool/bs) files and produce a filtered one - """ + """filter multiple input (pool/bs) files""" + exitcode = 0 import PyUtils.Logging as L @@ -83,7 +84,7 @@ def main(args): selection = [] for item in args.selection: - if not isinstance(item, (tuple, list, int, int)): + if not isinstance(item, (tuple, list) + six.integer_types): raise TypeError('type: %r' % type(item)) if isinstance(item, (tuple, list)): diff --git a/Tools/PyUtils/python/scripts/merge_files.py b/Tools/PyUtils/python/scripts/merge_files.py index b87db3b1ac584d13aac3741bb9e08852cfbe07a8..58a6ebed1a0987b0445fb1860e9833f4e8916545 100644 --- a/Tools/PyUtils/python/scripts/merge_files.py +++ b/Tools/PyUtils/python/scripts/merge_files.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # @file PyUtils.scripts.merge_files # @purpose take a bunch of input (pool/bs) files and produce a single one @@ -6,8 +6,7 @@ # @author Sebastien Binet # @date February 2010 -__version__ = "$Revision: 310812 $" -__doc__ = "take a bunch of input (pool/bs) files and produce a single one" +__doc__ = "merge multiple input (pool/bs) files" __author__ = "Sebastien Binet" @@ -39,8 +38,8 @@ import PyUtils.acmdlib as acmdlib help = "Path to a file where to put athena job's logfile" ) def main(args): - """take a bunch of input (pool/bs) files and produce a single one - """ + """merge multiple input (pool/bs) files""" + exitcode = 0 import PyUtils.Logging as L @@ -48,7 +47,6 @@ def main(args): msg.setLevel(L.logging.INFO) msg.info(':'*40) - msg.info('welcome to merge-files version %s', __version__) import os.path as osp args.files = [ osp.expandvars(osp.expanduser(fname)) diff --git a/Tracking/Acts/ActsGeometry/ActsGeometry/ActsExtrapolationAlg.h b/Tracking/Acts/ActsGeometry/ActsGeometry/ActsExtrapolationAlg.h index c2812be02f3195ea62bf4e4b9551fa2c4c5be0da..9c6aa5d3058a8296f7eee7da2395dd427322651d 100755 --- a/Tracking/Acts/ActsGeometry/ActsGeometry/ActsExtrapolationAlg.h +++ b/Tracking/Acts/ActsGeometry/ActsGeometry/ActsExtrapolationAlg.h @@ -29,10 +29,9 @@ namespace Acts { } } + class IActsMaterialTrackWriterSvc; -template<typename> -class RootExCellWriter; class EventContext; class IAthRNGSvc; class IActsExtrapolationTool; @@ -51,7 +50,6 @@ private: ToolHandle<IActsExtrapolationTool> m_extrapolationTool{this, "ExtrapolationTool", "ActsExtrapolationTool"}; - std::shared_ptr<RootExCellWriter<Acts::TrackParameters>> m_rootEccWriter; // poor-mans Particle Gun is included here right now Gaudi::Property<std::vector<double>> m_etaRange{this, "EtaRange", {-3, 3}, "The eta range for particles"}; diff --git a/Tracking/Acts/ActsGeometry/python/ActsGeometryConfig.py b/Tracking/Acts/ActsGeometry/python/ActsGeometryConfig.py index 2a07d14ba361401689ca8c9d504f86a2ed974174..d22b648a9354ce81200197cd87bb466d932bc0b4 100644 --- a/Tracking/Acts/ActsGeometry/python/ActsGeometryConfig.py +++ b/Tracking/Acts/ActsGeometry/python/ActsGeometryConfig.py @@ -16,11 +16,49 @@ def ActsTrackingGeometrySvcCfg(configFlags, name = "ActsTrackingGeometrySvc" ) : subDetectors += ["TRT"] if configFlags.Detector.GeometryCalo: subDetectors += ["Calo"] + + # need to configure calo geometry, otherwise we get a crash + from LArGeoAlgsNV.LArGMConfig import LArGMCfg + result.merge(LArGMCfg(configFlags)) + from TileGeoModel.TileGMConfig import TileGMCfg + result.merge(TileGMCfg(configFlags)) + + idSub = [sd in subDetectors for sd in ("Pixel", "SCT", "TRT")] + if any(idSub): + # ANY of the ID subdetectors are on => we require GM sources + # In principle we could require only what is enabled, but the group + # does extra config that I don't want to duplicate here + from AtlasGeoModel.InDetGMConfig import InDetGeometryCfg + result.merge(InDetGeometryCfg(configFlags)) + + if not all(idSub): + from AthenaCommon.Logging import log + log.warning("ConfigFlags indicate %s should be built. Not all ID subdetectors are set, but I'll set all of them up to capture the extra setup happening here.", ", ".join(subDetectors)) + + actsTrackingGeometrySvc = Acts_ActsTrackingGeometrySvc(name, BuildSubDetectors = subDetectors) + + from AthenaCommon.Constants import VERBOSE + actsTrackingGeometrySvc.OutputLevel = VERBOSE result.addService(actsTrackingGeometrySvc) return result +def ActsPropStepRootWriterSvcCfg(configFlags, + name="ActsPropStepRootWriterSvc", + FilePath="propsteps.root", + TreeName="propsteps"): + result = ComponentAccumulator() + + ActsPropStepRootWriterSvc = CompFactory.ActsPropStepRootWriterSvc + svc = ActsPropStepRootWriterSvc(name=name, + FilePath=FilePath, + TreeName=TreeName) + + result.addService(svc) + + return result + def ActsTrackingGeometryToolCfg(configFlags, name = "ActsTrackingGeometryTool" ) : result = ComponentAccumulator() @@ -45,6 +83,18 @@ def NominalAlignmentCondAlgCfg(configFlags, name = "NominalAlignmentCondAlg", ** return result +def ActsAlignmentCondAlgCfg(configFlags, name = "ActsAlignmentCondAlg", **kwargs) : + result = ComponentAccumulator() + + acc = ActsTrackingGeometrySvcCfg(configFlags) + result.merge(acc) + + Acts_ActsAlignmentCondAlg = CompFactory.ActsAlignmentCondAlg + actsAlignmentCondAlg = Acts_ActsAlignmentCondAlg(name, **kwargs) + result.addCondAlgo(actsAlignmentCondAlg) + + return result + from MagFieldServices.MagFieldServicesConfig import MagneticFieldSvcCfg def ActsExtrapolationToolCfg(configFlags, name = "ActsExtrapolationTool" ) : result=ComponentAccumulator() diff --git a/Tracking/Acts/ActsGeometry/share/ActsExtrapolationAlg.py b/Tracking/Acts/ActsGeometry/share/ActsExtrapolationAlg.py index 72d816cf8c13cdc22c921b9555b90315ace466c4..e2907f4e0508cd17c93d25e78e576bc4086e63ae 100644 --- a/Tracking/Acts/ActsGeometry/share/ActsExtrapolationAlg.py +++ b/Tracking/Acts/ActsGeometry/share/ActsExtrapolationAlg.py @@ -3,144 +3,81 @@ This job options file will run an example extrapolation using the Acts tracking geometry and the Acts extrapolation toolchain. """ -import os -import logging - -# Use Global flags and DetFlags. -from AthenaCommon.DetFlags import DetFlags -from AthenaCommon.GlobalFlags import globalflags - -from AthenaCommon.ConcurrencyFlags import jobproperties as jp -from AthenaCommon.Logging import log as msg -nThreads = jp.ConcurrencyFlags.NumThreads() -# for some reason, the synchronization fails if we run in ST... -if (nThreads < 1) : - msg.fatal('numThreads must be >0. Did you set the --threads=N option?') - sys.exit(AthenaCommon.ExitCodes.CONFIGURATION_ERROR) - -from AthenaCommon.AthenaCommonFlags import athenaCommonFlags -athenaCommonFlags.FilesInput = [ - "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/esd/100evts10lumiblocks.ESD.root" -] - -import AthenaPoolCnvSvc.ReadAthenaPool - -# build GeoModel -import AthenaPython.ConfigLib as apcl -cfg = apcl.AutoCfg(name = 'TrackingGeometryTest', input_files=athenaCommonFlags.FilesInput()) - -cfg.configure_job() - -from AthenaCommon.GlobalFlags import globalflags -if len(globalflags.ConditionsTag())!=0: - from IOVDbSvc.CondDB import conddb - conddb.setGlobalTag(globalflags.ConditionsTag()) - -from AtlasGeoModel.InDetGMJobProperties import InDetGeometryFlags -InDetGeometryFlags.useDynamicAlignFolders=True - -# Just the pixel and SCT -DetFlags.ID_setOn() -DetFlags.Calo_setOn() - - -# Initialize geometry -# THIS ACTUALLY DOES STUFF!! -from AtlasGeoModel import GeoModelInit -from AtlasGeoModel import SetGeometryVersion - -from AthenaCommon.AlgScheduler import AlgScheduler -AlgScheduler.OutputLevel( INFO ) -AlgScheduler.ShowControlFlow( True ) -AlgScheduler.ShowDataDependencies( True ) -AlgScheduler.EnableConditions( True ) -AlgScheduler.setDataLoaderAlg( "SGInputLoader" ) - -## SET UP ALIGNMENT CONDITIONS ALGORITHM -from IOVSvc.IOVSvcConf import CondSvc -svcMgr += CondSvc( OutputLevel=INFO ) -from ActsGeometry import ActsGeometryConf -from AthenaCommon.AlgSequence import AthSequencer -condSeq = AthSequencer("AthCondSeq") - -# nominal alignment: all deltas are identity -# condSeq += ActsGeometryConf.NominalAlignmentCondAlg("NominalAlignmentCondAlg", - # OutputLevel=VERBOSE) - -condSeq += ActsGeometryConf.ActsAlignmentCondAlg("ActsAlignCondAlg", - OutputLevel=INFO) -# periodic shift alignment. Configurable z-shift per lumiblock. -# (currently pixel only) -# condSeq+=ActsGeometryConf.GeomShiftCondAlg("GeomShiftCondAlg_1", - # ZShiftPerLB=0.5, - # OutputLevel=VERBOSE) -## END OF CONDITIONS SETUP - -from AthenaCommon.AppMgr import ServiceMgr - -# set up and configure the acts geometry construction -from ActsGeometry.ActsGeometryConf import ActsTrackingGeometrySvc -trkGeomSvc = ActsTrackingGeometrySvc() -# used for the proxies during material mapping -trkGeomSvc.BarrelMaterialBins = [40, 60] # phi z -trkGeomSvc.EndcapMaterialBins = [50, 20] # phi r -trkGeomSvc.OutputLevel = INFO -trkGeomSvc.BuildSubDetectors = [ - "Pixel", - "SCT", - # "TRT", - # "Calo", -] -trkGeomSvc.UseMaterialMap = False -ServiceMgr += trkGeomSvc - -# We need the Magnetic fiels -import MagFieldServices.SetupField - -from AthenaCommon.AlgSequence import AlgSequence -job = AlgSequence() - -# This is the main extrapolation demo algorithm -from ActsGeometry.ActsGeometryConf import ActsExtrapolationAlg -alg = ActsExtrapolationAlg() -alg.EtaRange = [-2.4, 2.4] -alg.OutputLevel = INFO -alg.NParticlesPerEvent = int(1e4) - -# Record the material track for material map validation -alg.WriteMaterialTracks = False -# we only need this if the extrap alg is set up to write mat tracks -if alg.WriteMaterialTracks == True: - mTrackWriterSvc = CfgMgr.ActsMaterialTrackWriterSvc("ActsMaterialTrackWriterSvc") - mTrackWriterSvc.OutputLevel = INFO - mTrackWriterSvc.FilePath = "MaterialTracks_mapped.root" - ServiceMgr += mTrackWriterSvc - -# sets up the extrapolation tool -# this sets up the tracking geometry svc through the tracking geometry tool -exTool = CfgMgr.ActsExtrapolationTool("ActsExtrapolationTool") -exTool.OutputLevel = INFO -exTool.FieldMode = "ATLAS" -exTool.InteractionMultiScatering = False -exTool.InteractionEloss = False -exTool.InteractionRecord = False -# The extrapolation tool accesses the trackinggeometry service -# through this tool. This tool has the conditions dependencies -# on the alignment GeoAlignmentStores (pseudo-alignment only right now). -# For each event, the GAS for the IOV needs to be set from the algorithm. -trkGeomTool = CfgMgr.ActsTrackingGeometryTool("ActsTrackingGeometryTool") -trkGeomTool.OutputLevel = INFO; -exTool.TrackingGeometryTool = trkGeomTool - -alg.ExtrapolationTool = exTool - -# Make the event heardbeat output a bit nicer -eventPrintFrequency = 10000 -if hasattr(ServiceMgr,"AthenaEventLoopMgr"): - ServiceMgr.AthenaEventLoopMgr.EventPrintoutInterval = eventPrintFrequency -if hasattr(ServiceMgr,"AthenaHiveEventLoopMgr"): - ServiceMgr.AthenaHiveEventLoopMgr.EventPrintoutInterval = eventPrintFrequency - -job += alg - -theApp.EvtMax = 10000 +# start from scratch with component accumulator + +from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator +from AthenaConfiguration.ComponentFactory import CompFactory + +from ActsGeometry.ActsGeometryConfig import ActsExtrapolationToolCfg +from ActsGeometry.ActsGeometryConfig import ActsAlignmentCondAlgCfg, ActsPropStepRootWriterSvcCfg + +def ActsExtrapolationAlgCfg(configFlags, name = "ActsExtrapolationAlg", **kwargs): + result = ComponentAccumulator() + + if "ExtrapolationTool" not in kwargs: + extrapTool = ActsExtrapolationToolCfg(configFlags) + kwargs["ExtrapolationTool"] = extrapTool.getPrimary() + result.merge(extrapTool) + + propStepWriterSvc = ActsPropStepRootWriterSvcCfg(configFlags) + result.merge(propStepWriterSvc) + + ActsExtrapolationAlg = CompFactory.ActsExtrapolationAlg + alg = ActsExtrapolationAlg(name, **kwargs) + result.addEventAlgo(alg) + + return result + +if "__main__" == __name__: + from AthenaCommon.Configurable import Configurable + from AthenaCommon.Logging import log + from AthenaCommon.Constants import VERBOSE + from AthenaConfiguration.AllConfigFlags import ConfigFlags + from AthenaConfiguration.MainServicesConfig import MainServicesCfg + + Configurable.configurableRun3Behavior = True + + ## Just enable ID for the moment. + ConfigFlags.Input.isMC = True + ConfigFlags.Beam.Type = '' + ConfigFlags.GeoModel.AtlasVersion = "ATLAS-R2-2016-01-00-01" + ConfigFlags.IOVDb.GlobalTag = "OFLCOND-SIM-00-00-00" + ConfigFlags.Detector.SimulateBpipe = True + ConfigFlags.Detector.SimulateID = True + ConfigFlags.Detector.GeometryBpipe = True + ConfigFlags.Detector.GeometryID = True + ConfigFlags.Detector.GeometryPixel = True + ConfigFlags.Detector.GeometrySCT = True + ConfigFlags.Detector.GeometryCalo = True + ConfigFlags.Detector.GeometryMuon = False + ConfigFlags.Detector.GeometryTRT = True + ConfigFlags.TrackingGeometry.MaterialSource = "Input" + + ConfigFlags.Concurrency.NumThreads = 10 + ConfigFlags.Concurrency.NumConcurrentEvents = 10 + + ConfigFlags.lock() + ConfigFlags.dump() + + cfg = MainServicesCfg(ConfigFlags) + + from BeamPipeGeoModel.BeamPipeGMConfig import BeamPipeGeometryCfg + cfg.merge(BeamPipeGeometryCfg(ConfigFlags)) + + alignCondAlgCfg = ActsAlignmentCondAlgCfg(ConfigFlags) + + cfg.merge(alignCondAlgCfg) + + alg = ActsExtrapolationAlgCfg(ConfigFlags, + OutputLevel=VERBOSE, + NParticlesPerEvent = int(10), + EtaRange = [-0.5, 0.5], + PtRange = [20, 100]) + + cfg.merge(alg) + + cfg.printConfig() + + log.info("CONFIG DONE") + + cfg.run(1) diff --git a/Tracking/Acts/ActsGeometry/src/ActsCaloTrackingVolumeBuilder.cxx b/Tracking/Acts/ActsGeometry/src/ActsCaloTrackingVolumeBuilder.cxx index 4ea902f2c9640d92732b66b7cce9ff5b97546db4..b80997c2103c6c5d0c6ee796d8277c42047a6389 100644 --- a/Tracking/Acts/ActsGeometry/src/ActsCaloTrackingVolumeBuilder.cxx +++ b/Tracking/Acts/ActsGeometry/src/ActsCaloTrackingVolumeBuilder.cxx @@ -194,13 +194,13 @@ ActsCaloTrackingVolumeBuilder::trackingVolume( // Attach that volume array to the calo inner cover ATH_MSG_VERBOSE("Glueing " << calo->volumeName() << " inner cover to " << idOutVolArray->arrayObjects().size() << " volumes"); std::const_pointer_cast<BoundarySurface>(calo->boundarySurfaces().at(Acts::tubeInnerCover)) - ->attachVolumeArray(idOutVolArray, Acts::outsideVolume); + ->attachVolumeArray(idOutVolArray, Acts::backward); // Loop through the array and attach their boundary surfaces to the calo for(const auto& idVol : idOutVolArray->arrayObjects()){ ATH_MSG_VERBOSE("Glueing outer cover of " << idVol->volumeName() << " to inner cover of " << calo->volumeName()); std::const_pointer_cast<BoundarySurface>(idVol->boundarySurfaces().at(Acts::tubeOuterCover)) - ->attachVolume(calo.get(), Acts::outsideVolume); + ->attachVolume(calo.get(), Acts::forward); } // Glue positive XY face of ID to inner positive XY face of Calo. @@ -209,13 +209,13 @@ ActsCaloTrackingVolumeBuilder::trackingVolume( ATH_MSG_VERBOSE("Glueing " << calo->volumeName() << " positive inner cutout disc to " << idPosXYVolArray->arrayObjects().size() << " volumes"); std::const_pointer_cast<BoundarySurface>(calo->boundarySurfaces().at(Acts::index5)) - ->attachVolumeArray(idPosXYVolArray, Acts::outsideVolume); + ->attachVolumeArray(idPosXYVolArray, Acts::backward); // Other way round, attach ID volumes to calo for(const auto& idVol : idPosXYVolArray->arrayObjects()){ ATH_MSG_VERBOSE("Glueing positive XY face of " << idVol->volumeName() << " to positive inner coutout disc of " << calo->volumeName()); std::const_pointer_cast<BoundarySurface>(idVol->boundarySurfaces().at(Acts::positiveFaceXY)) - ->attachVolume(calo.get(), Acts::outsideVolume); + ->attachVolume(calo.get(), Acts::forward); } // Glue negative XY face of ID to inner negative XY face of Calo. @@ -224,13 +224,13 @@ ActsCaloTrackingVolumeBuilder::trackingVolume( ATH_MSG_VERBOSE("Glueing " << calo->volumeName() << " negative inner cutout disc to " << idNegXYVolArray->arrayObjects().size() << " volumes"); std::const_pointer_cast<BoundarySurface>(calo->boundarySurfaces().at(Acts::index4)) - ->attachVolumeArray(idNegXYVolArray, Acts::outsideVolume); + ->attachVolumeArray(idNegXYVolArray, Acts::forward); // Other way round, attach ID volumes to calo for(const auto& idVol : idNegXYVolArray->arrayObjects()){ ATH_MSG_VERBOSE("Glueing negative XY face of " << idVol->volumeName() << " to negative inner coutout disc of " << calo->volumeName()); std::const_pointer_cast<BoundarySurface>(idVol->boundarySurfaces().at(Acts::negativeFaceXY)) - ->attachVolume(calo.get(), Acts::outsideVolume); + ->attachVolume(calo.get(), Acts::backward); } // For navigational purposes we need to create three pseudo container cylinders. @@ -240,11 +240,11 @@ ActsCaloTrackingVolumeBuilder::trackingVolume( // Construct track vol array for use in positive and negative pseudocontainer. // This will only contain the calo - double caloRMin = caloVolBounds->get(CCVBBV::eMinR); - double caloRMed = caloVolBounds->get(CCVBBV::eMedR); - double caloRMax = caloVolBounds->get(CCVBBV::eMaxR); - double caloDZ1 = caloVolBounds->get(CCVBBV::eHalfLengthZ); - double caloDZ2 = caloVolBounds->get(CCVBBV::eHalfLengthZcutout); + double caloRMin = caloVolBounds->get(CCVBBV::eMinR); + double caloRMed = caloVolBounds->get(CCVBBV::eMedR); + double caloRMax = caloVolBounds->get(CCVBBV::eMaxR); + double caloDZ1 = caloVolBounds->get(CCVBBV::eHalfLengthZ); + double caloDZ2 = caloVolBounds->get(CCVBBV::eHalfLengthZcutout); Acts::Vector3D caloChokeRPos = {caloRMin + (caloRMax - caloRMin)/2., 0, 0}; @@ -383,10 +383,10 @@ ActsCaloTrackingVolumeBuilder::makeCaloVolumeBounds(const std::vector<std::uniqu rmin_at_center -= envR; - std::cout << "rmin_at_center: " << rmin_at_center - << " rmin at choke: " << rmin_at_choke; - std::cout << " rmax: " << rmax << " zmin: " << zmin << " zmax: " << zmax; - std::cout << " coutout_zmin_abs: " << cutout_zmin_abs << std::endl; + ATH_MSG_VERBOSE("rmin_at_center: " << rmin_at_center + << " rmin at choke: " << rmin_at_choke + << " rmax: " << rmax << " zmin: " << zmin << " zmax: " << zmax + << " coutout_zmin_abs: " << cutout_zmin_abs); // Ok now let's analyse what we're wrapping the calo around: the ID // The ID will have to be built already. @@ -400,20 +400,55 @@ ActsCaloTrackingVolumeBuilder::makeCaloVolumeBounds(const std::vector<std::uniqu double idRMin = idCylBds->get(CVBBV::eMinR); double idHlZ = idCylBds->get(CVBBV::eHalfLengthZ); + ATH_MSG_VERBOSE("ID volume bounds:\n" << *idCylBds); + + ATH_MSG_VERBOSE("Inside volume transform: \n" << insideVolume->transform().matrix()); + if (!insideVolume->transform().isApprox(Acts::Transform3D::Identity())) { - ATH_MSG_ERROR("The ID appears to be shifted from the origin. I cannot handle this."); - ATH_MSG_ERROR("(I'm not building the Calo!)"); - return nullptr; + ATH_MSG_VERBOSE("Inside volume transform is not unity."); + + // transformation matrix is NOT unity. Let's check: + // - Rotation is approximate unity + // - Translation is only along z axis + const auto& trf = insideVolume->transform(); + + Acts::RotationMatrix3D rot = trf.rotation(); + bool unityRot = rot.isApprox(Acts::RotationMatrix3D::Identity()); + + ATH_MSG_VERBOSE("\n" << rot); + + // dot product with Z axis is about 1 => ok + const Acts::Vector3D trl = trf.translation(); + bool transZOnly = std::abs(1 - std::abs(Acts::Vector3D::UnitZ().dot(trl.normalized()))) < 1e-6; + + ATH_MSG_VERBOSE("TRL "<< trl.transpose()); + ATH_MSG_VERBOSE("TRL "<< trl.normalized().dot(Acts::Vector3D::UnitZ())); + + if(!unityRot || !transZOnly) { + ATH_MSG_ERROR("The ID appears to be shifted from the origin. I cannot handle this."); + ATH_MSG_ERROR("(I'm not building the Calo!)"); + throw std::runtime_error("Error building calo"); + } + else { + ATH_MSG_VERBOSE("Checked: non unitarity is ONLY due to shift along z axis: that's ok"); + double prevIdHlZ = idHlZ; + idHlZ += std::abs(trl.z()); + ATH_MSG_VERBOSE("Modifying effective half length of ID cylinder: " << prevIdHlZ << " => " << idHlZ); + } } // make sure we can fit the ID inside the calo cutout if (idRMax > rmin_at_center || idHlZ > dz2 || (idRMin > rmin_at_choke && idRMin != 0.)) { ATH_MSG_ERROR("Cannot fit ID inside the Calo"); + ATH_MSG_ERROR("This can be because the ID overlaps into the calo volume"); + ATH_MSG_ERROR("Or because the Calo choke radius is SMALLER than the ID inner radius"); + ATH_MSG_ERROR("Currently, I can only make the choke radius smaller, I can not make it larger"); + ATH_MSG_ERROR("nor can I manipulate the ID volume bounds at this point."); ATH_MSG_ERROR("ID rMax: " << idRMax << " Calo rMin@center: " << rmin_at_center); ATH_MSG_ERROR("ID hlZ: " << idHlZ << " Calo inner Z hl: " << dz2); ATH_MSG_ERROR("ID rMin: " << idRMin << " Calo rMin@choke: " << rmin_at_choke); ATH_MSG_ERROR("(I'm not building the Calo!)"); - return nullptr; + throw std::runtime_error("Error building calo"); } // Let's harmonize the sizes, so we have a exact wrap of the ID diff --git a/Tracking/Acts/ActsGeometry/src/ActsExtrapolationAlg.cxx b/Tracking/Acts/ActsGeometry/src/ActsExtrapolationAlg.cxx index d28aac9afae50118bcff6f1726013f9d9880ebb3..84ada281557659e88deb733e78e9f084ae7cfc7e 100755 --- a/Tracking/Acts/ActsGeometry/src/ActsExtrapolationAlg.cxx +++ b/Tracking/Acts/ActsGeometry/src/ActsExtrapolationAlg.cxx @@ -124,6 +124,9 @@ StatusCode ActsExtrapolationAlg::execute(const EventContext &ctx) const { Acts::BoundParameters startParameters( anygctx, std::move(cov), std::move(pars), std::move(surface)); output = m_extrapolationTool->propagationSteps(ctx, startParameters); + if(output.first.size() == 0) { + ATH_MSG_WARNING("Got ZERO steps from the extrapolation tool"); + } m_propStepWriterSvc->write(output.first); if(m_writeMaterialTracks){ Acts::RecordedMaterialTrack track; diff --git a/Tracking/Acts/ActsGeometry/src/ActsExtrapolationTool.cxx b/Tracking/Acts/ActsGeometry/src/ActsExtrapolationTool.cxx index 905b3d79346b7269f190d84a45485ab04b19aa5e..5ba834fc0b993e64f57d356b4fd569d2e695fec8 100644 --- a/Tracking/Acts/ActsGeometry/src/ActsExtrapolationTool.cxx +++ b/Tracking/Acts/ActsGeometry/src/ActsExtrapolationTool.cxx @@ -164,7 +164,8 @@ ActsExtrapolationTool::propagationSteps(const EventContext& ctx, }, *m_varProp); if (!res.ok()) { - ATH_MSG_ERROR("Got error during propagation:" << res.error() + ATH_MSG_ERROR("Got error during propagation: " + << res.error() << " " << res.error().message() << ". Returning empty step vector."); return {}; } @@ -175,6 +176,10 @@ ActsExtrapolationTool::propagationSteps(const EventContext& ctx, } ATH_MSG_VERBOSE("Collected " << output.first.size() << " steps"); + if(output.first.size() == 0) { + ATH_MSG_WARNING("ZERO steps returned by stepper, that is not typically a good sign"); + } + ATH_MSG_VERBOSE(name() << "::" << __FUNCTION__ << " end"); return output; diff --git a/Tracking/Acts/ActsGeometry/src/ActsLayerBuilder.cxx b/Tracking/Acts/ActsGeometry/src/ActsLayerBuilder.cxx index 83af685cbeaec7df7fb311894bce6ad02c560fdb..05c2f7deefd5fe279ee22e35628a26f7073f1453 100644 --- a/Tracking/Acts/ActsGeometry/src/ActsLayerBuilder.cxx +++ b/Tracking/Acts/ActsGeometry/src/ActsLayerBuilder.cxx @@ -21,11 +21,14 @@ #include "Acts/Utilities/Definitions.hpp" #include "Acts/Geometry/GeometryContext.hpp" #include "Acts/Utilities/Units.hpp" +#include "Acts/Utilities/BinningType.hpp" + using Acts::Surface; using Acts::Transform3D; using Acts::Translation3D; + using namespace Acts::UnitLiterals; const Acts::LayerVector @@ -146,10 +149,12 @@ ActsLayerBuilder::buildLayers(const Acts::GeometryContext& gctx, ACTS_VERBOSE("Layer #" << n << " with layerKey: (" << key.first << ", " << key.second << ")"); if (type == 0) { // BARREL - ACTS_VERBOSE(" -> at rMin / rMax: " << pl.minR << " / " << pl.maxR); + ACTS_VERBOSE(" -> at rMin / rMax: " << pl.min(Acts::binR) << " / " << pl.max(Acts::binR)); + ACTS_VERBOSE(" -> at zMin / zMax: " << pl.min(Acts::binZ) << " / " << pl.max(Acts::binZ)); } else { - ACTS_VERBOSE(" -> at zMin / zMax: " << pl.minZ << " / " << pl.maxZ); + ACTS_VERBOSE(" -> at zMin / zMax: " << pl.min(Acts::binZ) << " / " << pl.max(Acts::binZ)); + ACTS_VERBOSE(" -> at rMin / rMax: " << pl.min(Acts::binR) << " / " << pl.max(Acts::binR)); } n++; @@ -167,27 +172,27 @@ ActsLayerBuilder::buildLayers(const Acts::GeometryContext& gctx, if (type == 0) { // BARREL // layers and extent are determined, build actual layer Acts::ProtoLayer pl(gctx, layerSurfaces); - pl.envR = {0_mm, 0_mm}; - pl.envZ = {20_mm, 20_mm}; + pl.envelope[Acts::binR] = std::make_pair(0_mm, 0_mm); + pl.envelope[Acts::binZ] = std::make_pair(20_mm, 20_mm); - double binPosZ = 0.5 * (pl.minZ + pl.maxZ); - double envZShift = 0.5 * (-pl.envZ.first + pl.envZ.second); + double binPosZ = 0.5 * (pl.min(Acts::binZ) + pl.max(Acts::binZ)); + double envZShift = 0.5 * (-pl.envelope[Acts::binZ].first + pl.envelope[Acts::binZ].second); double layerZ = binPosZ + envZShift; double layerHalfZ - = std::abs(pl.maxZ + pl.envZ.second - layerZ); + = std::abs(pl.max(Acts::binZ) + pl.envelope[Acts::binZ].second - layerZ); auto transform = std::make_shared<const Transform3D>(Translation3D(0., 0., -layerZ)); // set up approach descriptor std::shared_ptr<Acts::CylinderSurface> innerBoundary - = Acts::Surface::makeShared<Acts::CylinderSurface>(transform, pl.minR, layerHalfZ); + = Acts::Surface::makeShared<Acts::CylinderSurface>(transform, pl.min(Acts::binR), layerHalfZ); std::shared_ptr<Acts::CylinderSurface> outerBoundary - = Acts::Surface::makeShared<Acts::CylinderSurface>(transform, pl.maxR, layerHalfZ); + = Acts::Surface::makeShared<Acts::CylinderSurface>(transform, pl.max(Acts::binR), layerHalfZ); std::shared_ptr<Acts::CylinderSurface> centralSurface - = Acts::Surface::makeShared<Acts::CylinderSurface>(transform, (pl.minR + pl.maxR)/2., layerHalfZ); + = Acts::Surface::makeShared<Acts::CylinderSurface>(transform, (pl.min(Acts::binR) + pl.max(Acts::binR))/2., layerHalfZ); size_t binsPhi = m_cfg.barrelMaterialBins.first; size_t binsZ = m_cfg.barrelMaterialBins.second; @@ -205,9 +210,9 @@ ActsLayerBuilder::buildLayers(const Acts::GeometryContext& gctx, ACTS_VERBOSE("with binning: [" << binsPhi << ", " << binsZ << "]"); ACTS_VERBOSE("Created ApproachSurfaces for cylinder layer at:"); - ACTS_VERBOSE(" - inner: R=" << pl.minR); - ACTS_VERBOSE(" - central: R=" << (pl.minR + pl.maxR)/2.); - ACTS_VERBOSE(" - outer: R=" << pl.maxR); + ACTS_VERBOSE(" - inner: R=" << pl.min(Acts::binR)); + ACTS_VERBOSE(" - central: R=" << (pl.min(Acts::binR) + pl.max(Acts::binR))/2.); + ACTS_VERBOSE(" - outer: R=" << pl.max(Acts::binR)); // set material on inner // @TODO: make this configurable somehow @@ -232,15 +237,15 @@ ActsLayerBuilder::buildLayers(const Acts::GeometryContext& gctx, layersOutput.push_back(layer); } else { // ENDCAP Acts::ProtoLayer pl(gctx, layerSurfaces); - pl.envR = {0_mm, 0_mm}; - pl.envZ = {10_mm, 10_mm}; + pl.envelope[Acts::binR] = std::make_pair(0_mm, 0_mm); + pl.envelope[Acts::binZ] = std::make_pair(10_mm, 10_mm); // copied from layercreator double layerZ - = 0.5 * (pl.minZ - pl.envZ.first + pl.maxZ - + pl.envZ.second); - double layerThickness = (pl.maxZ - pl.minZ) - + pl.envZ.first + pl.envZ.second; + = 0.5 * (pl.min(Acts::binZ) - pl.envelope[Acts::binZ].first + pl.max(Acts::binZ) + + pl.envelope[Acts::binZ].second); + double layerThickness = (pl.max(Acts::binZ) - pl.min(Acts::binZ)) + + pl.envelope[Acts::binZ].first + pl.envelope[Acts::binZ].second; double layerZInner = layerZ - layerThickness/2.; double layerZOuter = layerZ + layerThickness/2.; @@ -257,13 +262,13 @@ ActsLayerBuilder::buildLayers(const Acts::GeometryContext& gctx, = std::make_shared<const Transform3D>(Translation3D(0., 0., layerZOuter)); std::shared_ptr<Acts::DiscSurface> innerBoundary - = Acts::Surface::makeShared<Acts::DiscSurface>(transformInner, pl.minR, pl.maxR); + = Acts::Surface::makeShared<Acts::DiscSurface>(transformInner, pl.min(Acts::binR), pl.max(Acts::binR)); std::shared_ptr<Acts::DiscSurface> nominalSurface - = Acts::Surface::makeShared<Acts::DiscSurface>(transformNominal, pl.minR, pl.maxR); + = Acts::Surface::makeShared<Acts::DiscSurface>(transformNominal, pl.min(Acts::binR), pl.max(Acts::binR)); std::shared_ptr<Acts::DiscSurface> outerBoundary - = Acts::Surface::makeShared<Acts::DiscSurface>(transformOuter, pl.minR, pl.maxR); + = Acts::Surface::makeShared<Acts::DiscSurface>(transformOuter, pl.min(Acts::binR), pl.max(Acts::binR)); size_t matBinsPhi = m_cfg.endcapMaterialBins.first; size_t matBinsR = m_cfg.endcapMaterialBins.second; @@ -271,7 +276,7 @@ ActsLayerBuilder::buildLayers(const Acts::GeometryContext& gctx, Acts::BinUtility materialBinUtil( matBinsPhi, -M_PI, M_PI, Acts::closed, Acts::binPhi); materialBinUtil += Acts::BinUtility( - matBinsR, pl.minR, pl.maxR, Acts::open, Acts::binR, transformNominal); + matBinsR, pl.min(Acts::binR), pl.max(Acts::binR), Acts::open, Acts::binR, transformNominal); materialProxy = std::make_shared<const Acts::ProtoSurfaceMaterial>(materialBinUtil); diff --git a/Tracking/Acts/ActsGeometry/src/ActsPropStepRootWriterSvc.cxx b/Tracking/Acts/ActsGeometry/src/ActsPropStepRootWriterSvc.cxx index 51d52f868b8822a9a21fb13a793ea7748cabc02f..003a5e3b2fd0feaedac2adb9e4a73dd66044c8d0 100644 --- a/Tracking/Acts/ActsGeometry/src/ActsPropStepRootWriterSvc.cxx +++ b/Tracking/Acts/ActsGeometry/src/ActsPropStepRootWriterSvc.cxx @@ -26,9 +26,6 @@ StatusCode ActsPropStepRootWriterSvc::initialize() { - ATH_MSG_INFO("Starting writer thread"); - m_doEnd = false; - m_writeThread = std::thread(&ActsPropStepRootWriterSvc::writeThread, this); std::string filePath = m_filePath; m_outputFile = TFile::Open(filePath.c_str(), "RECREATE"); @@ -63,10 +60,7 @@ ActsPropStepRootWriterSvc::initialize() StatusCode ActsPropStepRootWriterSvc::finalize() { - ATH_MSG_INFO("Waiting for writer thread to finish."); - m_doEnd = true; - m_writeThread.join(); - ATH_MSG_INFO("Writer thread has terminated."); + end(); return StatusCode::SUCCESS; } @@ -82,7 +76,7 @@ ActsPropStepRootWriterSvc::write(const StepVector& steps) //for(size_t i=0;i<ecells.size();++i) { //m_queue.emplace_back(ctx.eventID().event_number(), std::move(ecells[i])); //} - m_queue.emplace_back(ctx.eventID().event_number(), steps); + doWrite(steps, ctx.eventID().event_number()); } void diff --git a/Tracking/Acts/ActsGeometry/src/ActsStrawLayerBuilder.cxx b/Tracking/Acts/ActsGeometry/src/ActsStrawLayerBuilder.cxx index f028815b5d0910c1ba042f6494a1ab4fa76e9a27..214222de2aa8563f91f857fb5ca19c3c7ef3683b 100644 --- a/Tracking/Acts/ActsGeometry/src/ActsStrawLayerBuilder.cxx +++ b/Tracking/Acts/ActsGeometry/src/ActsStrawLayerBuilder.cxx @@ -22,6 +22,7 @@ #include "Acts/Geometry/ProtoLayer.hpp" #include "Acts/Geometry/GeometryContext.hpp" #include "Acts/Utilities/Units.hpp" +#include "Acts/Utilities/BinningType.hpp" // STL #include <iostream> @@ -82,15 +83,16 @@ ActsStrawLayerBuilder::centralLayers(const Acts::GeometryContext& gctx) // were calculating min/max radius while were at it. Acts::ProtoLayer pl; - pl.minR = std::numeric_limits<double>::max(); - pl.maxR = std::numeric_limits<double>::lowest(); - pl.minZ = std::numeric_limits<double>::max(); - pl.maxZ = std::numeric_limits<double>::lowest(); - pl.minPhi = -M_PI; - pl.maxPhi = M_PI; + auto& ext = pl.extent; + ext.min(Acts::binR) = std::numeric_limits<double>::max(); + ext.max(Acts::binR) = std::numeric_limits<double>::lowest(); + ext.min(Acts::binZ) = std::numeric_limits<double>::max(); + ext.max(Acts::binZ) = std::numeric_limits<double>::lowest(); + ext.min(Acts::binPhi) = -M_PI; + ext.max(Acts::binPhi) = M_PI; - pl.envZ = {1_mm, 1_mm}; - pl.envR = {0_mm, 0_mm}; + pl.envelope[Acts::binZ] = std::make_pair(1_mm, 1_mm); + pl.envelope[Acts::binR] = std::make_pair(0_mm, 0_mm); double fudge = 0_mm; // RING in TRT speak is translated to Layer in ACTS speak @@ -136,10 +138,10 @@ ActsStrawLayerBuilder::centralLayers(const Acts::GeometryContext& gctx) // calculate min/max R and Z Vector3D ctr = straw->center(gctx); - pl.maxR = std::max(pl.maxR, ctr.perp() + radius); - pl.minR = std::min(pl.minR, ctr.perp() - radius); - pl.maxZ = std::max(pl.maxZ, ctr.z() + length); - pl.minZ = std::min(pl.minZ, ctr.z() - length); + ext.max(Acts::binR) = std::max(ext.max(Acts::binR), ctr.perp() + radius); + ext.min(Acts::binR) = std::min(ext.min(Acts::binR), ctr.perp() - radius); + ext.max(Acts::binZ) = std::max(ext.max(Acts::binZ), ctr.z() + length); + ext.min(Acts::binZ) = std::min(ext.min(Acts::binZ), ctr.z() - length); layerSurfaces.push_back(straw->getSharedPtr()); } @@ -152,7 +154,7 @@ ActsStrawLayerBuilder::centralLayers(const Acts::GeometryContext& gctx) if(iring > 0) { // match outer radius of previous ring const Acts::ProtoLayer &prev = protoLayers.at(iring-1); - pl.minR = prev.maxR + prev.envR.second + pl.envR.first + fudge; + ext.min(Acts::binR) = prev.extent.max(Acts::binR) + prev.envelope[Acts::binR].second + pl.envelope[Acts::binR].first + fudge; } std::shared_ptr<Acts::Layer> layer @@ -192,13 +194,14 @@ ActsStrawLayerBuilder::endcapLayers(const Acts::GeometryContext& gctx, int side) Acts::ProtoLayer pl; - pl.minR = std::numeric_limits<double>::max(); - pl.maxR = std::numeric_limits<double>::lowest(); - pl.minZ = std::numeric_limits<double>::max(); - pl.maxZ = std::numeric_limits<double>::lowest(); - pl.minPhi = -M_PI; - pl.maxPhi = M_PI; - pl.envR = {0_mm, 0_mm}; + auto& ext = pl.extent;; + ext.min(Acts::binR) = std::numeric_limits<double>::max(); + ext.max(Acts::binR) = std::numeric_limits<double>::lowest(); + ext.min(Acts::binZ) = std::numeric_limits<double>::max(); + ext.max(Acts::binZ) = std::numeric_limits<double>::lowest(); + ext.min(Acts::binPhi) = -M_PI; + ext.max(Acts::binPhi) = M_PI; + pl.envelope[Acts::binR] = std::make_pair(0_mm, 0_mm); for (unsigned int iphisec=0; iphisec<nEndcapPhiSectors; ++iphisec) { @@ -233,11 +236,11 @@ ActsStrawLayerBuilder::endcapLayers(const Acts::GeometryContext& gctx, int side) double length = strawBounds->get(LBBV::eHalfLengthZ); Vector3D ctr = straw->center(gctx); - pl.maxZ = std::max(pl.maxZ, ctr.z() + radius); - pl.minZ = std::min(pl.minZ, ctr.z() - radius); - pl.maxR = std::max(pl.maxR, ctr.perp() + length); - pl.minR = std::min(pl.minR, ctr.perp() - length); - pl.envZ = {radius/2., radius/2.}; + ext.max(Acts::binZ) = std::max(ext.max(Acts::binZ), ctr.z() + radius); + ext.min(Acts::binZ) = std::min(ext.min(Acts::binZ), ctr.z() - radius); + ext.max(Acts::binR) = std::max(ext.max(Acts::binR), ctr.perp() + length); + ext.min(Acts::binR) = std::min(ext.min(Acts::binR), ctr.perp() - length); + pl.envelope[Acts::binZ] = std::make_pair(radius/2., radius/2.); wheelSurfaces.push_back(straw->getSharedPtr()); } diff --git a/Tracking/Acts/ActsGeometry/src/ActsTrackingGeometrySvc.cxx b/Tracking/Acts/ActsGeometry/src/ActsTrackingGeometrySvc.cxx index 80379f2b758f059dfb696e059a4cf01c0cd6bb16..92590d9feda66d90a89b7a94c797de328a98c000 100644 --- a/Tracking/Acts/ActsGeometry/src/ActsTrackingGeometrySvc.cxx +++ b/Tracking/Acts/ActsGeometry/src/ActsTrackingGeometrySvc.cxx @@ -138,7 +138,7 @@ ActsTrackingGeometrySvc::initialize() cvbConfig.buildToRadiusZero = false; Acts::CylinderVolumeBuilder cvb(cvbConfig, - makeActsAthenaLogger(this, "CylVolBldr", "ActsTGSvc")); + makeActsAthenaLogger(this, "SCTCylVolBldr", "ActsTGSvc")); return cvb.trackingVolume(gctx, inner); }); @@ -156,7 +156,7 @@ ActsTrackingGeometrySvc::initialize() cvbConfig.buildToRadiusZero = false; Acts::CylinderVolumeBuilder cvb(cvbConfig, - makeActsAthenaLogger(this, "CylVolBldr", "ActsTGSvc")); + makeActsAthenaLogger(this, "TRTCylVolBldr", "ActsTGSvc")); return cvb.trackingVolume(gctx, inner); }); @@ -170,7 +170,8 @@ ActsTrackingGeometrySvc::initialize() }); } } - catch (const std::invalid_argument& e) { + catch (const std::exception& e) { + ATH_MSG_ERROR("Encountered error when building Acts tracking geometry"); ATH_MSG_ERROR(e.what()); return StatusCode::FAILURE; } @@ -185,8 +186,10 @@ ActsTrackingGeometrySvc::initialize() ActsGeometryContext constructionContext; constructionContext.construction = true; + ATH_MSG_VERBOSE("Begin building process"); m_trackingGeometry = trackingGeometryBuilder ->trackingGeometry(constructionContext.any()); + ATH_MSG_VERBOSE("Building process completed"); ATH_MSG_VERBOSE("Building nominal alignment store"); ActsAlignmentStore* nominalAlignmentStore = new ActsAlignmentStore(); @@ -226,11 +229,11 @@ ActsTrackingGeometrySvc::makeLayerBuilder(const InDetDD::InDetDetectorManager* m auto surfaceArrayCreator = std::make_shared<Acts::SurfaceArrayCreator>( sacCfg, - makeActsAthenaLogger(this, "SrfArrCrtr", "ActsTGSvc")); + makeActsAthenaLogger(this, managerName+"SrfArrCrtr", "ActsTGSvc")); Acts::LayerCreator::Config lcCfg; lcCfg.surfaceArrayCreator = surfaceArrayCreator; auto layerCreator = std::make_shared<Acts::LayerCreator>( - lcCfg, makeActsAthenaLogger(this, "LayCrtr", "ActsTGSvc")); + lcCfg, makeActsAthenaLogger(this, managerName+"LayCrtr", "ActsTGSvc")); ActsStrawLayerBuilder::Config cfg; cfg.mng = static_cast<const InDetDD::TRT_DetectorManager*>(manager); @@ -238,7 +241,7 @@ ActsTrackingGeometrySvc::makeLayerBuilder(const InDetDD::InDetDetectorManager* m cfg.layerCreator = layerCreator; cfg.idHelper = m_TRT_idHelper; gmLayerBuilder = std::make_shared<const ActsStrawLayerBuilder>(cfg, - makeActsAthenaLogger(this, "GMSLayBldr", "ActsTGSvc")); + makeActsAthenaLogger(this, managerName+"GMSLayBldr", "ActsTGSvc")); //gmLayerBuilder->centralLayers(); //gmLayerBuilder->negativeLayers(); @@ -286,11 +289,11 @@ ActsTrackingGeometrySvc::makeLayerBuilder(const InDetDD::InDetDetectorManager* m auto surfaceArrayCreator = std::make_shared<Acts::SurfaceArrayCreator>( sacCfg, - makeActsAthenaLogger(this, "SrfArrCrtr", "ActsTGSvc")); + makeActsAthenaLogger(this, managerName+"SrfArrCrtr", "ActsTGSvc")); Acts::LayerCreator::Config lcCfg; lcCfg.surfaceArrayCreator = surfaceArrayCreator; auto layerCreator = std::make_shared<Acts::LayerCreator>( - lcCfg, makeActsAthenaLogger(this, "LayCrtr", "ActsTGSvc")); + lcCfg, makeActsAthenaLogger(this, managerName+"LayCrtr", "ActsTGSvc")); @@ -324,7 +327,7 @@ ActsTrackingGeometrySvc::makeLayerBuilder(const InDetDD::InDetDetectorManager* m cfg.layerCreator = layerCreator; gmLayerBuilder = std::make_shared<const ActsLayerBuilder>(cfg, - makeActsAthenaLogger(this, "GMLayBldr", "ActsTGSvc")); + makeActsAthenaLogger(this, managerName+"GMLayBldr", "ActsTGSvc")); } @@ -342,13 +345,19 @@ ActsTrackingGeometrySvc::makeSCTTRTAssembly(const Acts::GeometryContext& gctx, Acts::CylinderVolumeBuilder::Config cvbCfg; Acts::CylinderVolumeBuilder cvb(cvbCfg, makeActsAthenaLogger(this, "SCTTRTCVB", "ActsTGSvc")); + ATH_MSG_VERBOSE("Making SCT negative layers: "); Acts::VolumeConfig sctNegEC = cvb.analyzeContent(gctx, sct_lb.negativeLayers(gctx), {}); + ATH_MSG_VERBOSE("Making SCT positive layers: "); Acts::VolumeConfig sctPosEC = cvb.analyzeContent(gctx, sct_lb.positiveLayers(gctx), {}); + ATH_MSG_VERBOSE("Making SCT central layers: "); Acts::VolumeConfig sctBrl = cvb.analyzeContent(gctx, sct_lb.centralLayers(gctx), {}); + ATH_MSG_VERBOSE("Making TRT negative layers: "); Acts::VolumeConfig trtNegEC = cvb.analyzeContent(gctx, trt_lb.negativeLayers(gctx), {}); + ATH_MSG_VERBOSE("Making TRT positive layers: "); Acts::VolumeConfig trtPosEC = cvb.analyzeContent(gctx, trt_lb.positiveLayers(gctx), {}); + ATH_MSG_VERBOSE("Making TRT central layers: "); Acts::VolumeConfig trtBrl = cvb.analyzeContent(gctx, trt_lb.centralLayers(gctx), {}); @@ -373,6 +382,9 @@ ActsTrackingGeometrySvc::makeSCTTRTAssembly(const Acts::GeometryContext& gctx, sctPosEC.rMin = pixelBounds->get(CVBBV::eMaxR); sctBrl.rMin = pixelBounds->get(CVBBV::eMaxR); } + else { + ATH_MSG_VERBOSE("Pixel is not configured, not wrapping"); + } ATH_MSG_VERBOSE("SCT Volume Configuration:"); @@ -384,6 +396,10 @@ ActsTrackingGeometrySvc::makeSCTTRTAssembly(const Acts::GeometryContext& gctx, ATH_MSG_VERBOSE("- TRT::NegativeEndcap: " << trtNegEC.layers.size() << " layers, " << trtNegEC.toString()); ATH_MSG_VERBOSE("- TRT::Barrel: " << trtBrl.layers.size() << " layers, " << trtBrl.toString()); ATH_MSG_VERBOSE("- TRT::PositiveEncap: " << trtPosEC.layers.size() << " layers, " << trtPosEC.toString()); + + // harmonize SCT BRL <-> EC, normally the CVB does this, but we're skipping that + sctBrl.zMax = (sctBrl.zMax + sctPosEC.zMin)/2.; + sctBrl.zMin = -sctBrl.zMax; // and now harmonize everything // inflate TRT Barrel to match SCT diff --git a/Tracking/Acts/ActsInterop/src/Logger.cxx b/Tracking/Acts/ActsInterop/src/Logger.cxx index 781eb7edd4772ef6e730cfd110de3768903569f3..e40f9e47943baee1e5a33f7b34d535008661285e 100644 --- a/Tracking/Acts/ActsInterop/src/Logger.cxx +++ b/Tracking/Acts/ActsInterop/src/Logger.cxx @@ -17,10 +17,8 @@ #include <iostream> #include <string> -void -ActsAthenaPrintPolicy::flush(const Acts::Logging::Level& lvl, const std::ostringstream& input) -{ - const std::vector<MSG::Level> athLevelVector{ +namespace { + const std::array<MSG::Level, 6> athLevelVector{ MSG::VERBOSE, MSG::DEBUG, MSG::INFO, @@ -28,7 +26,11 @@ ActsAthenaPrintPolicy::flush(const Acts::Logging::Level& lvl, const std::ostring MSG::ERROR, MSG::FATAL }; +} +void +ActsAthenaPrintPolicy::flush(const Acts::Logging::Level& lvl, const std::ostringstream& input) +{ MSG::Level athLevel = athLevelVector[lvl]; (*m_msg) << athLevel << input.str() << endmsg; } @@ -37,14 +39,6 @@ ActsAthenaPrintPolicy::flush(const Acts::Logging::Level& lvl, const std::ostring bool ActsAthenaFilterPolicy::doPrint(const Acts::Logging::Level& lvl) const { - const std::array<MSG::Level, 6> athLevelVector{ - MSG::VERBOSE, - MSG::DEBUG, - MSG::INFO, - MSG::WARNING, - MSG::ERROR, - MSG::FATAL - }; MSG::Level athLevel = athLevelVector[lvl]; return m_msg->level() <= athLevel; @@ -88,7 +82,7 @@ makeActsAthenaLogger(const CommonMessagingBase* parent, const std::string& name, int level = 0; const INamedInterface *inamed = dynamic_cast<const INamedInterface*>(parent); if (inamed != nullptr) { - level = parent->msgSvc()->outputLevel(inamed->name()); + level = parent->msg().level(); } return makeActsAthenaLogger(parent->msgSvc().get(), name, level, parent_name); } diff --git a/Tracking/TrkConfig/python/AtlasTrackingGeometrySvcConfig.py b/Tracking/TrkConfig/python/AtlasTrackingGeometrySvcConfig.py index 80add404f6385d2e1bf7157937718c366464e2ae..35b9c1b6cffa774ef5d18d3229ef1dd3f774b172 100644 --- a/Tracking/TrkConfig/python/AtlasTrackingGeometrySvcConfig.py +++ b/Tracking/TrkConfig/python/AtlasTrackingGeometrySvcConfig.py @@ -138,7 +138,8 @@ def _getInDetTrackingGeometryBuilder(name, flags,result, envelopeDefinitionSvc, # helpers for the InDetTrackingGeometry Builder : cylinder volume creator Trk__CylinderVolumeCreator=CompFactory.Trk.CylinderVolumeCreator InDetCylinderVolumeCreator = Trk__CylinderVolumeCreator(name = 'InDetCylinderVolumeCreator') - # give it the layer array creator - assume defaults + # give it the layer array creator + InDetCylinderVolumeCreator.LayerArrayCreator = InDetLayerArrayCreator # specifiy the binning, passive layers, entry layers - assume defaults # add to ToolSvc result.addPublicTool(InDetCylinderVolumeCreator) diff --git a/Tracking/TrkEvent/TrkEventUtils/TrkEventUtils/ComparisonFunction.h b/Tracking/TrkEvent/TrkEventUtils/TrkEventUtils/ComparisonFunction.h index d393a9823bd99463f19cbc8bd866eeec7b7e9479..56cba7fd6489f97cf6bac21dee560a6a98c17376 100755 --- a/Tracking/TrkEvent/TrkEventUtils/TrkEventUtils/ComparisonFunction.h +++ b/Tracking/TrkEvent/TrkEventUtils/TrkEventUtils/ComparisonFunction.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -9,105 +9,99 @@ #ifndef TRKEVENTUTILS_COMPARISONFUNCTION_H #define TRKEVENTUTILS_COMPARISONFUNCTION_H -//STL -#include <ext/algorithm> -#include <cmath> #include "GeoPrimitives/GeoPrimitives.h" +#include <cmath> +#include <cstdint> namespace Trk { - /** - @class ComparisonFunction - - this functor is used to find the closest objects: - - - a point - - a line - - a cylinder of radius R - - @author Andreas.Salzburger@cern.ch - - */ - - template <class T> class ComparisonFunction { - public: - /** Default Constructor */ - ComparisonFunction(): - m_point(0), - m_line(0), - m_radius(0.) - {} - - /** Constructor for pointlike Search */ - ComparisonFunction(const Amg::Vector3D& sp): - m_point(new Amg::Vector3D(sp)), - m_line(0), - m_radius(0.) - {} - - /** Constructor for search from line */ - ComparisonFunction(const Amg::Vector3D& sp, const Amg::Vector3D& dir): - m_point(new Amg::Vector3D(sp)), - m_line(new Amg::Vector3D(dir)), - m_radius(0.) - {} - - ComparisonFunction(double cradius): - m_point(0), - m_line(0), - m_radius(fabs(cradius)) - {} - - ComparisonFunction(const ComparisonFunction& cpf): - m_point(cpf.m_point ? new Amg::Vector3D(*cpf.m_point) : 0), - m_line(cpf.m_line ? new Amg::Vector3D(*cpf.m_line) : 0), - m_radius(cpf.m_radius) - {} - - virtual ~ComparisonFunction(){ - delete m_point; - delete m_line; - } - - ComparisonFunction &operator=(const ComparisonFunction& cpf) { - if (this != &cpf) { - delete m_point; - m_point=(cpf.m_point ? new Amg::Vector3D(*cpf.m_point) : 0); - delete m_line; - m_line=(cpf.m_line ? new Amg::Vector3D(*cpf.m_line) : 0); - m_radius=(cpf.m_radius); - } - return *this; - } - - bool operator() (const T* one, const T* two) const { - if (!m_point && !m_line){ - return ( fabs(one->position().perp() - m_radius) < fabs(two->position().perp() - m_radius) ); - } - if (!m_line){ - return ( (one->position() - (*m_point)).mag() < (two->position() - (*m_point)).mag()); - } - Amg::Vector3D distPosOne((one->position())-(*m_point)); - double lmag2 = m_line->mag(); lmag2 *= lmag2; - double dp1_mag2 = distPosOne.mag(); dp1_mag2 *= dp1_mag2; - double pl1_2 = m_line->dot(distPosOne); pl1_2 *= pl1_2; - double distOne = (lmag2*dp1_mag2 - pl1_2)/dp1_mag2; - - Amg::Vector3D distPosTwo((two->position())-(*m_point)); - double dp2_mag2 = distPosTwo.mag(); dp1_mag2 *= dp1_mag2; - double pl2_2 = m_line->dot(distPosTwo); pl1_2 *= pl1_2; - double distTwo = (lmag2*dp2_mag2 - pl2_2)/dp2_mag2; - - return ( fabs(distOne) < fabs(distTwo) ); - } - - private: - Amg::Vector3D* m_point; - Amg::Vector3D* m_line; - double m_radius; - - }; - +/** + @class ComparisonFunction + + this functor is used to find the closest objects: + + - a point + - a line + - a cylinder of radius R + + @author Andreas.Salzburger@cern.ch + @author Christos Anastopoulos (MT cleanup) + + */ + +template<class T> +class ComparisonFunction +{ +public: + /** Default */ + ComparisonFunction() = default; + ComparisonFunction(const ComparisonFunction& cpf) = default; + ComparisonFunction(ComparisonFunction&& cpf) = default; + ComparisonFunction& operator=(const ComparisonFunction& cpf) = default; + ComparisonFunction& operator=(ComparisonFunction&& cpf) = default; + ~ComparisonFunction() = default; + + /** Constructor for pointlike Search */ + ComparisonFunction(const Amg::Vector3D& sp) + : m_point(sp) + , m_line{} + , m_radius{ 0 } + , m_hasPointAndLine{ 1 } + {} + + /** Constructor with point and line, search with direction */ + ComparisonFunction(const Amg::Vector3D& sp, const Amg::Vector3D& dir) + : m_point(sp) + , m_line(dir) + , m_radius{ 0. } + , m_hasPointAndLine{ 2 } + {} + + /** Search wrt to distance wrt to radius*/ + ComparisonFunction(double cradius) + : m_point{} + , m_line{} + , m_radius{ std::abs(cradius) } + , m_hasPointAndLine{ 0 } + {} + + bool operator()(const T* one, const T* two) const + { + if (m_hasPointAndLine == 0) { + return (fabs(one->position().perp() - m_radius) < + fabs(two->position().perp() - m_radius)); + } + if (m_hasPointAndLine == 1) { + return ((one->position() - m_point).mag() < + (two->position() - m_point).mag()); + } + Amg::Vector3D distPosOne((one->position()) - m_point); + double lmag2 = m_line.mag(); + lmag2 *= lmag2; + double dp1_mag2 = distPosOne.mag(); + dp1_mag2 *= dp1_mag2; + double pl1_2 = m_line.dot(distPosOne); + pl1_2 *= pl1_2; + double distOne = (lmag2 * dp1_mag2 - pl1_2) / dp1_mag2; + + Amg::Vector3D distPosTwo((two->position()) - m_point); + double dp2_mag2 = distPosTwo.mag(); + dp1_mag2 *= dp1_mag2; + double pl2_2 = m_line.dot(distPosTwo); + pl1_2 *= pl1_2; + double distTwo = (lmag2 * dp2_mag2 - pl2_2) / dp2_mag2; + + return (fabs(distOne) < fabs(distTwo)); + } + +private: + Amg::Vector3D m_point; + Amg::Vector3D m_line; + double m_radius = 0.; + // 0 no line no point, 1 only point , 2 has both + int8_t m_hasPointAndLine = 0; +}; + } // end of namespace #endif diff --git a/Tracking/TrkEvent/TrkEventUtils/TrkEventUtils/InverseTruthMap.h b/Tracking/TrkEvent/TrkEventUtils/TrkEventUtils/InverseTruthMap.h deleted file mode 100755 index d33cee3605199d86621cb4cc9fb540be135fef7e..0000000000000000000000000000000000000000 --- a/Tracking/TrkEvent/TrkEventUtils/TrkEventUtils/InverseTruthMap.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/** @file - * This file defines the Trk::InverseTruthMap template class. - */ - -#ifndef INVERSETRUTHMAP_H -#define INVERSETRUTHMAP_H - -#include <map> - -#include "AtlasHepMC/GenParticle_fwd.h" - -namespace Trk { - /** - * @class InverseTruthMap - * - * An InverseTruthMap object allows to quickly find a reconstructed - * object matching a given GenParticle. - * - * A map for lookup in the other direction is given by TrackTruthCollection - * (or by SpacePointTruthCollection, or by PrepRawDataTruthCollection). - * Note that a true "inverse" of a TrackTruthCollection would not be very useful, - * because TrackTruthCollection maps - * - * Trk::Track* ==> (an object containing GenParticle* AND SOME OTHER STUFF) - * - * therefore to use a true inverse map you would need to have that - * SOME OTHER STUFF to perform a lookup, in addition to the - * GenParticle you are interested in. (The actual code uses - * persistifiable pointers, I use the bare pointer notation for the - * sake of clarity.) - * - * The map inversion discards SOME OTHER STUFF data. If needed, they - * can be accessed through the original map. That is, after a - * GenParticle* ==> Trk::Track* lookup, use the found Trk::Track* to - * extract its corresponding TrackTruth object that contains the - * matching probability. - * - * Similar for SpacePointTruthCollection and PrepRawDataTruthCollection. - * - * Example of use: - * @code - * #include "TrkEventUtils/InverseTruthMap.h" - * #include "TrkEventUtils/TruthCollectionInverter.h" - * - * ... - * - * TrackTruthCollection *origMap = ...; // retrieve from SG - * - * Trk::InverseTruthMap<TrackTruthCollection> invMap; - * - * Trk::buildInverseTruthMap(*origMap, &invMap); - * @endcode - * - * InverseTruthMap requires that the TruthCollection template argument - * defines a key_type, like std::map does. - * - * @see TruthInverters - * - * @author Andrei Gaponenko <agaponenko@lbl.gov>, 2005 - */ - template<class TruthCollection> class InverseTruthMap : - public std::map<const HepMC::GenParticle*, typename TruthCollection::key_type> {}; - -} - -#endif/*INVERSETRUTHMAP_H*/ diff --git a/Tracking/TrkEvent/TrkEventUtils/TrkEventUtils/MeasurementBaseComparisonFunction.h b/Tracking/TrkEvent/TrkEventUtils/TrkEventUtils/MeasurementBaseComparisonFunction.h index 7a755179a2c43280dc69a4571eea5edec536123d..75e24b86c41e0d94d591751e46370ac1c233e5ff 100755 --- a/Tracking/TrkEvent/TrkEventUtils/TrkEventUtils/MeasurementBaseComparisonFunction.h +++ b/Tracking/TrkEvent/TrkEventUtils/TrkEventUtils/MeasurementBaseComparisonFunction.h @@ -11,21 +11,19 @@ // Wolfgang.Liebig@cern.ch / Andreas.Salzburger@cern.ch /////////////////////////////////////////////////////////////////// - #ifndef TRKNIRVANA_MEASUREMENTBASECOMPARISONFUNCTION_H #define TRKNIRVANA_MEASUREMENTBASECOMPARISONFUNCTION_H -//Trk +// Trk #include "TrkMeasurementBase/MeasurementBase.h" +#include "TrkSurfaces/DiscSurface.h" #include "TrkSurfaces/PlaneSurface.h" #include "TrkSurfaces/StraightLineSurface.h" -#include "TrkSurfaces/DiscSurface.h" // extra-maths for cylinder intersections #include "TrkSurfaces/CylinderSurface.h" -#include "TrkSurfaces/CylinderSurface.h" #include "TrkSurfaces/PerigeeSurface.h" #include "TrkSurfaces/SurfaceBounds.h" -//STL +// STL #include <algorithm> #include <stdexcept> @@ -35,195 +33,210 @@ namespace Trk { - /** Class implementing a comparison function - * for sorting MeasurementBase objects*/ - -class MeasurementBaseComparisonFunction { - public: - - /* - * Default ctor does not make much sense - */ - MeasurementBaseComparisonFunction()=delete; - /** Destructor */ - ~MeasurementBaseComparisonFunction()=default; - - /** Full relation definition using a straight line propagation */ - MeasurementBaseComparisonFunction(const Amg::Vector3D &sp, const Amg::Vector3D &dir) - : m_point(sp), m_direction(dir.unit()) {} - /** Copy Ctor */ - MeasurementBaseComparisonFunction(const MeasurementBaseComparisonFunction &MCF) - : m_point(MCF.m_point), m_direction(MCF.m_direction) {} - - MeasurementBaseComparisonFunction &operator=(MeasurementBaseComparisonFunction &MCF) { - if (this != &MCF) { - m_point = MCF.m_point; - m_direction = MCF.m_direction; +/** Class implementing a comparison function + * for sorting MeasurementBase objects*/ + +class MeasurementBaseComparisonFunction +{ +public: + MeasurementBaseComparisonFunction() = delete; + ~MeasurementBaseComparisonFunction() = default; + /** Full relation definition using a straight line propagation */ + MeasurementBaseComparisonFunction(const Amg::Vector3D& sp, + const Amg::Vector3D& dir) + : m_point(sp) + , m_direction(dir.unit()) + {} + + /* + * Default methods + */ + MeasurementBaseComparisonFunction( + const MeasurementBaseComparisonFunction& MCF) = default; + MeasurementBaseComparisonFunction& operator=( + MeasurementBaseComparisonFunction& MCF) = default; + MeasurementBaseComparisonFunction(MeasurementBaseComparisonFunction&& MCF) = + default; + MeasurementBaseComparisonFunction& operator=( + MeasurementBaseComparisonFunction&& MCF) = default; + + /** The comparison function defining in what case a Measurement is 'smaller' + than a second one */ + bool operator()(const Trk::MeasurementBase* one, + const Trk::MeasurementBase* two) const + { + + // --- flexible sorting along a predicted direction + double path1 = 0; + const Trk::Surface& sf1 = one->associatedSurface(); + const Trk::Surface::SurfaceType surfType1 = sf1.type(); + switch (surfType1) { + case Trk::Surface::Plane: { + const Trk::PlaneSurface& opsf = + static_cast<const Trk::PlaneSurface&>(sf1); + path1 = this->pathIntersectWithPlane(opsf); + } break; + case Trk::Surface::Line: { + const Trk::StraightLineSurface& ossf = + static_cast<const Trk::StraightLineSurface&>(sf1); + path1 = this->pathIntersectWithLine(ossf); + } break; + case Trk::Surface::Disc: { + const Trk::DiscSurface& odsf = + static_cast<const Trk::DiscSurface&>(sf1); + path1 = this->pathIntersectWithDisc(odsf); + } break; + case Trk::Surface::Cylinder: { + const Trk::CylinderSurface& ocsf = + static_cast<const Trk::CylinderSurface&>(sf1); + path1 = this->pathIntersectWithCylinder(ocsf, one->globalPosition()); + } break; + case Trk::Surface::Perigee: { + const Trk::PerigeeSurface& ogsf = + static_cast<const Trk::PerigeeSurface&>(sf1); + path1 = this->pathIntersectWithLine(ogsf); + } break; + default: { + throw std::runtime_error( + "MeasurementBaseComparisonFunction: surface type error for Sf1!"); } - return *this; - } - - /** The comparison function defining in what case a PRD is 'smaller' than - a second one */ - bool operator() (const Trk::MeasurementBase* one, - const Trk::MeasurementBase* two) const { - - // --- flexible sorting along a predicted direction - double path1 = 0; - const Trk::Surface& sf1 = one->associatedSurface(); - const Trk::Surface::SurfaceType surfType1 = sf1.type(); - - if (surfType1==Trk::Surface::Plane) { - const Trk::PlaneSurface& opsf = static_cast <const Trk::PlaneSurface&>(sf1); - path1 = this->pathIntersectWithPlane(opsf); - } - else if (surfType1==Trk::Surface::Line) { - const Trk::StraightLineSurface& ossf = static_cast <const Trk::StraightLineSurface&>(sf1); - path1 = this->pathIntersectWithLine (ossf); - } - else if (surfType1==Trk::Surface::Disc) { - const Trk::DiscSurface& odsf = static_cast <const Trk::DiscSurface&> (sf1); - path1 = this->pathIntersectWithDisc (odsf); - } - else if (surfType1==Trk::Surface::Cylinder) { - const Trk::CylinderSurface& ocsf = static_cast <const Trk::CylinderSurface&> (sf1); - path1 = this->pathIntersectWithCylinder(ocsf, one->globalPosition()); - } - else if (surfType1==Trk::Surface::Perigee) { - const Trk::PerigeeSurface& ogsf = static_cast< const Trk::PerigeeSurface&>(sf1); - path1 = this->pathIntersectWithLine (ogsf); - } - else { - throw std::runtime_error( "MeasurementBaseComparisonFunction: surface type error for Sf1!"); - } - - // --- identify the 2nd surface type and get intersection path for surface 1 - double path2 = 0; - const Trk::Surface& sf2 = two->associatedSurface(); - const Trk::Surface::SurfaceType surfType2 = sf2.type(); - - if (surfType2==Trk::Surface::Plane) { - const Trk::PlaneSurface& tpsf = static_cast <const Trk::PlaneSurface&>(sf2); - path2 = this->pathIntersectWithPlane(tpsf); - } - else if (surfType2==Trk::Surface::Line) { - const Trk::StraightLineSurface& tssf = static_cast <const Trk::StraightLineSurface&>(sf2); - path2 = this->pathIntersectWithLine (tssf); - } - else if (surfType2==Trk::Surface::Disc) { - const Trk::DiscSurface& tdsf = static_cast <const Trk::DiscSurface&> (sf2); - path2 = this->pathIntersectWithDisc (tdsf); - } - else if (surfType2==Trk::Surface::Cylinder) { - const Trk::CylinderSurface& tcsf = static_cast <const Trk::CylinderSurface&> (sf2); - path2 = this->pathIntersectWithCylinder(tcsf, two->globalPosition()); - } - else if (surfType2==Trk::Surface::Perigee) { - const Trk::PerigeeSurface& tgsf = static_cast< const Trk::PerigeeSurface&>(sf2); - path2 = this->pathIntersectWithLine (tgsf); - } - else { - throw std::runtime_error("MeasurementBaseComparisonFunction: surface type error for Sf2!"); - } - - return path1 < path2; - } - private: - Amg::Vector3D m_point; - Amg::Vector3D m_direction; - - double pathIntersectWithPlane(const Trk::PlaneSurface& psf) const - { - double denom = m_direction.dot(psf.normal()); // c++ can be unreadable - return (denom) ? - psf.normal().dot(psf.center() - m_point)/(denom) : - denom ; - } - - double pathIntersectWithLine(const Trk::StraightLineSurface& lsf) const - { - Amg::Vector3D dirWire(lsf.transform().rotation().col(2)); - dirWire.normalize(); - Amg::Vector3D trackToWire(lsf.center() - m_point); - double parallelity = m_direction.dot(dirWire); - double denom = 1 - parallelity*parallelity; - return (fabs(denom)>10e-7) ? - (trackToWire.dot(m_direction) - - trackToWire.dot(dirWire)*parallelity)/denom : - 0. ; - } - - double pathIntersectWithLine(const Trk::PerigeeSurface& pgsf) const - { - Amg::Vector3D trackToWire(pgsf.center() - m_point); - double parallelity = m_direction.dot(Trk::s_zAxis); - double denom = 1 - parallelity*parallelity; - return (fabs(denom)>10e-7) ? - (trackToWire.dot(m_direction) - - trackToWire.dot(Trk::s_zAxis)*parallelity)/denom : - 0. ; } - double pathIntersectWithDisc(const Trk::DiscSurface& dsf) const - { - double denom = m_direction.dot(dsf.normal()); - return (denom) ? - dsf.normal().dot(dsf.center() - m_point)/(denom) : - denom ; + // --- identify the 2nd surface type and get intersection path for surface 1 + double path2 = 0; + const Trk::Surface& sf2 = two->associatedSurface(); + const Trk::Surface::SurfaceType surfType2 = sf2.type(); + switch (surfType2) { + case Trk::Surface::Plane: { + const Trk::PlaneSurface& tpsf = + static_cast<const Trk::PlaneSurface&>(sf2); + path2 = this->pathIntersectWithPlane(tpsf); + } break; + case Trk::Surface::Line: { + const Trk::StraightLineSurface& tssf = + static_cast<const Trk::StraightLineSurface&>(sf2); + path2 = this->pathIntersectWithLine(tssf); + } break; + case Trk::Surface::Disc: { + const Trk::DiscSurface& tdsf = + static_cast<const Trk::DiscSurface&>(sf2); + path2 = this->pathIntersectWithDisc(tdsf); + } break; + case Trk::Surface::Cylinder: { + const Trk::CylinderSurface& tcsf = + static_cast<const Trk::CylinderSurface&>(sf2); + path2 = this->pathIntersectWithCylinder(tcsf, two->globalPosition()); + } break; + case Trk::Surface::Perigee: { + const Trk::PerigeeSurface& tgsf = + static_cast<const Trk::PerigeeSurface&>(sf2); + path2 = this->pathIntersectWithLine(tgsf); + } break; + default: { + throw std::runtime_error( + "MeasurementBaseComparisonFunction: surface type error for Sf2!"); + } } - - double pathIntersectWithCylinder(const Trk::CylinderSurface& csf, - const Amg::Vector3D& globalHit) const - { // --- code from TrkExSlPropagator/LineCylinderIntersection.cxx - - // get the rotation by reference - const Amg::Transform3D& locTrans = csf.transform(); - // take two points of line and calculate them to the 3D frame of the cylinder - Amg::Vector3D point1(locTrans.inverse() * m_point); - Amg::Vector3D point2raw = m_point + m_direction; - Amg::Vector3D point2(locTrans.inverse() * point2raw); // do it in two steps - - // new direction in 3D frame of cylinder - Amg::Vector3D direc((point2 - point1).unit()); - - if (!direc.x()){ + return path1 < path2; + } + +private: + Amg::Vector3D m_point; + Amg::Vector3D m_direction; + + double pathIntersectWithPlane(const Trk::PlaneSurface& psf) const + { + double denom = m_direction.dot(psf.normal()); + return (denom) ? psf.normal().dot(psf.center() - m_point) / (denom) : denom; + } + + double pathIntersectWithLine(const Trk::StraightLineSurface& lsf) const + { + Amg::Vector3D dirWire(lsf.transform().rotation().col(2)); + dirWire.normalize(); + Amg::Vector3D trackToWire(lsf.center() - m_point); + double parallelity = m_direction.dot(dirWire); + double denom = 1 - parallelity * parallelity; + return (fabs(denom) > 10e-7) ? (trackToWire.dot(m_direction) - + trackToWire.dot(dirWire) * parallelity) / + denom + : 0.; + } + + double pathIntersectWithLine(const Trk::PerigeeSurface& pgsf) const + { + Amg::Vector3D trackToWire(pgsf.center() - m_point); + double parallelity = m_direction.dot(Trk::s_zAxis); + double denom = 1 - parallelity * parallelity; + return (fabs(denom) > 10e-7) + ? (trackToWire.dot(m_direction) - + trackToWire.dot(Trk::s_zAxis) * parallelity) / + denom + : 0.; + } + + double pathIntersectWithDisc(const Trk::DiscSurface& dsf) const + { + double denom = m_direction.dot(dsf.normal()); + return (denom) ? dsf.normal().dot(dsf.center() - m_point) / (denom) : denom; + } + + double pathIntersectWithCylinder(const Trk::CylinderSurface& csf, + const Amg::Vector3D& globalHit) const + { // --- code from TrkExSlPropagator/LineCylinderIntersection.cxx + + // get the rotation by reference + const Amg::Transform3D& locTrans = csf.transform(); + // take two points of line and calculate them to the 3D frame of the + // cylinder + Amg::Vector3D point1(locTrans.inverse() * m_point); + Amg::Vector3D point2raw = m_point + m_direction; + Amg::Vector3D point2(locTrans.inverse() * point2raw); // do it in two steps + + // new direction in 3D frame of cylinder + Amg::Vector3D direc((point2 - point1).unit()); + + if (!direc.x()) { + return 0.; + } else { + // get line and circle constants + double k = (direc.y()) / (direc.x()); + double d = (point2.x() * point1.y() - point1.x() * point2.y()) / + (point2.x() - point1.x()); + double R = csf.bounds().r(); + double first = 0.; + double second = 0.; + + // and solve the quadratic equation Trk::RealQuadraticEquation + // pquad(1+k*k, 2*k*d, d*d-R*R); + double a = 1 + k * k; + double p = 2 * k * d; + double q = d * d - R * R; + double discriminant = p * p - 4 * a * q; + if (discriminant < 0) { return 0.; } else { - // get line and circle constants - double k = (direc.y())/(direc.x()); - double d = (point2.x()*point1.y() - point1.x()*point2.y())/(point2.x() - point1.x()); - double R = csf.bounds().r(); - double first = 0.; - double second= 0.; - - // and solve the quadratic equation Trk::RealQuadraticEquation pquad(1+k*k, 2*k*d, d*d-R*R); - double a = 1 + k*k; - double p = 2*k*d; - double q = d*d - R*R; - double discriminant = p*p - 4*a*q; - if (discriminant<0) { - return 0.; - } else { - // solutions = (discriminant==0) ? one : two; - double x0 = -0.5*(p + (p>0 ? sqrt(discriminant) : -sqrt(discriminant))); - first = x0/a; - second = q/x0; - } - double t1 = (first - point1.x())/direc.x(); - double t2 = (second - point1.x())/direc.x(); - // the solutions in the 3D frame of the cylinder - Amg::Vector3D dist1raw(point1 + t1 * direc - globalHit); - Amg::Vector3D dist2raw(point1 + t2 * direc - globalHit); - // return the solution which is closer to Meas'Base's global coordinates - if ( dist1raw.mag() < dist2raw.mag() ) { - return t1; // FIXME - wrong line parameterisation - } else { - return t2; - } + // solutions = (discriminant==0) ? one : two; + double x0 = + -0.5 * (p + (p > 0 ? sqrt(discriminant) : -sqrt(discriminant))); + first = x0 / a; + second = q / x0; + } + double t1 = (first - point1.x()) / direc.x(); + double t2 = (second - point1.x()) / direc.x(); + // the solutions in the 3D frame of the cylinder + Amg::Vector3D dist1raw(point1 + t1 * direc - globalHit); + Amg::Vector3D dist2raw(point1 + t2 * direc - globalHit); + // return the solution which is closer to Meas'Base's global coordinates + if (dist1raw.mag() < dist2raw.mag()) { + return t1; + } else { + return t2; } } - }; + } +}; } // end of namespace -#endif //TRKNIRVANA_MEASUREMENTBASECOMPARISONFUNCTION_H +#endif // TRKNIRVANA_MEASUREMENTBASECOMPARISONFUNCTION_H diff --git a/Tracking/TrkEvent/TrkEventUtils/TrkEventUtils/PerigeeFromVertexCreator.h b/Tracking/TrkEvent/TrkEventUtils/TrkEventUtils/PerigeeFromVertexCreator.h deleted file mode 100755 index aeaf9f2c02ef957e56cbb8d34ab1c1fc75e02d5d..0000000000000000000000000000000000000000 --- a/Tracking/TrkEvent/TrkEventUtils/TrkEventUtils/PerigeeFromVertexCreator.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - - -/////////////////////////////////////////////////////////////////// -// PerigeeFromVertex.h, (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// - - -#ifndef TRKEVENTUTILS_PERIGEEFROMVERTEXCREATOR_H -#define TRKEVENTUTILS_PERIGEEFROMVERTEXCREATOR_H - -#include "TrkParameters/TrackParameters.h" -#include "GeoPrimitives/GeoPrimitives.h" - -namespace Trk { - /** @class PerigeeFromVertexCreator - - Given a vertex in global or global/local expressiong, - a Perigee : public TrackParameters is returned - - It enhances a factory type and a copy by object return method set - - @author Tatjana.Lenz@cern.ch, Andreas.Salzburger@cern.ch */ - - class PerigeeFromVertexCreator { - - public: - /** Constructor */ - PerigeeFromVertexCreator() : - m_field(s_magField) - {} - /** Constructor */ - PerigeeFromVertexCreator(double magfield) : - m_field(magfield) - {} - /** ~Desctructor */ - virtual ~PerigeeFromVertexCreator() - {} - - /** createPerigee method - returned by object */ - Trk::Perigee createPerigee(Amg::Vector3D& gp, Amg::Vector3D& gm, double charge) const; - /** createPerigee method - returned by object */ - Trk::Perigee createPerigee(Amg::Vector3D& gp, double phi, double theta, double qOverP) const; - - /** createPerigee method - Factory type */ - Trk::Perigee* createNewPerigee(Amg::Vector3D& gp, Amg::Vector3D& gm, double charge) const; - /** createPerigee method - Factory type */ - Trk::Perigee* createNewPerigee(Amg::Vector3D& gp, double phi, double theta, double qOverP) const; - - private: - double m_field; //!< magnetic field in tesla, can be set through constructor - static const double s_unitConversion; //!< unit conversion factor - static const double s_magField; //!< default magnetic field value - - - }; -} // end of namespace - - -#endif diff --git a/Tracking/TrkEvent/TrkEventUtils/TrkEventUtils/PrepRawDataComparisonFunction.h b/Tracking/TrkEvent/TrkEventUtils/TrkEventUtils/PrepRawDataComparisonFunction.h index 6bc3fedf450f19a745e2aa95c4db967aefd92ac8..080aabdab6adfc81585cdb57f212b8392892e483 100755 --- a/Tracking/TrkEvent/TrkEventUtils/TrkEventUtils/PrepRawDataComparisonFunction.h +++ b/Tracking/TrkEvent/TrkEventUtils/TrkEventUtils/PrepRawDataComparisonFunction.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -11,153 +11,143 @@ // Wolfgang.Liebig@cern.ch / Andreas.Salzburger@cern.ch /////////////////////////////////////////////////////////////////// - #ifndef TRKNIRVANA_PREPRAWDATACOMPARISONFUNCTION_H #define TRKNIRVANA_PREPRAWDATACOMPARISONFUNCTION_H -//Trk +// Trk +#include "GeoPrimitives/GeoPrimitives.h" #include "TrkPrepRawData/PrepRawData.h" +#include "TrkSurfaces/DiscSurface.h" #include "TrkSurfaces/PlaneSurface.h" #include "TrkSurfaces/StraightLineSurface.h" -#include "TrkSurfaces/DiscSurface.h" -#include "GeoPrimitives/GeoPrimitives.h" -//STL -#include <ext/algorithm> +// STL +#include <cmath> +#include <stdexcept> namespace Trk { - /** - * Class providing comparison function, or relational definition, for PrepRawData - */ - class PrepRawDataComparisonFunction +/** + * Class providing comparison function, or relational definition, for + * PrepRawData + */ +class PrepRawDataComparisonFunction +{ +public: + /** Full relation definition using a straight line propagation */ + PrepRawDataComparisonFunction(const Amg::Vector3D& sp, + const Amg::Vector3D& dir) + : m_point(sp) + , m_direction(dir.unit()) + {} + + PrepRawDataComparisonFunction() = delete; + PrepRawDataComparisonFunction(const PrepRawDataComparisonFunction& PCF) = + default; + PrepRawDataComparisonFunction(PrepRawDataComparisonFunction&& PCF) = default; + + PrepRawDataComparisonFunction& operator=( + const PrepRawDataComparisonFunction& PCF) = default; + + PrepRawDataComparisonFunction& operator=( + PrepRawDataComparisonFunction&& PCF) = default; + + ~PrepRawDataComparisonFunction() = default; + + /** The comparison function defining in what case a PRD is 'smaller' than + a second one */ + bool operator()(const Trk::PrepRawData* one, + const Trk::PrepRawData* two) const { - public: - - /** Default Constructor */ - PrepRawDataComparisonFunction() - : m_point(new Amg::Vector3D(0., 0., 0.)), - m_direction(0) - {} - - /** Simple relation definition using a 3d distance to the reference point */ - PrepRawDataComparisonFunction(const Amg::Vector3D& sp) - : m_point(new Amg::Vector3D(sp)), - m_direction(0) - {} - - /** Full relation definition using a straight line propagation */ - PrepRawDataComparisonFunction(const Amg::Vector3D& sp, - const Amg::Vector3D& dir) - : m_point(new Amg::Vector3D(sp)), - m_direction(new Amg::Vector3D(dir.unit())) - {} - - /** Copy Ctor */ - PrepRawDataComparisonFunction(const PrepRawDataComparisonFunction& PCF) - : m_point(PCF.m_point ? new Amg::Vector3D(*PCF.m_point) : 0), - m_direction(PCF.m_direction ? new Amg::Vector3D(*PCF.m_direction) : 0) - {} - - /** Destructor */ - virtual ~PrepRawDataComparisonFunction(){ - delete m_point; - delete m_direction; - } - - PrepRawDataComparisonFunction &operator=(const PrepRawDataComparisonFunction& PCF) { - if (this != &PCF) { - delete m_point; - m_point=(PCF.m_point ? new Amg::Vector3D(*PCF.m_point) : 0); - delete m_direction; - m_direction=(PCF.m_direction ? new Amg::Vector3D(*PCF.m_direction) : 0); + + // --- identify the surface type and get intersection path for surface 1 + // + double path1 = 0; + const Trk::Surface& sf1 = one->detectorElement()->surface(one->identify()); + const Trk::Surface::SurfaceType surfType1 = sf1.type(); + switch (surfType1) { + case Trk::Surface::Plane: { + const Trk::PlaneSurface& opsf = + static_cast<const Trk::PlaneSurface&>(sf1); + path1 = this->pathIntersectWithPlane(opsf); + } break; + case Trk::Surface::Line: { + const Trk::StraightLineSurface& ossf = + static_cast<const Trk::StraightLineSurface&>(sf1); + path1 = this->pathIntersectWithLine(ossf); + } break; + case Trk::Surface::Disc: { + const Trk::DiscSurface& odsf = + static_cast<const Trk::DiscSurface&>(sf1); + path1 = this->pathIntersectWithDisc(odsf); + } break; + default: { + throw std::runtime_error( + "PrepRawDataComparisonFunction: surface type error!"); } - return *this; - } - - /** The comparison function defining in what case a PRD is 'smaller' than - a second one */ - bool operator() (const Trk::PrepRawData* one, - const Trk::PrepRawData* two) const { - - if (!m_direction) { // simple case, just return surface distances - return ( (one->detectorElement()->surface( one->identify() ).center() - - *m_point).mag() - < (two->detectorElement()->surface( two->identify() ).center() - - *m_point).mag() - ); - } else { - // --- identify the surface type and get intersection path for surface 1 - // - double path1 = 0; - const Trk::Surface& sf1 = one->detectorElement()->surface( one->identify() ); - const Trk::PlaneSurface* opsf = dynamic_cast <const Trk::PlaneSurface*>(&sf1); - const Trk::StraightLineSurface* ossf = 0; // dyncast only when necessary - const Trk::DiscSurface* odsf = 0; - if (opsf) { - path1 = this->pathIntersectWithPlane(*opsf); - } else if ((ossf = dynamic_cast< const Trk::StraightLineSurface* >(&sf1)) && ossf) { - path1 = this->pathIntersectWithLine (*ossf); - } else if ((odsf = dynamic_cast <const Trk::DiscSurface*> (&sf1)) && odsf) { - path1 = this->pathIntersectWithDisc (*odsf); - } else { - std::cout << "PrepRawDataComparisonFunction: surface type error!" << std::endl; - } // --- no raw data on Cylinder. Ever. - - // --- identify the surface type and get intersection path for surface 1 - // - double path2 = 0; - const Trk::Surface& sf2 = two->detectorElement()->surface( two->identify() ); - const Trk::PlaneSurface* tpsf = dynamic_cast< const Trk::PlaneSurface* >(&sf2); - const Trk::StraightLineSurface* tssf = 0; // dyncast only when necessary - const Trk::DiscSurface* tdsf = 0; - if (tpsf) { - path2 = this->pathIntersectWithPlane(*tpsf); - } else if ((tssf = dynamic_cast< const Trk::StraightLineSurface* >(&sf2)) && tssf) { - path2 = this->pathIntersectWithLine (*tssf); - } else if ((tdsf = dynamic_cast< const Trk::DiscSurface* > (&sf2)) && tdsf) { - path2 = this->pathIntersectWithDisc (*tdsf); - } else { - std::cout << "PrepRawDataComparisonFunction: surface type error!" << std::endl; - } // --- no PRD on Cylinder. Ever. - - return path1 < path2; + } // --- no raw data on Cylinder. Ever. + + // --- identify the surface type and get intersection path for surface 1 + // + double path2 = 0; + const Trk::Surface& sf2 = two->detectorElement()->surface(two->identify()); + const Trk::Surface::SurfaceType surfType2 = sf2.type(); + switch (surfType2) { + case Trk::Surface::Plane: { + const Trk::PlaneSurface& opsf = + static_cast<const Trk::PlaneSurface&>(sf2); + path2 = this->pathIntersectWithPlane(opsf); + } break; + case Trk::Surface::Line: { + const Trk::StraightLineSurface& ossf = + static_cast<const Trk::StraightLineSurface&>(sf2); + path2 = this->pathIntersectWithLine(ossf); + } break; + case Trk::Surface::Disc: { + const Trk::DiscSurface& odsf = + static_cast<const Trk::DiscSurface&>(sf2); + path2 = this->pathIntersectWithDisc(odsf); + } break; + default: { + throw std::runtime_error( + "PrepRawDataComparisonFunction: surface type error!"); } + } // --- no raw data on Cylinder. Ever. - } - - private: - Amg::Vector3D* m_point; - Amg::Vector3D* m_direction; - - double pathIntersectWithPlane(const Trk::PlaneSurface& psf) const - { - double denom = m_direction->dot(psf.normal()); // c++ can be unreadable - return (denom) ? - psf.normal().dot(psf.center() - *m_point)/(denom) : - denom ; - } - - double pathIntersectWithLine(const Trk::StraightLineSurface& lsf) const - { - Amg::Vector3D dirWire(lsf.transform().rotation().col(2).unit()); - Amg::Vector3D trackToWire(lsf.center() - *m_point); - double parallelity = m_direction->dot(dirWire); - double denom = 1 - parallelity*parallelity; - return (fabs(denom)>10e-7) ? - (trackToWire.dot(*m_direction) - - trackToWire.dot(dirWire)*parallelity)/denom : - 0. ; - } - - double pathIntersectWithDisc(const Trk::DiscSurface& dsf) const - { - double denom = m_direction->dot(dsf.normal()); - return (denom) ? - dsf.normal().dot(dsf.center() - *m_point)/(denom) : - denom ; - } - }; + return path1 < path2; + } + +private: + Amg::Vector3D m_point; + Amg::Vector3D m_direction; + + double pathIntersectWithPlane(const Trk::PlaneSurface& psf) const + { + double denom = m_direction.dot(psf.normal()); + return (denom) ? psf.normal().dot(psf.center() - m_point) / (denom) + : denom; + } + + double pathIntersectWithLine(const Trk::StraightLineSurface& lsf) const + { + Amg::Vector3D dirWire(lsf.transform().rotation().col(2).unit()); + Amg::Vector3D trackToWire(lsf.center() - m_point); + double parallelity = m_direction.dot(dirWire); + double denom = 1 - parallelity * parallelity; + return (std::abs(denom) > 10e-7) + ? (trackToWire.dot(m_direction) - + trackToWire.dot(dirWire) * parallelity) / + denom + : 0.; + } + + double pathIntersectWithDisc(const Trk::DiscSurface& dsf) const + { + double denom = m_direction.dot(dsf.normal()); + return (denom) ? dsf.normal().dot(dsf.center() - m_point) / (denom) + : denom; + } +}; } // end of namespace -#endif //TRKNIRVANA_PREPRAWDATACOMPARISONFUNCTION_H +#endif // TRKNIRVANA_PREPRAWDATACOMPARISONFUNCTION_H diff --git a/Tracking/TrkEvent/TrkEventUtils/TrkEventUtils/TruthCollectionInverter.h b/Tracking/TrkEvent/TrkEventUtils/TrkEventUtils/TruthCollectionInverter.h deleted file mode 100755 index 43264bb33ca556d89625d03a2444a240ec15ca32..0000000000000000000000000000000000000000 --- a/Tracking/TrkEvent/TrkEventUtils/TrkEventUtils/TruthCollectionInverter.h +++ /dev/null @@ -1,115 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/** - * @file - * @brief This file provides @ref TruthInverters. - */ - -#ifndef TRUTHCOLLECTIONINVERTER_H -#define TRUTHCOLLECTIONINVERTER_H - -#include <map> - -#include "TrkEventUtils/InverseTruthMap.h" -#include "TrkEventUtils/TruthCollectionFilter.h" -#include "TrkEventUtils/MatchCompare.h" - -namespace Trk { - /** @defgroup TruthInverters TruthCollection inversion functions */ - /*@{*/ - - /** - * The template function buildInverseTruthMap() fills an - * InverseTruthMap object with data - * - * An inverse of a map is a multimap. Because we want to get a map - * instead, information may be lost in this operation. MatchCompare - * is a functor deciding which of the matches to keep. If cmp(a,b) is - * true, b will be kept, and a discarded. MatchCompare should define - * a total ordering (strict weak ordering does not guarantee that - * results will be reproducible). - * - * The input map may contain invalid particle links, therefore we - * must pre-filter it before the inversion. The pre-filtering may - * also include additional matching criteria. This is all done - * using a Filter functor, which returns true for accepted matches. - * - * @see Trk::InverseTruthMap, MatchCompare.h, TruthCollectionFilter.h - * - * @author Andrei Gaponenko <agaponenko@lbl.gov>, 2005 - */ - template<class TruthCollection, class Filter, class MatchCompare> - void buildInverseTruthMap(const TruthCollection& rec2truth, - InverseTruthMap<TruthCollection> *result, - const Filter& filter, - const MatchCompare& cmp); - - /** A fewer argument version with default MatchCompare=MatchCompareByProbability - */ - template<class TruthCollection, class Filter> - void buildInverseTruthMap(const TruthCollection& rec2truth, - InverseTruthMap<TruthCollection> *result, - const Filter& filter) - { - buildInverseTruthMap(rec2truth, result, filter, MatchCompareByProbability<TruthCollection>() ); - } - - /** A fewer argument version with default MatchCompare and Filter=BasicTruthCollectionFilter - */ - template<class TruthCollection> - void buildInverseTruthMap(const TruthCollection& rec2truth, - InverseTruthMap<TruthCollection> *result) - { - buildInverseTruthMap(rec2truth, - result, - BasicTruthCollectionFilter<TruthCollection>(), - MatchCompareByProbability<TruthCollection>() - ); - } - - //================================================================ - // Implementation of the "main" inverter. - - template<class TruthCollection, class Filter, class MatchCompare> - void buildInverseTruthMap(const TruthCollection& rec2truth, - InverseTruthMap<TruthCollection> *result, - const Filter& filter, - const MatchCompare& cmp) - { - result->clear(); - typedef std::map<const HepMC::GenParticle*, typename TruthCollection::const_iterator> Helper_t; - Helper_t seen_links; - for(typename TruthCollection::const_iterator i=rec2truth.begin(); i!=rec2truth.end(); i++) { - if(filter(i)) { - const HepMC::GenParticle *particle = i->second.particleLink().cptr(); - typename Helper_t::iterator p = seen_links.find(particle); - //---------------------------------------------------------------- - if(p == seen_links.end()) { // match to a new GenParticle - // Add this match to the output map. - (*result)[particle] = i->first ; - // and remember we saw the particle - seen_links[particle] = i; - } - //---------------------------------------------------------------- - else { // another match to the same GenParticle - // Need to decide which of the matches to keep. - if(cmp(p->second,i)) { // the new match is better - // Overwrite value for the key in the output map - (*result)[particle] = i->first ; - // and in the helper data structure. - seen_links[particle] = i; - } - } - } - } - } - - //================================================================ - - /*@}*/ - -} // namespace - -#endif/*TRUTHCOLLECTIONINVERTER_H*/ diff --git a/Tracking/TrkEvent/TrkEventUtils/src/PerigeeFromVertexCreator.cxx b/Tracking/TrkEvent/TrkEventUtils/src/PerigeeFromVertexCreator.cxx deleted file mode 100755 index 309a421945403f43fd805be35fa1230f373cbe4b..0000000000000000000000000000000000000000 --- a/Tracking/TrkEvent/TrkEventUtils/src/PerigeeFromVertexCreator.cxx +++ /dev/null @@ -1,72 +0,0 @@ -/* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -*/ - -/////////////////////////////////////////////////////////////////// -// PerigeeFromVertexCreator.cxx, (c) ATLAS Detector software // -/////////////////////////////////////////////////////////////////// - -#include "TrkEventUtils/PerigeeFromVertexCreator.h" -#include <cmath> - -const double Trk::PerigeeFromVertexCreator::s_unitConversion = -0.3; -const double Trk::PerigeeFromVertexCreator::s_magField = 2.083; - -Trk::Perigee Trk::PerigeeFromVertexCreator::createPerigee(Amg::Vector3D& vertex, - Amg::Vector3D& momentum, - double charge) const -{ - return createPerigee(vertex, momentum.phi(),momentum.theta(),charge/momentum.mag()); -} - -Trk::Perigee Trk::PerigeeFromVertexCreator::createPerigee(Amg::Vector3D& vertex, - double phi, - double theta, - double qOverP) const -{ - // calculate perigee - double sinp = sin(phi); - double cosp = sin(phi); - double R = vertex[1]*cosp - vertex[0]*sinp; - double Q = vertex[1]*sinp + vertex[0]*cosp; - double rho = s_unitConversion*m_field*qOverP/sin(theta); - double d0 = R + pow(Q,2.)*rho/2.; - double z0 = vertex[2] - Q*(1-R*rho)/tan(theta); - double phi0 = phi - Q*rho; - - // check phi0 for [-Pi,+Pi) range - while (phi0 > M_PI) { phi0 -= M_PI;} - while (phi0 < -M_PI) { phi0 += M_PI;} - - return Trk::Perigee(d0,z0,phi0,theta,qOverP,PerigeeSurface()); -} - -Trk::Perigee* Trk::PerigeeFromVertexCreator::createNewPerigee(Amg::Vector3D& vertex, - Amg::Vector3D& momentum, - double charge) const -{ - return createNewPerigee(vertex, momentum.phi(),momentum.theta(),charge/momentum.mag()); -} - -Trk::Perigee* Trk::PerigeeFromVertexCreator::createNewPerigee(Amg::Vector3D& vertex, - double phi, - double theta, - double qOverP) const -{ - // calculate perigee - double sinp = sin(phi); - double cosp = sin(phi); - double R = vertex[1]*cosp - vertex[0]*sinp; - double Q = vertex[1]*sinp + vertex[0]*cosp; - double rho = s_unitConversion*m_field*qOverP/sin(theta); - double d0 = R + pow(Q,2.)*rho/2.; - double z0 = vertex[2] - Q*(1-R*rho)/tan(theta); - double phi0 = phi - Q*rho; - - // check phi0 for [-Pi,+Pi) range - while (phi0 > M_PI) { phi0 -= M_PI;} - while (phi0 < -M_PI) { phi0 += M_PI;} - - return new Trk::Perigee(d0,z0,phi0,theta,qOverP,PerigeeSurface()); -} - diff --git a/Tracking/TrkExtrapolation/TrkExAlgs/python/TrkExAlgsConfig.py b/Tracking/TrkExtrapolation/TrkExAlgs/python/TrkExAlgsConfig.py index 390f038c8eb32d9d404c90dd3136befdaa6012c1..f594d6e7b2afc6cd0c5eeca07d921b36c7af2c89 100644 --- a/Tracking/TrkExtrapolation/TrkExAlgs/python/TrkExAlgsConfig.py +++ b/Tracking/TrkExtrapolation/TrkExAlgs/python/TrkExAlgsConfig.py @@ -38,7 +38,7 @@ if __name__=="__main__": from AthenaCommon.Logging import log from AthenaCommon.Constants import VERBOSE from AthenaConfiguration.AllConfigFlags import ConfigFlags - from AthenaConfiguration.MainServicesConfig import MainServicesThreadedCfg + from AthenaConfiguration.MainServicesConfig import MainServicesCfg #log.setLevel(VERBOSE) @@ -69,7 +69,7 @@ if __name__=="__main__": ConfigFlags.dump() - cfg=MainServicesThreadedCfg(ConfigFlags) + cfg=MainServicesCfg(ConfigFlags) from AtlasGeoModel.InDetGMConfig import InDetGeometryCfg cfg.merge(InDetGeometryCfg(ConfigFlags)) diff --git a/Tracking/TrkFitter/TrkFitterInterfaces/TrkFitterInterfaces/ITrackFitter.h b/Tracking/TrkFitter/TrkFitterInterfaces/TrkFitterInterfaces/ITrackFitter.h index d8cf4ee66365bf1ec5c820c9322bfcc6d355be07..bc0b561ed1e5e771d97498396393cea9b7a5913e 100755 --- a/Tracking/TrkFitter/TrkFitterInterfaces/TrkFitterInterfaces/ITrackFitter.h +++ b/Tracking/TrkFitter/TrkFitterInterfaces/TrkFitterInterfaces/ITrackFitter.h @@ -61,10 +61,8 @@ public: } /* - * First the context aware retun unique_ptr - * methods. - * If this set is not overloaded , it - * will call the methods without EventContext + * Event context aware methods + * returning unique_ptr */ /** Event context aware (Athena MT) RE-FIT A TRACK. */ @@ -134,10 +132,12 @@ public: const ParticleHypothesis matEffects = Trk::nonInteracting) const = 0; /* - * Then the context unaware methods. + * Context unaware methods. * These are here for client compatibility. * They just call the EventContext aware * methods. + * They can be removed if all clients are + * updated * Implementations do not need to provide them. */ diff --git a/Tracking/TrkTools/TrkAmbiguityProcessor/CMakeLists.txt b/Tracking/TrkTools/TrkAmbiguityProcessor/CMakeLists.txt index a39d791962042c5652221284c731504e4c58630a..b17deee787ed6afc28f2f771a635fbdbc1d4813d 100644 --- a/Tracking/TrkTools/TrkAmbiguityProcessor/CMakeLists.txt +++ b/Tracking/TrkTools/TrkAmbiguityProcessor/CMakeLists.txt @@ -35,6 +35,7 @@ find_package( HepPDT ) atlas_add_library( TrkAmbiguityProcessorLib src/DenseEnvironmentsAmbiguityProcessorTool.cxx src/DenseEnvironmentsAmbiguityScoreProcessorTool.cxx + PUBLIC_HEADERS TrkAmbiguityProcessor PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaKernel AthenaBaseComps AtlasDetDescr GaudiKernel InDetPrepRawData InDetRecToolInterfaces TrkDetElementBase TrkEventPrimitives TrkParameters TrkRIO_OnTrack TrkTrack TrkTrackSummary TrkTruthData TrkFitterInterfaces TrkToolInterfaces TrkValInterfaces TrkExInterfaces TrkCaloClusterROI) diff --git a/Tracking/TrkTools/TrkAmbiguityProcessor/src/AmbiCounter.icc b/Tracking/TrkTools/TrkAmbiguityProcessor/src/AmbiCounter.icc new file mode 100644 index 0000000000000000000000000000000000000000..cc6b2af9c86dd08c54cba26e54b6b70aa3d2838f --- /dev/null +++ b/Tracking/TrkTools/TrkAmbiguityProcessor/src/AmbiCounter.icc @@ -0,0 +1,117 @@ +/* + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef TrkAmbiguityProcessor_AmbiCounter_icc +#define TrkAmbiguityProcessor_AmbiCounter_icc +#include <array> +#include <vector> +#include <string> +#include "TrkTrack/Track.h" + +template<class EnumType> +class AmbiCounter { +public: + using Categories = EnumType; + enum RegionIndex {iAll = 0, iBarrel = 1, iTransi = 2, iEndcap = 3, iDBM = 4, nRegions=5, iForwrd = 4}; + enum GlobalCounterIndices { + nEvents, + nInvalidTracks, + nTracksWithoutParam, + nGlobalCounters, + }; + // + AmbiCounter(const std::vector<float> &eta_bounds): m_etaBounds(eta_bounds){ + //nop + } + + //convert Category to array index + size_t + idx(const Categories & categoryIndex) const{ + return static_cast<size_t>(categoryIndex); + } + + //increment event count + void + newEvent(){ + ++m_globalCounter[nEvents]; + } + + //return number of events + int + numberOfEvents() const{ + return m_globalCounter[nEvents]; + } + // increment one bin + void + increment(Categories regionIdx, unsigned int etaBinIdx) { + if (etaBinIdx>=nRegions) return; + if (regionIdx<Categories::kNCounter && etaBinIdx < m_counter[idx(regionIdx)].size()) { + ++m_counter[idx(regionIdx)][etaBinIdx]; + } else { throw std::range_error("out of range"); } + + } + // + AmbiCounter<EnumType> & operator +=(const AmbiCounter<EnumType> &a) { + for (unsigned int i=0; i<nGlobalCounters; ++i) { + m_globalCounter[i]+= a.m_globalCounter[i]; + } + for (size_t regionIdx=0; regionIdx < idx(Categories::kNCounter); ++regionIdx) { + for (unsigned int etaBinIdx=0; etaBinIdx < a.m_counter[regionIdx].size(); ++etaBinIdx) { + m_counter[regionIdx][etaBinIdx] += a.m_counter[regionIdx][etaBinIdx]; + } + } + return *this; +} + // + void incrementCounterByRegion(Categories regionIdx,const Trk::Track* track, bool updateAll=true){ + if (updateAll) increment(regionIdx,iAll); + // test + if (!track) { + ++m_globalCounter[nEvents]; + return; + } + // use first parameter + if (!track->trackParameters()) { + ++m_globalCounter[nTracksWithoutParam]; + } else { + std::array<int, nRegions> &nTracks = m_counter[idx(regionIdx)]; + // @TODO make sure that list of track parameters is not empty + const double absEta = std::abs(track->trackParameters()->front()->eta()); + ++nTracks[etaBin(absEta)]; + } + } + // + std::string + dumpRegions(const std::string & head,Categories regionIdx, const int iw =9) const { + std::stringstream out; + out << head; + for (unsigned int etaBinIdx=0; etaBinIdx < nRegions; ++etaBinIdx) { + assert( etaBinIdx < m_counter[idx(regionIdx)].size() ); + out << std::setiosflags(std::ios::dec) << std::setw(iw) << m_counter[idx(regionIdx)][etaBinIdx]; + } + out << "\n"; + return out.str(); + } + // + int + globalCount(GlobalCounterIndices i) const{ + return m_globalCounter[i]; + } + +private: + std::array<std::array<int, nRegions>,static_cast<size_t>(Categories::kNCounter)> m_counter{}; + std::array<int,nGlobalCounters> m_globalCounter{}; + const std::vector<float> &m_etaBounds; //!< eta intervals for internal monitoring + size_t + etaBin(const double val){ + size_t regionIdx=1; + //eta *must be* in ascending order in the m_etaBounds vector + for (;regionIdx< nRegions; ++regionIdx){ + if (val < m_etaBounds[regionIdx-1]) break; + } + return regionIdx; + } +}; + +#endif diff --git a/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityProcessorTool.cxx b/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityProcessorTool.cxx index 20b1fa2ed7d90ad4bef01d38bc52752ba4c773a1..38979306628ed799de67657917dd137c922a49d0 100644 --- a/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityProcessorTool.cxx +++ b/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityProcessorTool.cxx @@ -14,14 +14,11 @@ #include "TrkExInterfaces/IExtrapolator.h" #include "TrkTrackSummary/TrackSummary.h" #include "TrkCaloClusterROI/CaloClusterROI_Collection.h" - -#include <iterator> -#include "TString.h" - #include "InDetPrepRawData/PixelCluster.h" #include "InDetPrepRawData/SCT_Cluster.h" #include "InDetIdentifier/PixelID.h" #include <cmath> +#include <iterator> //TODO: to be improved bool Trk::DenseEnvironmentsAmbiguityProcessorTool::checkTrack( const Trk::Track *track) const { @@ -56,8 +53,8 @@ Trk::DenseEnvironmentsAmbiguityProcessorTool::DenseEnvironmentsAmbiguityProcesso m_scoringTool("Trk::TrackScoringTool/TrackScoringTool"), m_extrapolatorTool("Trk::Extrapolator/AtlasExtrapolator"), m_selectionTool("InDet::InDetDenseEnvAmbiTrackSelectionTool/InDetAmbiTrackSelectionTool"), - m_etabounds{0.8, 1.6, 2.5, 4.0}, - m_stat(m_etabounds) + m_etaBounds{0.8, 1.6, 2.5, 4.0}, + m_stat(m_etaBounds) { // statitics stuff @@ -77,7 +74,7 @@ Trk::DenseEnvironmentsAmbiguityProcessorTool::DenseEnvironmentsAmbiguityProcesso declareProperty("tryBremFit" , m_tryBremFit = false); declareProperty("caloSeededBrem" , m_caloSeededBrem = false); declareProperty("pTminBrem" , m_pTminBrem = 1000.); - declareProperty("etaBounds" , m_etabounds,"eta intervals for internal monitoring"); + declareProperty("etaBounds" , m_etaBounds,"eta intervals for internal monitoring"); //To determine the ROI for high pt Bs declareProperty("doHadCaloSeed" ,m_useHClusSeed = false ); @@ -131,9 +128,9 @@ StatusCode Trk::DenseEnvironmentsAmbiguityProcessorTool::initialize() ATH_CHECK(m_dRMap.initialize() ); } - if (m_stat.etaBounds().size() != TrackStat::kNStatRegions-1) { - ATH_MSG_FATAL("There must be exactly " << (TrackStat::kNStatRegions-1) << " eta bounds but " - << m_stat.etaBounds().size() << " are set." ); + if (m_etaBounds.size() != TrackStat::nRegions-1) { + ATH_MSG_FATAL("There must be exactly " << (TrackStat::nRegions-1) << " eta bounds but " + << m_etaBounds.size() << " are set." ); return StatusCode::FAILURE; } return sc; @@ -151,72 +148,11 @@ void Trk::DenseEnvironmentsAmbiguityProcessorTool::statistics() MsgStream &out=msg(MSG::INFO); out << " -- statistics \n"; std::lock_guard<std::mutex> lock( m_statMutex ); - m_stat.dump(out, m_tryBremFit); + dumpStat(out); out << endmsg; } } -void Trk::DenseEnvironmentsAmbiguityProcessorTool::TrackStat::dump(MsgStream &out, bool try_brem_fit) const -{ - auto parseFileName=[](const std::string & fullname){ - auto dotPosition = fullname.rfind('.'); - auto slashPosition = fullname.rfind('/'); - auto stringLength = dotPosition - slashPosition; - return fullname.substr(slashPosition, stringLength); - }; - // @TODO restore ios - std::streamsize ss = out.precision(); - int iw=9; - out << "Output from "; - out << parseFileName(__FILE__); - out << "::"; - out << __func__; - out << "\n"; - out << "------------------------------------------------------------------------------------" << "\n"; - out << " Number of events processed : "<< m_globalCounter[kNevents].value() << "\n"; - if (m_globalCounter[kNInvalidTracks]>0) { - out << " Number of invalid tracks : "<< m_globalCounter[kNInvalidTracks].value() << "\n"; - } - if (m_globalCounter[kNTracksWithoutParam]>0) { - out << " Tracks without parameters : "<< m_globalCounter[kNTracksWithoutParam].value() << "\n"; - } - out << " statistics by eta range ------All---Barrel---Trans.-- Endcap-- Forwrd-- " << "\n"; - out << "------------------------------------------------------------------------------------" << "\n"; - dumpStatType(out, " Number of candidates at input :", kNcandidates,iw); - out << "------------------------------------------------------------------------------------" << "\n"; - dumpStatType(out, " candidates with good score :", kNscoreOk,iw); - if (try_brem_fit) { - dumpStatType(out, " + recovered after brem refit :", kNscoreZeroBremRefit,iw); - } - dumpStatType(out, " candidates rejected score 0 :", kNscoreZero,iw); - if (try_brem_fit) { - dumpStatType(out, " + m refit :", kNscoreZeroBremRefitFailed,iw); - dumpStatType(out, " + rejected brem refit score 0 :", kNscoreZeroBremRefitScoreZero,iw); - } - out << "------------------------------------------------------------------------------------" << "\n"; - dumpStatType(out, " number of normal fits :" , kNfits,iw); - if (try_brem_fit) { - dumpStatType(out, " + 2nd brem fit for failed fit :", kNrecoveryBremFits,iw); - dumpStatType(out, " normal brem fits for electrons :", kNbremFits,iw); - } - out << "------------------------------------------------------------------------------------" << "\n"; - dumpStatType(out, " sum of succesful fits :", kNgoodFits,iw); - dumpStatType(out, " sum of failed fits :", kNfailedFits,iw); - out << "------------------------------------------------------------------------------------" << "\n"; - dumpStatType(out, " Number of subtracks created :", kNsubTrack,iw); - dumpStatType(out, " Number of candidates excluded :", kNnoSubTrack,iw); - out << "------------------------------------------------------------------------------------" << "\n"; - dumpStatType(out, " Number of tracks accepted :", kNaccepted,iw); - if (try_brem_fit) { - dumpStatType(out, " including number of brem fits :", kNacceptedBrem,iw); - } - out << "------------------------------------------------------------------------------------" << "\n"; - out << std::setiosflags(std::ios::fixed | std::ios::showpoint) << std::setprecision(2) - << " definition: ( 0.0 < Barrel < " << (*m_etabounds)[iBarrel-1] << " < Transition < " << (*m_etabounds)[iTransi-1] - << " < Endcap < " << (*m_etabounds)[iEndcap-1] << " < Forward < " << (*m_etabounds)[iForwrd-1] << " )" << "\n"; - out << "------------------------------------------------------------------------------------" << "\n"; - out << std::setprecision(ss); - } //================================================================================================== @@ -254,7 +190,7 @@ TrackCollection* Trk::DenseEnvironmentsAmbiguityProcessorTool::process(const Tra TrackCollection* finalTracks = new TrackCollection; { - TrackStat stat(m_stat.etaBounds()); + TrackStat stat(m_etaBounds); stat.newEvent(); solveTracks(*trackScoreTrackMap, *prd_to_track_map, *finalTracks, cleanup_tracks,stat); { @@ -277,7 +213,7 @@ void Trk::DenseEnvironmentsAmbiguityProcessorTool::addTrack(Trk::Track* track, c std::multimap<float, TrackPtr > &scoreTrackFitflagMap, const Trk::PRDtoTrackMap &prd_to_track_map, std::vector<std::unique_ptr<const Trk::Track> >& cleanup_tracks, - Trk::DenseEnvironmentsAmbiguityProcessorTool::TrackStat &stat) const + TrackStat &stat) const { // compute score TrackScore score; @@ -310,8 +246,8 @@ void Trk::DenseEnvironmentsAmbiguityProcessorTool::addTrack(Trk::Track* track, c Trk::Track* bremTrack = fit(*track,true,Trk::electron); if (!bremTrack){ ATH_MSG_DEBUG ("Brem refit failed, drop track"); - stat.increment_by_eta(TrackStat::kNscoreZeroBremRefitFailed,track); - stat.increment_by_eta(TrackStat::kNfailedFits,track); + stat.incrementCounterByRegion(EStatType::kNscoreZeroBremRefitFailed,track); + stat.incrementCounterByRegion(EStatType::kNfailedFits,track); // clean up cleanup_tracks.push_back(std::unique_ptr<const Trk::Track>(track) ); track=nullptr; @@ -319,7 +255,7 @@ void Trk::DenseEnvironmentsAmbiguityProcessorTool::addTrack(Trk::Track* track, c if (m_trackSummaryTool.isEnabled()) { m_trackSummaryTool->computeAndReplaceTrackSummary(*bremTrack,&prd_to_track_map,m_suppressHoleSearch); } - stat.increment_by_eta(TrackStat::kNgoodFits,bremTrack); + stat.incrementCounterByRegion(EStatType::kNgoodFits,bremTrack); // rerun score score = m_scoringTool->score( *bremTrack, suppressHoleSearch ); cleanup_tracks.push_back(std::unique_ptr<const Trk::Track>(track) ); @@ -327,20 +263,20 @@ void Trk::DenseEnvironmentsAmbiguityProcessorTool::addTrack(Trk::Track* track, c // do we accept the track ? if (score!=0){ ATH_MSG_DEBUG ("Brem refit successful, recovered track ("<< track <<") has score "<<score); - stat.increment_by_eta(TrackStat::kNscoreZeroBremRefit,bremTrack); + stat.incrementCounterByRegion(EStatType::kNscoreZeroBremRefit,bremTrack); // add track to map, map is sorted small to big ! scoreTrackFitflagMap.emplace( -score, TrackPtr(bremTrack, true) ); return; } ATH_MSG_DEBUG ("Brem refit gave still track score zero, reject it"); - stat.increment_by_eta(TrackStat::kNscoreZeroBremRefitScoreZero,bremTrack); + stat.incrementCounterByRegion(EStatType::kNscoreZeroBremRefitScoreZero,bremTrack); // clean up cleanup_tracks.push_back(std::unique_ptr<const Trk::Track>(bremTrack) ); } } else { ATH_MSG_DEBUG ("Track score is zero, reject it"); - stat.increment_by_eta(TrackStat::kNscoreZero,track); + stat.incrementCounterByRegion(EStatType::kNscoreZero,track); // @TODO can delete this track ? cleanup_tracks.push_back(std::unique_ptr<const Trk::Track>(track) ); } @@ -352,13 +288,13 @@ void Trk::DenseEnvironmentsAmbiguityProcessorTool::solveTracks(const TracksScore Trk::PRDtoTrackMap &prd_to_track_map, TrackCollection &finalTracks, std::vector<std::unique_ptr<const Trk::Track> > &cleanup_tracks, - Trk::DenseEnvironmentsAmbiguityProcessorTool::TrackStat &stat) const + TrackStat &stat) const { std::multimap<float, TrackPtr > scoreTrackFitflagMap; for(const std::pair< const Trk::Track *, float> &scoreTrack: trackScoreTrackMap){ scoreTrackFitflagMap.emplace(scoreTrack.second, TrackPtr(scoreTrack.first) ); - stat.increment_by_eta(TrackStat::kNcandidates,scoreTrack.first); + stat.incrementCounterByRegion(EStatType::kNcandidates,scoreTrack.first); } ATH_MSG_DEBUG ("Starting to solve tracks"); @@ -386,9 +322,9 @@ void Trk::DenseEnvironmentsAmbiguityProcessorTool::solveTracks(const TracksScore { // track can be kept as is and is already fitted ATH_MSG_DEBUG ("Accepted track "<<atrack.track()<<"\t has score "<<-ascore); - stat.increment_by_eta(TrackStat::kNaccepted, atrack.track() ); + stat.incrementCounterByRegion(EStatType::kNaccepted, atrack.track() ); if (m_tryBremFit && atrack.track()->info().trackProperties(Trk::TrackInfo::BremFit)) { - stat.increment_by_eta(TrackStat::kNacceptedBrem,atrack.track()); + stat.incrementCounterByRegion(EStatType::kNacceptedBrem,atrack.track()); } //Compute the fitQuality @@ -442,7 +378,7 @@ void Trk::DenseEnvironmentsAmbiguityProcessorTool::solveTracks(const TracksScore else if ( cleanedTrack ) //cleanedTrack != atrack { ATH_MSG_DEBUG ("Candidate excluded, add subtrack to map. Track "<<cleanedTrack.get()); - stat.increment_by_eta(TrackStat::kNsubTrack,cleanedTrack.get()); + stat.incrementCounterByRegion(EStatType::kNsubTrack,cleanedTrack.get()); // for this case clenedTrack is a new created object. addTrack(cleanedTrack.release(), false, scoreTrackFitflagMap, prd_to_track_map, cleanup_tracks, stat); @@ -456,7 +392,7 @@ void Trk::DenseEnvironmentsAmbiguityProcessorTool::solveTracks(const TracksScore { // track should be discarded ATH_MSG_DEBUG ("Track "<< atrack.track() << " is excluded, no subtrack, reject"); - stat.increment_by_eta(TrackStat::kNnoSubTrack,atrack.track()); + stat.incrementCounterByRegion(EStatType::kNnoSubTrack,atrack.track()); // remove original copy, but delay removal since some pointer to it or its constituents may still be in used if (atrack.newTrack()) { @@ -473,7 +409,7 @@ void Trk::DenseEnvironmentsAmbiguityProcessorTool::solveTracks(const TracksScore //================================================================================================== Trk::Track* Trk::DenseEnvironmentsAmbiguityProcessorTool::refitTrack( const Trk::Track* track, Trk::PRDtoTrackMap &prd_to_track_map, - Trk::DenseEnvironmentsAmbiguityProcessorTool::TrackStat &stat) const + TrackStat &stat) const { Trk::Track* newTrack = nullptr; if (!m_suppressTrackFit){ @@ -533,7 +469,7 @@ Trk::Track* Trk::DenseEnvironmentsAmbiguityProcessorTool::refitTrack( const Trk: Trk::Track* Trk::DenseEnvironmentsAmbiguityProcessorTool::refitPrds( const Trk::Track* track, Trk::PRDtoTrackMap &prd_to_track_map, - Trk::DenseEnvironmentsAmbiguityProcessorTool::TrackStat &stat) const + TrackStat &stat) const { // get vector of PRDs @@ -563,7 +499,7 @@ Trk::Track* Trk::DenseEnvironmentsAmbiguityProcessorTool::refitPrds( const Trk:: if (m_tryBremFit && track->info().trackProperties(Trk::TrackInfo::BremFit)) { - stat.increment_by_eta(TrackStat::kNbremFits,track); + stat.incrementCounterByRegion(EStatType::kNbremFits,track); ATH_MSG_VERBOSE ("Brem track, refit with electron brem fit"); // TODO revert once GlobalChi2Fitter properly handles brem fits when @@ -574,7 +510,7 @@ Trk::Track* Trk::DenseEnvironmentsAmbiguityProcessorTool::refitPrds( const Trk:: } else { - stat.increment_by_eta(TrackStat::kNfits,track); + stat.incrementCounterByRegion(EStatType::kNfits,track); ATH_MSG_VERBOSE ("Normal track, refit"); newTrack = fit(prds, *par, true, m_particleHypothesis); @@ -582,7 +518,7 @@ Trk::Track* Trk::DenseEnvironmentsAmbiguityProcessorTool::refitPrds( const Trk:: if (!newTrack && m_tryBremFit && par->pT() > m_pTminBrem && (!m_caloSeededBrem || track->info().patternRecoInfo(Trk::TrackInfo::TrackInCaloROI))) { - stat.increment_by_eta(TrackStat::kNrecoveryBremFits,track); + stat.incrementCounterByRegion(EStatType::kNrecoveryBremFits,track); ATH_MSG_VERBOSE ("Normal fit failed, try brem recovery"); // TODO revert once GlobalChi2Fitter properly handles brem fits when // starting from prds @@ -593,13 +529,13 @@ Trk::Track* Trk::DenseEnvironmentsAmbiguityProcessorTool::refitPrds( const Trk:: } if(newTrack) { - stat.increment_by_eta(TrackStat::kNgoodFits,newTrack); + stat.incrementCounterByRegion(EStatType::kNgoodFits,newTrack); //keeping the track of previously accumulated TrackInfo const Trk::TrackInfo& old_info = track->info(); newTrack->info().addPatternReco(old_info); } else { - stat.increment_by_eta(TrackStat::kNfailedFits,track); + stat.incrementCounterByRegion(EStatType::kNfailedFits,track); } return newTrack; } @@ -607,7 +543,7 @@ Trk::Track* Trk::DenseEnvironmentsAmbiguityProcessorTool::refitPrds( const Trk:: //================================================================================================== Trk::Track* Trk::DenseEnvironmentsAmbiguityProcessorTool::refitRots(const Trk::Track* track, - Trk::DenseEnvironmentsAmbiguityProcessorTool::TrackStat &stat) const + TrackStat &stat) const { ATH_MSG_VERBOSE ("Refit track "<<track); @@ -618,14 +554,14 @@ Trk::Track* Trk::DenseEnvironmentsAmbiguityProcessorTool::refitRots(const Trk::T if (m_tryBremFit && track->info().trackProperties(Trk::TrackInfo::BremFit)) { - stat.increment_by_eta(TrackStat::kNbremFits,track); + stat.incrementCounterByRegion(EStatType::kNbremFits,track); ATH_MSG_VERBOSE ("Brem track, refit with electron brem fit"); newTrack = fit(*track, true, Trk::electron); } else { - stat.increment_by_eta(TrackStat::kNfits,track); + stat.incrementCounterByRegion(EStatType::kNfits,track); ATH_MSG_VERBOSE ("Normal track, refit"); newTrack = fit(*track, true, m_particleHypothesis); @@ -633,7 +569,7 @@ Trk::Track* Trk::DenseEnvironmentsAmbiguityProcessorTool::refitRots(const Trk::T track->trackParameters()->front()->pT() > m_pTminBrem && (!m_caloSeededBrem || track->info().patternRecoInfo(Trk::TrackInfo::TrackInCaloROI))) { - stat.increment_by_eta(TrackStat::kNrecoveryBremFits,track); + stat.incrementCounterByRegion(EStatType::kNrecoveryBremFits,track); ATH_MSG_VERBOSE ("Normal fit failed, try brem recovery"); newTrack = fit(*track, true, Trk::electron); } @@ -641,13 +577,13 @@ Trk::Track* Trk::DenseEnvironmentsAmbiguityProcessorTool::refitRots(const Trk::T if(newTrack) { - stat.increment_by_eta(TrackStat::kNgoodFits,newTrack); + stat.incrementCounterByRegion(EStatType::kNgoodFits,newTrack); //keeping the track of previously accumulated TrackInfo const Trk::TrackInfo& old_info = track->info(); newTrack->info().addPatternReco(old_info); } else { - stat.increment_by_eta(TrackStat::kNfailedFits,track); + stat.incrementCounterByRegion(EStatType::kNfailedFits,track); } return newTrack; } @@ -909,3 +845,66 @@ Trk::Track* Trk::DenseEnvironmentsAmbiguityProcessorTool::refitTracksFromB(const } } } + +void +Trk::DenseEnvironmentsAmbiguityProcessorTool::dumpStat(MsgStream &out) const{ + auto parseFileName=[](const std::string & fullname){ + auto dotPosition = fullname.rfind("."); + auto slashPosition = fullname.rfind("/"); + auto stringLength = dotPosition - slashPosition; + return fullname.substr(slashPosition, stringLength); + }; + // @TODO restore ios + std::streamsize ss = out.precision(); + int iw=9; + out << "Output from "; + out << parseFileName(__FILE__); + out << "::"; + out << __func__; + out << "\n"; + out << "------------------------------------------------------------------------------------" << "\n"; + out << " Number of events processed : "<< m_stat.globalCount(TrackStat::nEvents) << "\n"; + if (const auto nInvalid = m_stat.globalCount(TrackStat::nInvalidTracks); nInvalid>0) { + out << " Number of invalid tracks : "<< nInvalid<< "\n"; + } + if (const auto nNoParams = m_stat.globalCount(TrackStat::nTracksWithoutParam); nNoParams>0) { + out << " Tracks without parameters : "<< nNoParams << "\n"; + } + out << " statistics by eta range ------All---Barrel---Trans.-- Endcap-- Forwrd-- " << "\n"; + out << "------------------------------------------------------------------------------------" << "\n"; + out << m_stat.dumpRegions( " Number of candidates at input :", EStatType::kNcandidates,iw); + out << "------------------------------------------------------------------------------------" << "\n"; + out << m_stat.dumpRegions( " candidates with good score :", EStatType::kNscoreOk,iw); + if (m_tryBremFit) { + out << m_stat.dumpRegions( " + recovered after brem refit :", EStatType::kNscoreZeroBremRefit,iw); + } + out << m_stat.dumpRegions( " candidates rejected score 0 :", EStatType::kNscoreZero,iw); + if (m_tryBremFit) { + out << m_stat.dumpRegions( " + m refit :", EStatType::kNscoreZeroBremRefitFailed,iw); + out << m_stat.dumpRegions( " + rejected brem refit score 0 :", EStatType::kNscoreZeroBremRefitScoreZero,iw); + } + out << "------------------------------------------------------------------------------------" << "\n"; + out << m_stat.dumpRegions( " number of normal fits :" , EStatType::kNfits,iw); + if (m_tryBremFit) { + out << m_stat.dumpRegions( " + 2nd brem fit for failed fit :", EStatType::kNrecoveryBremFits,iw); + out << m_stat.dumpRegions( " normal brem fits for electrons :", EStatType::kNbremFits,iw); + } + out << "------------------------------------------------------------------------------------" << "\n"; + out << m_stat.dumpRegions( " sum of succesful fits :", EStatType::kNgoodFits,iw); + out << m_stat.dumpRegions( " sum of failed fits :", EStatType::kNfailedFits,iw); + out << "------------------------------------------------------------------------------------" << "\n"; + out << m_stat.dumpRegions( " Number of subtracks created :", EStatType::kNsubTrack,iw); + out << m_stat.dumpRegions( " Number of candidates excluded :", EStatType::kNnoSubTrack,iw); + out << "------------------------------------------------------------------------------------" << "\n"; + out << m_stat.dumpRegions( " Number of tracks accepted :", EStatType::kNaccepted,iw); + if (m_tryBremFit) { + out << m_stat.dumpRegions( " including number of brem fits :", EStatType::kNacceptedBrem,iw); + } + out << "------------------------------------------------------------------------------------" << "\n"; + out << std::setiosflags(std::ios::fixed | std::ios::showpoint) << std::setprecision(2) + << " definition: ( 0.0 < Barrel < " << m_etaBounds[TrackStat::iBarrel-1] << " < Transition < " << m_etaBounds[TrackStat::iTransi-1] + << " < Endcap < " << m_etaBounds[TrackStat::iEndcap-1] << " < Forward < " << m_etaBounds[TrackStat::iForwrd-1] << " )" << "\n"; + out << "------------------------------------------------------------------------------------" << "\n"; + out << std::setprecision(ss); + } + diff --git a/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityProcessorTool.h b/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityProcessorTool.h index 9ea3b8ded714ccaf3ad889dd248499f88c9fa467..ebe80437b0587eb8f44747e8a958cd9a6961486b 100644 --- a/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityProcessorTool.h +++ b/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityProcessorTool.h @@ -24,14 +24,15 @@ #include "TrkTrack/TrackCollection.h" #include "TrkTrack/TrackSeedMap.h" #include "TrkParameters/TrackParameters.h" - +// +#include "AmbiCounter.icc" +// #include <map> -#include <set> #include <vector> -#include <ostream> #include "TrackPtr.h" + class AtlasDetectorID; class PixelID; @@ -42,21 +43,41 @@ namespace InDet{ } namespace Trk { - class ITrackScoringTool; class ITruthToTrack; class IExtrapolator; - + // class DenseEnvironmentsAmbiguityProcessorTool : public AthAlgTool, - virtual public ITrackAmbiguityProcessorTool - { - public: - - // default methods - DenseEnvironmentsAmbiguityProcessorTool(const std::string&,const std::string&,const IInterface*); - virtual ~DenseEnvironmentsAmbiguityProcessorTool (); - virtual StatusCode initialize() override; - virtual StatusCode finalize () override; + virtual public ITrackAmbiguityProcessorTool{ + public: + enum class EStatType { + kNtracks, + kNinvalid, + kNcandidates, + kNscoreOk, + kNscoreZeroBremRefit, + kNscoreZeroBremRefitFailed, + kNscoreZeroBremRefitScoreZero, + kNscoreZero, + kNaccepted, + kNsubTrack, + kNnoSubTrack, + kNacceptedBrem, + kNbremFits, + kNfits, + kNrecoveryBremFits, + kNgoodFits, + kNfailedFits, + kNCounter + }; + using TrackStat = AmbiCounter<EStatType>; + // default methods + DenseEnvironmentsAmbiguityProcessorTool(const std::string&,const std::string&,const IInterface*); + virtual ~DenseEnvironmentsAmbiguityProcessorTool (); + virtual StatusCode initialize() override; + virtual StatusCode finalize () override; + void dumpStat(MsgStream &out) const; + /**Returns a processed TrackCollection from the passed 'tracks' @param tracks collection of tracks which will have ambiguities resolved. Will not be @@ -71,108 +92,31 @@ namespace Trk { /** statistics output to be called by algorithm during finalize. */ virtual void statistics() override; private: - class TrackStat { - public: - TrackStat(const std::vector<float> &eta_bounds) : m_etabounds(&eta_bounds){} - - enum EStatType { - kNtracks, - kNinvalid, - kNcandidates, - // kNcandScoreZero, - // kNcandDouble, - kNscoreOk, - kNscoreZeroBremRefit, - kNscoreZeroBremRefitFailed, - kNscoreZeroBremRefitScoreZero, - kNscoreZero, - kNaccepted, - kNsubTrack, - kNnoSubTrack, - kNacceptedBrem, - kNbremFits, - kNfits, - kNrecoveryBremFits, - kNgoodFits, - kNfailedFits, - kNStatTypes - }; - enum EGlobalStatType { - kNevents, - kNInvalidTracks, - kNTracksWithoutParam, - kNGlobalStatTypes, - }; - /** internal monitoring: categories for counting different types of extension results*/ - enum StatIndex {iAll = 0, iBarrel = 1, iTransi = 2, iEndcap = 3, iForwrd = 4, kNStatRegions=5}; - - class Counter { - public: - Counter &operator+=(const Counter &a) { - m_counter += a.m_counter; - return *this; - } - Counter &operator++() { ++m_counter; return *this;} - operator int() const { return m_counter; } - int value() const { return m_counter; } - private: - unsigned int m_counter=0; - }; - - void newEvent() { - ++m_globalCounter[kNevents]; - } - - TrackStat &operator+=(const TrackStat &a) { - for (unsigned int i=0; i<kNGlobalStatTypes; ++i) { - m_globalCounter[i]+= a.m_globalCounter[i]; - } - for (unsigned int i=0; i<kNStatTypes; ++i) { - for (unsigned int region_i=0; region_i< kNStatRegions; ++region_i) { - m_counter[i][region_i] += a.m_counter[i][region_i]; - } - } - return *this; - } - - /** helper for monitoring and validation: does success/failure counting */ - void increment_by_eta(EStatType type, const Track* track, bool updateAll=true); - void dumpStatType(MsgStream &out, const std::string &head, EStatType type, unsigned short iw=9) const; - void dump(MsgStream &out, bool try_brem_fit) const; - - const std::vector<float> &etaBounds() const { return *m_etabounds; } //!< eta intervals for internal monitoring - - private: - std::array<Counter,kNGlobalStatTypes> m_globalCounter; - std::array<std::array<Counter, kNStatRegions>,kNStatTypes> m_counter; - - const std::vector<float> *m_etabounds; //!< eta intervals for internal monitoring - }; //transfer ownership void addTrack(Track* track, const bool fitted, std::multimap<float, TrackPtr > &scoreTrackFitflagMap, const Trk::PRDtoTrackMap &prd_to_track_map, std::vector<std::unique_ptr<const Trk::Track> >& cleanup_tracks, - Trk::DenseEnvironmentsAmbiguityProcessorTool::TrackStat &stat) const; + TrackStat &stat) const; void solveTracks(const TracksScores& trackScoreTrackMap, Trk::PRDtoTrackMap &prd_to_track_map, TrackCollection &finalTracks, std::vector<std::unique_ptr<const Trk::Track> >& cleanup_tracks, - Trk::DenseEnvironmentsAmbiguityProcessorTool::TrackStat &stat) const; + TrackStat &stat) const; /** refit track */ Track* refitTrack( const Trk::Track* track, Trk::PRDtoTrackMap &prd_to_track_map, - Trk::DenseEnvironmentsAmbiguityProcessorTool::TrackStat &stat) const; + TrackStat &stat) const; /** refit PRDs */ Track* refitPrds( const Track* track, Trk::PRDtoTrackMap &prd_to_track_map, - Trk::DenseEnvironmentsAmbiguityProcessorTool::TrackStat &stat) const; + TrackStat &stat) const; /** refit ROTs corresponding to PRDs*/ //TODO or Q: new created track, why const - Track* refitRots( const Track* track, Trk::DenseEnvironmentsAmbiguityProcessorTool::TrackStat &stat) const; + Track* refitRots( const Track* track, TrackStat &stat) const; /** stores the minimal dist(trk,trk) for covariance correction*/ void storeTrkDistanceMapdR(TrackCollection& tracks, @@ -269,7 +213,7 @@ namespace Trk { /**These allow us to retrieve the helpers*/ const PixelID* m_pixelId; const AtlasDetectorID* m_idHelper; - std::vector<float> m_etabounds; //!< eta intervals for internal monitoring + std::vector<float> m_etaBounds; //!< eta intervals for internal monitoring SG::WriteHandleKey<InDet::DRMap> m_dRMap; //!< the actual dR map @@ -348,41 +292,6 @@ namespace Trk { } } //end ns -void Trk::DenseEnvironmentsAmbiguityProcessorTool::TrackStat::increment_by_eta(EStatType type, - const Track* track, - bool updateAll) { - std::array<Counter,kNStatRegions> &Ntracks = m_counter[type]; - if (updateAll) ++Ntracks[iAll]; - - // test - if (!track) { - ++m_globalCounter[kNInvalidTracks]; - } - // use first parameter - if (!track->trackParameters()) { - ++m_globalCounter[kNTracksWithoutParam]; - } - else { - double eta = track->trackParameters()->front()->eta(); - for (unsigned int region_i=1; region_i< kNStatRegions; ++region_i) { - if (std::abs(eta) < (*m_etabounds)[region_i-1]) { - ++Ntracks[region_i]; - break; - } - } - } -} - -void Trk::DenseEnvironmentsAmbiguityProcessorTool::TrackStat::dumpStatType(MsgStream &out, - const std::string &head, - EStatType type, - unsigned short iw) const { - out << head << std::setiosflags(std::ios::dec); - for (unsigned region_i=0; region_i<kNStatRegions; ++region_i) { - out << std::setw(iw) << m_counter[type][region_i].value(); - } - out << "\n"; -} #endif // TrackAmbiguityProcessorTool_H diff --git a/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityScoreProcessorTool.cxx b/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityScoreProcessorTool.cxx index fd5b425131e4134f8495ea93822f88208fc04812..9cca17d85c476a3bc76d7469762d73e786053f19 100644 --- a/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityScoreProcessorTool.cxx +++ b/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityScoreProcessorTool.cxx @@ -29,8 +29,8 @@ Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::DenseEnvironmentsAmbiguitySco m_scoringTool("Trk::TrackScoringTool/TrackScoringTool"), m_selectionTool("InDet::InDetDenseEnvAmbiTrackSelectionTool/InDetAmbiTrackSelectionTool"), m_splitProbTool("InDet::NnPixelClusterSplitProbTool/NnPixelClusterSplitProbTool"), - m_etabounds{0.8, 1.6, 2.5,4.0}, - m_stat(m_etabounds) + m_etaBounds{0.8, 1.6, 2.5,4.0}, + m_stat(m_etaBounds) { declareInterface<ITrackAmbiguityScoreProcessorTool>(this); @@ -41,7 +41,7 @@ Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::DenseEnvironmentsAmbiguitySco declareProperty("SplitClusterMap_new" , m_splitClusterMapKey); declareProperty("sharedProbCut" , m_sharedProbCut = 0.3); declareProperty("sharedProbCut2" , m_sharedProbCut2 = 0.3); - declareProperty("etaBounds" , m_etabounds,"eta intervals for internal monitoring"); + declareProperty("etaBounds" , m_etaBounds,"eta intervals for internal monitoring"); } //================================================================================================== @@ -68,9 +68,9 @@ StatusCode Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::initialize() ATH_CHECK( m_splitClusterMapKey_last.initialize(!m_splitClusterMapKey_last.key().empty()) ); ATH_CHECK( m_splitClusterMapKey.initialize(!m_splitClusterMapKey.key().empty()) ); - if (m_stat.etaBounds().size() != TrackStat::kNStatRegions-1) { - ATH_MSG_FATAL("There must be exactly " << (TrackStat::kNStatRegions-1) << " eta bounds but " - << m_stat.etaBounds().size() << " are set." ); + if (m_etaBounds.size() != TrackStat3::nRegions-1) { + ATH_MSG_FATAL("There must be exactly " << (TrackStat3::nRegions-1) << " eta bounds but " + << m_etaBounds.size() << " are set." ); return StatusCode::FAILURE; } @@ -88,46 +88,11 @@ void Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::statistics() { MsgStream &out=msg(MSG::INFO); out << " -- statistics " << "\n"; std::lock_guard<std::mutex> lock( m_statMutex ); - m_stat.dump(out); + dumpStat(out); out << endmsg; } } -void Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::TrackStat::dump(MsgStream &out) const -{ - auto parseFileName=[](const std::string & fullname){ - auto dotPosition = fullname.rfind('.'); - auto slashPosition = fullname.rfind('/'); - auto stringLength = dotPosition - slashPosition; - return fullname.substr(slashPosition, stringLength); - }; - std::streamsize ss = out.precision(); - int iw=9; - out << "Output from "; - out << parseFileName(__FILE__); - out << "::"; - out << __func__; - out << "\n"; - out << "------------------------------------------------------------------------------------" << "\n"; - out << " Number of events processed : "<< m_globalCounter[kNevents].value() << "\n"; - if (m_globalCounter[kNInvalidTracks]>0) { - out << " Number of invalid tracks : "<< m_globalCounter[kNInvalidTracks].value() << "\n"; - } - if (m_globalCounter[kNTracksWithoutParam]>0) { - out << " Tracks without parameters : "<< m_globalCounter[kNTracksWithoutParam].value() << "\n"; - } - out << " statistics by eta range ------All---Barrel---Trans.-- Endcap-- Forwrd-- " << "\n"; - out << "------------------------------------------------------------------------------------" << "\n"; - dumpStatType(out, " Number of candidates at input :", kNcandidates,iw); - dumpStatType(out, " - candidates rejected score 0 :", kNcandScoreZero,iw); - dumpStatType(out, " - candidates rejected as double :", kNcandDouble,iw); - out << "------------------------------------------------------------------------------------" << "\n"; - out << std::setiosflags(std::ios::fixed | std::ios::showpoint) << std::setprecision(2) - << " definition: ( 0.0 < Barrel < " << (*m_etabounds)[iBarrel-1] << " < Transition < " << (*m_etabounds)[iTransi-1] - << " < Endcap < " << (*m_etabounds)[iEndcap-1] << " < Forward < " << (*m_etabounds)[iForwrd-1] << " )" << "\n"; - out << "------------------------------------------------------------------------------------" << "\n"; - out << std::setprecision(ss); -} //================================================================================================== @@ -181,7 +146,7 @@ void Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::process(std::vector<cons void Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::addNewTracks(std::vector<const Track*>* tracks, Trk::TracksScores* trackScoreTrackMap) const { - TrackStat stat(m_stat.etaBounds()); + TrackStat3 stat(m_etaBounds); stat.newEvent(); std::unique_ptr<Trk::PRDtoTrackMap> prd_to_track_map( m_assoTool->createPRDtoTrackMap() ); @@ -191,7 +156,7 @@ void Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::addNewTracks(std::vector for(const Track* a_track : *tracks) { ATH_MSG_DEBUG ("Processing track candidate "<<a_track); - stat.increment_by_eta(TrackStat::kNcandidates,a_track); // @TODO should go to the score processor + stat.incrementCounterByRegion(EStatType::kNcandidates,a_track); // @TODO should go to the score processor // only fitted tracks get hole search, input is not fitted float score = m_scoringTool->score( *a_track, true); @@ -199,15 +164,15 @@ void Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::addNewTracks(std::vector // veto tracks with score 0 bool reject = score==0; if (reject){ - stat.increment_by_eta(TrackStat::kNcandScoreZero,a_track); + stat.incrementCounterByRegion(EStatType::kNcandScoreZero,a_track); } else {// double track rejection - std::vector<const Trk::PrepRawData*> prds = m_assoTool->getPrdsOnTrack(*prd_to_track_map, *a_track); + const std::vector<const Trk::PrepRawData*> & prds = m_assoTool->getPrdsOnTrack(*prd_to_track_map, *a_track); // convert to set - PrdSignature prdSig( prds.begin(),prds.end() ); + //PrdSignature prdSig( prds.begin(),prds.end() ); // we try to insert it into the set, if we fail (pair.second), it then exits already - if ( !(prdSigSet.insert(prdSig)).second ) { + if ( !(prdSigSet.insert(prds)).second ) { ATH_MSG_DEBUG ("Double track, reject it !"); - stat.increment_by_eta(TrackStat::kNcandDouble,a_track); + stat.incrementCounterByRegion(EStatType::kNcandDouble,a_track); reject = true; } else { ATH_MSG_DEBUG ("Insert new track in PrdSignatureSet"); @@ -269,7 +234,8 @@ void Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::updatePixelSplitInformat } //================================================================================================== -void Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::overlappingTracks(const TracksScores* scoredTracks, +void +Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::overlappingTracks(const TracksScores* scoredTracks, InDet::PixelGangedClusterAmbiguities *splitClusterMap, Trk::PRDtoTrackMap &prd_to_track_map) const { @@ -372,5 +338,43 @@ void Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::overlappingTracks(const } } - } +} + +void +Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::dumpStat(MsgStream &out) const +{ + auto parseFileName=[](const std::string & fullname){ + auto dotPosition = fullname.rfind("."); + auto slashPosition = fullname.rfind("/"); + auto stringLength = dotPosition - slashPosition; + return fullname.substr(slashPosition, stringLength); + }; + std::streamsize ss = out.precision(); + int iw=9; + out << "Output from "; + out << parseFileName(__FILE__); + out << "::"; + out << __func__; + out << "\n"; + out << "------------------------------------------------------------------------------------" << "\n"; + out << " Number of events processed : "<< m_stat.globalCount(TrackStat3::nEvents) << "\n"; + if (m_stat.globalCount(TrackStat3::nInvalidTracks)>0) { + out << " Number of invalid tracks : "<< m_stat.globalCount(TrackStat3::nInvalidTracks) << "\n"; + } + if (m_stat.globalCount(TrackStat3::nTracksWithoutParam)>0) { + out << " Tracks without parameters : "<< m_stat.globalCount(TrackStat3::nTracksWithoutParam) << "\n"; + } + out << " statistics by eta range ------All---Barrel---Trans.-- Endcap-- Forwrd-- " << "\n"; + out << "------------------------------------------------------------------------------------" << "\n"; + out << m_stat.dumpRegions(" Number of candidates at input :", EStatType::kNcandidates,iw); + out << m_stat.dumpRegions(" - candidates rejected score 0 :", EStatType::kNcandScoreZero,iw); + out << m_stat.dumpRegions(" - candidates rejected as double :", EStatType::kNcandDouble,iw); + out << "------------------------------------------------------------------------------------" << "\n"; + out << std::setiosflags(std::ios::fixed | std::ios::showpoint) << std::setprecision(2) + << " definition: ( 0.0 < Barrel < " << m_etaBounds[TrackStat3::iBarrel-1] << " < Transition < " << m_etaBounds[TrackStat3::iTransi-1] + << " < Endcap < " << m_etaBounds[TrackStat3::iEndcap-1] << " < Forward < " << m_etaBounds[TrackStat3::iForwrd-1] << " )" << "\n"; + out << "------------------------------------------------------------------------------------" << "\n"; + out << std::setprecision(ss); +} + diff --git a/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityScoreProcessorTool.h b/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityScoreProcessorTool.h index a64481f3b548932a01c9304af0723ba7f12ac947..69cfa2e5ae91ef14b0974fc35fcfe09778d57acc 100644 --- a/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityScoreProcessorTool.h +++ b/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityScoreProcessorTool.h @@ -21,12 +21,10 @@ #include "TrkToolInterfaces/IPRDtoTrackMapTool.h" #include "TrkEventUtils/PRDtoTrackMap.h" - +#include "AmbiCounter.icc" #include <map> #include <set> #include <vector> -#include <ostream> - namespace InDet{ class IPixelClusterSplitProbTool; @@ -40,12 +38,19 @@ namespace Trk { class DenseEnvironmentsAmbiguityScoreProcessorTool: public AthAlgTool, virtual public ITrackAmbiguityScoreProcessorTool - { - public: - + { + public: + enum class EStatType { + kNtracks, + kNcandidates, + kNcandScoreZero, + kNcandDouble, + kNCounter + }; + using TrackStat3 = AmbiCounter<EStatType>; // public types typedef std::multimap< TrackScore, const Track* > TrackScoreMap; - typedef std::set<const PrepRawData*> PrdSignature; + typedef std::vector<const PrepRawData*> PrdSignature; typedef std::set<PrdSignature> PrdSignatureSet; // default methods @@ -59,69 +64,9 @@ namespace Trk { /** statistics output to be called by algorithm during finalize. */ void statistics() override; + void dumpStat(MsgStream &out) const; private: - class TrackStat { - public: - TrackStat(const std::vector<float> &eta_bounds) : m_etabounds(&eta_bounds){} - - enum EStatType { - kNtracks, - kNcandidates, - kNcandScoreZero, - kNcandDouble, - kNStatTypes - }; - enum EGlobalStatType { - kNevents, - kNInvalidTracks, - kNTracksWithoutParam, - kNGlobalStatTypes, - }; - /** internal monitoring: categories for counting different types of extension results*/ - enum StatIndex {iAll = 0, iBarrel = 1, iTransi = 2, iEndcap = 3, iForwrd = 4, kNStatRegions=5}; - - class Counter { - public: - Counter &operator+=(const Counter &a) { - m_counter += a.m_counter; - return *this; - } - Counter &operator++() { ++m_counter; return *this;} - operator int() const { return m_counter; } - int value() const { return m_counter; } - private: - unsigned int m_counter=0; - }; - - void newEvent() { - ++m_globalCounter[kNevents]; - } - - TrackStat &operator+=(const TrackStat &a) { - for (unsigned int i=0; i<kNGlobalStatTypes; ++i) { - m_globalCounter[i]+= a.m_globalCounter[i]; - } - for (unsigned int i=0; i<kNStatTypes; ++i) { - for (unsigned int region_i=0; region_i< kNStatRegions; ++region_i) { - m_counter[i][region_i] += a.m_counter[i][region_i]; - } - } - return *this; - } - - /** helper for monitoring and validation: does success/failure counting */ - void increment_by_eta(EStatType type, const Track* track, bool updateAll=true); - void dumpStatType(MsgStream &out, const std::string &head, EStatType type, unsigned short iw=9) const; - void dump(MsgStream &out) const; - - const std::vector<float> &etaBounds() const { return *m_etabounds; } //!< eta intervals for internal monitoring - - private: - std::array<Counter,kNGlobalStatTypes> m_globalCounter; - std::array<std::array<Counter, kNStatRegions>,kNStatTypes> m_counter; - - const std::vector<float> *m_etabounds; //!< eta intervals for internal monitoring - }; + /**Add passed TrackCollection, and Trk::PrepRawData from tracks to caches @param tracks the TrackCollection is looped over, @@ -175,46 +120,11 @@ namespace Trk { /**NN split sprob cut for 3 particle clusters */ float m_sharedProbCut2; - std::vector<float> m_etabounds; //!< eta intervals for internal monitoring + std::vector<float> m_etaBounds; //!< eta intervals for internal monitoring mutable std::mutex m_statMutex; - mutable TrackStat m_stat ATLAS_THREAD_SAFE; + mutable TrackStat3 m_stat ATLAS_THREAD_SAFE; }; } //end ns -void Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::TrackStat::increment_by_eta(EStatType type, - const Track* track, - bool updateAll) { - std::array<Counter,kNStatRegions> &Ntracks = m_counter[type]; - if (updateAll) ++Ntracks[iAll]; - - // test - if (!track) { - ++m_globalCounter[kNInvalidTracks]; - } - // use first parameter - if (!track->trackParameters()) { - ++m_globalCounter[kNTracksWithoutParam]; - } - else { - double eta = track->trackParameters()->front()->eta(); - for (unsigned int region_i=1; region_i< kNStatRegions; ++region_i) { - if (std::abs(eta) < (*m_etabounds)[region_i-1]) { - ++Ntracks[region_i]; - break; - } - } - } -} - -void Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::TrackStat::dumpStatType(MsgStream &out, - const std::string &head, - EStatType type, - unsigned short iw) const { - out << head << std::setiosflags(std::ios::dec); - for (unsigned region_i=0; region_i<kNStatRegions; ++region_i) { - out << std::setw(iw) << m_counter[type][region_i].value(); - } - out << "\n"; -} #endif // TrackAmbiguityProcessorTool_H diff --git a/Tracking/TrkTools/TrkAmbiguityProcessor/src/SimpleAmbiguityProcessorTool.cxx b/Tracking/TrkTools/TrkAmbiguityProcessor/src/SimpleAmbiguityProcessorTool.cxx index a67dd8230344107925d51845e1448db83ed2fca9..732a75b3b66279310040dd962d10c799c37df8c5 100644 --- a/Tracking/TrkTools/TrkAmbiguityProcessor/src/SimpleAmbiguityProcessorTool.cxx +++ b/Tracking/TrkTools/TrkAmbiguityProcessor/src/SimpleAmbiguityProcessorTool.cxx @@ -11,8 +11,6 @@ #include "TrkToolInterfaces/IPRD_AssociationTool.h" #include "TrkTrack/TrackCollection.h" #include "TrkTrack/TrackInfo.h" -#include <ext/functional> -#include <iterator> #include <map> #include <memory> @@ -31,7 +29,7 @@ Trk::SimpleAmbiguityProcessorTool::SimpleAmbiguityProcessorTool(const std::strin 2.5, 2.5, 10.0} ), - m_Nevents(0) + m_stat(m_etabounds) { // statitics stuff @@ -123,101 +121,30 @@ StatusCode Trk::SimpleAmbiguityProcessorTool::initialize() } // statistics - if (m_etabounds.size() != kNRegions) { - ATH_MSG_ERROR( "There must be exactly " << kNRegions + if (m_etabounds.size() != Counter::nRegions) { + ATH_MSG_ERROR( "There must be exactly " << Counter::nRegions << " etaBounds: barrel end, transition region end, end-cap end, DBM start, DBM end." ); return StatusCode::FAILURE; } - m_stat.init(); return sc; } //================================================================================================== -StatusCode Trk::SimpleAmbiguityProcessorTool::finalize() -{ +StatusCode Trk::SimpleAmbiguityProcessorTool::finalize(){ return StatusCode::SUCCESS; } -void Trk::SimpleAmbiguityProcessorTool::statistics() -{ - +void Trk::SimpleAmbiguityProcessorTool::statistics(){ if (msgLvl(MSG::INFO)) { MsgStream &out=msg(MSG::INFO); out << " -- statistics:" << "\n"; + std::lock_guard<std::mutex> lock( m_statMutex ); dumpStat(out); out << endmsg; } } -void Trk::SimpleAmbiguityProcessorTool::dumpStat(MsgStream &out) const { - std::lock_guard<std::mutex> lock( m_statMutex ); - auto parseFileName=[](const std::string & fullname){ - auto dotPosition = fullname.rfind('.'); - auto slashPosition = fullname.rfind('/'); - auto stringLength = dotPosition - slashPosition; - return fullname.substr(slashPosition, stringLength); - }; - // @TODO restore ios - std::streamsize ss = std::cout.precision(); - out << "Output from "; - out << parseFileName(__FILE__); - out << "::"; - out << __func__; - out << "\n"; - out << "---------------------------------------------------------------------------------" << "\n"; - out << " Number of events processed : "<< m_Nevents << "\n"; - out << " statistics by eta range ------All---Barrel---Trans.--- Endcap---DBM---" << "\n"; - out << "---------------------------------------------------------------------------------" << "\n"; - dumpRegions(out, " Number of candidates at input :", Trk::SimpleAmbiguityProcessorTool::Counter::kNcandidates); - dumpRegions(out, " - candidates rejected score 0 :", Trk::SimpleAmbiguityProcessorTool::Counter::kNcandScoreZero); - dumpRegions(out, " - candidates rejected as double :", Trk::SimpleAmbiguityProcessorTool::Counter::kNcandDouble); - out << "---------------------------------------------------------------------------------" << "\n"; - dumpRegions(out, " candidates with good score :", Trk::SimpleAmbiguityProcessorTool::Counter::kNscoreOk); - if (m_tryBremFit) { - dumpRegions(out," + recovered after brem refit :", Trk::SimpleAmbiguityProcessorTool::Counter::kNscoreZeroBremRefit); - } - dumpRegions(out, " candidates rejected score 0 :", Trk::SimpleAmbiguityProcessorTool::Counter::kNscoreZero); - if (m_tryBremFit) { - dumpRegions(out," + rejected failed brem refit :", Trk::SimpleAmbiguityProcessorTool::Counter::kNscoreZeroBremRefitFailed); - } - out << "---------------------------------------------------------------------------------" << "\n"; - dumpRegions(out, " number of normal fits :", Trk::SimpleAmbiguityProcessorTool::Counter::kNfits); - if (m_tryBremFit) { - dumpRegions(out," + 2nd brem fit for failed fit :", Trk::SimpleAmbiguityProcessorTool::Counter::kNrecoveryBremFits); - dumpRegions(out," normal brem fits for electrons :", Trk::SimpleAmbiguityProcessorTool::Counter::kNbremFits); - } - out << "---------------------------------------------------------------------------------" << "\n"; - dumpRegions(out, " sum of succesful fits :", Trk::SimpleAmbiguityProcessorTool::Counter::kNgoodFits); - dumpRegions(out, " sum of failed fits :", Trk::SimpleAmbiguityProcessorTool::Counter::kNfailedFits); - out << "---------------------------------------------------------------------------------" << "\n"; - dumpRegions(out, " Number of subtracks created :", Trk::SimpleAmbiguityProcessorTool::Counter::kNsubTrack); - dumpRegions(out, " Number of candidates excluded :", Trk::SimpleAmbiguityProcessorTool::Counter::kNnoSubTrack); - out << "---------------------------------------------------------------------------------" << "\n"; - dumpRegions(out, " Number of tracks accepted :", Trk::SimpleAmbiguityProcessorTool::Counter::kNaccepted); - if (m_tryBremFit) { - dumpRegions(out," including number of brem fits :", Trk::SimpleAmbiguityProcessorTool::Counter::kNacceptedBrem); - } - out << "---------------------------------------------------------------------------------" << "\n"; - out << std::setiosflags(std::ios::fixed | std::ios::showpoint) << std::setprecision(2) - << " definition: ( 0.0 < Barrel < " << m_etabounds[iBarrel-1] << " < Transition < " << m_etabounds[iTransi-1] - << " < Endcap < " << m_etabounds[iEndcap-1] << " DBM )" << "\n"; - out << "-------------------------------------------------------------------------------" << "\n"; - out.precision (ss); -} - -//================================================================================================== - -/** helper function for statistics */ -void Trk::SimpleAmbiguityProcessorTool::missingTrackOrParameters(const Track* track) const { - if (!track) { - ATH_MSG_ERROR ("track pointer zero, should not happen!"); - return; - } - if (!track->trackParameters()) { - ATH_MSG_WARNING ("No track parameters, needed for statistics code in Trk::SimpleAmbiguityProcessorTool!"); - } -} //================================================================================================== @@ -225,13 +152,13 @@ void Trk::SimpleAmbiguityProcessorTool::missingTrackOrParameters(const Track* tr and then returns the tracks which have been selected*/ -TrackCollection* Trk::SimpleAmbiguityProcessorTool::process(const TrackCollection* trackCol, Trk::PRDtoTrackMap *prd_to_track_map) const { +TrackCollection* Trk::SimpleAmbiguityProcessorTool::process(const TrackCollection* trackCol, Trk::PRDtoTrackMap *prdToTrackMap) const { std::vector<const Track*> tracks; tracks.reserve(trackCol->size()); for(const Track* e: *trackCol){ tracks.push_back(e); } - return process_vector(tracks, prd_to_track_map); + return process_vector(tracks, prdToTrackMap); } @@ -246,24 +173,22 @@ TrackCollection* Trk::SimpleAmbiguityProcessorTool::process(const TracksScores* return re_tracks; } -TrackCollection* Trk::SimpleAmbiguityProcessorTool::process_vector(std::vector<const Track*> &tracks, Trk::PRDtoTrackMap *prd_to_track_map) const{ +TrackCollection* Trk::SimpleAmbiguityProcessorTool::process_vector(std::vector<const Track*> &tracks, Trk::PRDtoTrackMap *prdToTrackMap) const{ using namespace std; - DEBUG_CODE( ntupleReset(tracks) ); - DEBUG_CODE( fillEventData(tracks) ); - ++m_Nevents; // statistics + m_stat.newEvent(); // statistics TrackScoreMap trackScoreTrackMap; - std::unique_ptr<Trk::PRDtoTrackMap> prd_to_track_map_cleanup; - if (!prd_to_track_map) { + std::unique_ptr<Trk::PRDtoTrackMap> prdToTrackMap_cleanup; + if (!prdToTrackMap) { // create internal PRD-to-track map - prd_to_track_map_cleanup = m_assoTool->createPRDtoTrackMap(); - prd_to_track_map = prd_to_track_map_cleanup.get(); + prdToTrackMap_cleanup = m_assoTool->createPRDtoTrackMap(); + prdToTrackMap = prdToTrackMap_cleanup.get(); } //put tracks into maps etc ATH_MSG_DEBUG ("Adding input track candidates to list"); - Counter stat; - addNewTracks(tracks, trackScoreTrackMap, *prd_to_track_map, stat); + Counter stat(m_etabounds); + addNewTracks(tracks, trackScoreTrackMap, *prdToTrackMap, stat); // going to do simple algorithm for now: // - take track with highest score @@ -271,73 +196,75 @@ TrackCollection* Trk::SimpleAmbiguityProcessorTool::process_vector(std::vector< // - take next highest scoring tracks, and repeat ATH_MSG_DEBUG ("Solving Tracks"); - std::vector<std::unique_ptr<const Trk::Track> > cleanup_tracks; - TrackCollection* final_tracks = solveTracks(trackScoreTrackMap, *prd_to_track_map,cleanup_tracks, stat); + std::vector<std::unique_ptr<const Trk::Track> > cleanupTracks; + TrackCollection* finalTracks = solveTracks(trackScoreTrackMap, *prdToTrackMap,cleanupTracks, stat); { std::lock_guard<std::mutex> lock(m_statMutex); m_stat += stat; } - if (msgLvl(MSG::DEBUG)) dumpTracks(*final_tracks); - return final_tracks; + if (msgLvl(MSG::DEBUG)) dumpTracks(*finalTracks); + return finalTracks; } //================================================================================================== void Trk::SimpleAmbiguityProcessorTool::addNewTracks(const std::vector<const Track*> &tracks, TrackScoreMap& trackScoreTrackMap, - Trk::PRDtoTrackMap &prd_to_track_map, - Trk::SimpleAmbiguityProcessorTool::Counter &stat) const + Trk::PRDtoTrackMap &prdToTrackMap, + Counter &stat) const { - using namespace std; - DEBUG_CODE( findTrueTracks(&tracks) ); + using namespace std; ATH_MSG_DEBUG ("Number of tracks at Input: "<<tracks.size()); + /** signature map to drop double track. */ PrdSignatureSet prdSigSet; - for(const Track *a_track : tracks) { - DEBUG_CODE( resetTrackOutliers() ); - ATH_MSG_DEBUG ("Processing track candidate "<<a_track); - // statistics - increment_by_eta(Counter::kNcandidates,stat,a_track); - bool reject = false; - // only fitted tracks get hole search, input is not fitted - TrackScore score = m_scoringTool->score( *a_track, true); - DEBUG_CODE( setBarcodeStats(a_track,score) ); - // veto tracks with score 0 - if (score==0) { - ATH_MSG_DEBUG ("Candidate score is zero, reject it"); - // statistic - increment_by_eta(Counter::kNcandScoreZero,stat,a_track); - reject = true; - DEBUG_CODE(fillBadTrack(a_track,prd_to_track_map) ); - } else { - ATH_MSG_DEBUG ("Track Score is "<< score); - // double track rejection - if (m_dropDouble) { - std::vector<const Trk::PrepRawData*> prds = m_assoTool->getPrdsOnTrack(prd_to_track_map, *a_track); - // unfortunately PrepRawDataSet is not a set ! - PrdSignature prdSig; - prdSig.insert( prds.begin(),prds.end() ); - // we try to insert it into the set, if we fail (pair.second), it then exits already - if ( !(prdSigSet.insert(prdSig)).second ) { - ATH_MSG_DEBUG ("Double track, reject it !"); - // statistic - increment_by_eta(Counter::kNcandDouble,stat,a_track); - reject = true; - DEBUG_CODE(fillDuplicateTrack(a_track) ); - } else { - ATH_MSG_DEBUG ("Insert new track in PrdSignatureSet"); - } + + for(const Track *pTrack : tracks) { + ATH_MSG_DEBUG ("Processing track candidate "<<pTrack); + // statistics + stat.incrementCounterByRegion(ECounter::kNcandidates,pTrack); + bool reject = false; + // only fitted tracks get hole search, input is not fitted + TrackScore score = m_scoringTool->score( *pTrack, true); + // veto tracks with score 0 + if (score==0) { + ATH_MSG_DEBUG ("Candidate score is zero, reject it"); + // statistic + stat.incrementCounterByRegion(ECounter::kNcandScoreZero,pTrack); + reject = true; + } else { + + ATH_MSG_DEBUG ("Track Score is "<< score); + + // double track rejection + if (m_dropDouble) { + std::vector<const Trk::PrepRawData*> prds = m_assoTool->getPrdsOnTrack(prdToTrackMap, *pTrack); + + // unfortunately PrepRawDataSet is not a set ! + PrdSignature prdSig; + prdSig.insert( prds.begin(),prds.end() ); + + // we try to insert it into the set, if we fail (pair.second), it then exits already + if ( !(prdSigSet.insert(prdSig)).second ) { + ATH_MSG_DEBUG ("Double track, reject it !"); + // statistic + stat.incrementCounterByRegion(ECounter::kNcandDouble,pTrack); + reject = true; + } else { + ATH_MSG_DEBUG ("Insert new track in PrdSignatureSet"); + } + } + } + + if (!reject) { + // add track to map, map is sorted small to big ! set if fitted + ATH_MSG_VERBOSE ("Track ("<< pTrack <<") has score "<<score); + TrackPtr ptr(pTrack); + if (!m_forceRefit) ptr.forceFitted(); + trackScoreTrackMap.insert( make_pair(-score,std::move(ptr)) ); } } - if (!reject) { - // add track to map, map is sorted small to big ! set if fitted - ATH_MSG_VERBOSE ("Track ("<< a_track <<") has score "<<score); - TrackPtr ptr(a_track); - if (!m_forceRefit) ptr.forceFitted(); - trackScoreTrackMap.insert( make_pair(-score,std::move(ptr)) ); - } - } + ATH_MSG_DEBUG ("Number of tracks in map:"<<trackScoreTrackMap.size()); - DEBUG_CODE( countTrueTracksInMap( trackScoreTrackMap ) ); } //================================================================================================== @@ -345,9 +272,9 @@ void Trk::SimpleAmbiguityProcessorTool::addNewTracks(const std::vector<const Tra void Trk::SimpleAmbiguityProcessorTool::addTrack(Trk::Track* in_track, const bool fitted, TrackScoreMap &trackScoreTrackMap, - Trk::PRDtoTrackMap &prd_to_track_map, - std::vector<std::unique_ptr<const Trk::Track> >& cleanup_tracks, - Trk::SimpleAmbiguityProcessorTool::Counter &stat) const + Trk::PRDtoTrackMap &prdToTrackMap, + std::vector<std::unique_ptr<const Trk::Track> >& cleanupTracks, + Counter &stat) const { using namespace std; std::unique_ptr<Trk::Track> atrack(in_track); @@ -356,79 +283,96 @@ void Trk::SimpleAmbiguityProcessorTool::addTrack(Trk::Track* in_track, bool suppressHoleSearch = fitted ? m_suppressHoleSearch : true; if (m_trackSummaryTool.isEnabled()) { m_trackSummaryTool->computeAndReplaceTrackSummary(*atrack, - &prd_to_track_map, + &prdToTrackMap, suppressHoleSearch); } score = m_scoringTool->score( *atrack, suppressHoleSearch ); // do we accept the track ? - if (score!=0){ - ATH_MSG_DEBUG ("Track ("<< atrack.get() <<") has score "<<score); - // statistic - increment_by_eta(Counter::kNscoreOk,stat,atrack.get()); - // add track to map, map is sorted small to big ! - trackScoreTrackMap.insert( make_pair(-score, TrackPtr(atrack.release(), fitted)) ); - return; - } - //track score is zero here... - // do we try to recover the track ? - if (fitted && m_tryBremFit && - !atrack->info().trackProperties(Trk::TrackInfo::BremFit) && - atrack->trackParameters()->front()->pT() > m_pTminBrem && - (!m_caloSeededBrem || atrack->info().patternRecoInfo(Trk::TrackInfo::TrackInCaloROI))){ - ATH_MSG_DEBUG ("Track score is zero, try to recover it via brem fit"); - // run track fit using electron hypothesis - std::unique_ptr<Trk::Track> bremTrack( m_fitterTool->fit(*atrack,true,Trk::electron) ); - if (!bremTrack){ - ATH_MSG_DEBUG ("Brem refit failed, drop track"); + if (score!=0) + { + ATH_MSG_DEBUG ("Track ("<< atrack.get() <<") has score "<<score); // statistic - increment_by_eta(Counter::kNscoreZeroBremRefitFailed,stat,atrack.get()); - increment_by_eta(Counter::kNfailedFits,stat,atrack.get()); - // clean up - cleanup_tracks.push_back(std::move(atrack)); - } else { + stat.incrementCounterByRegion(ECounter::kNscoreOk,atrack.get()); + + // add track to map, map is sorted small to big ! + trackScoreTrackMap.insert( make_pair(-score, TrackPtr(atrack.release(), fitted)) ); + + return; + } + + // do we try to recover the track ? + if (score==0 && fitted && m_tryBremFit && + !atrack->info().trackProperties(Trk::TrackInfo::BremFit) && + atrack->trackParameters()->front()->pT() > m_pTminBrem && + (!m_caloSeededBrem || atrack->info().patternRecoInfo(Trk::TrackInfo::TrackInCaloROI))) + { + + ATH_MSG_DEBUG ("Track score is zero, try to recover it via brem fit"); + + // run track fit using electron hypothesis + std::unique_ptr<Trk::Track> bremTrack( m_fitterTool->fit(*atrack,true,Trk::electron) ); + + if (!bremTrack) + { + ATH_MSG_DEBUG ("Brem refit failed, drop track"); + // statistic + stat.incrementCounterByRegion(ECounter::kNscoreZeroBremRefitFailed,atrack.get()); + stat.incrementCounterByRegion(ECounter::kNfailedFits,atrack.get()); + + // clean up + cleanupTracks.push_back(std::move(atrack)); + + } + else + { + // statistic - increment_by_eta(Counter::kNgoodFits,stat,bremTrack.get()); + stat.incrementCounterByRegion(ECounter::kNgoodFits,bremTrack.get()); + // rerun score score = m_scoringTool->score( *bremTrack, suppressHoleSearch ); + // do we accept the track ? - if (score!=0){ - ATH_MSG_DEBUG ("Brem refit successful, recovered track ("<< atrack.get() <<") has score "<<score); + if (score!=0) + { + ATH_MSG_DEBUG ("Brem refit successful, recovered track ("<< atrack.get() <<") has score "<<score); // statistics - increment_by_eta(Counter::kNscoreZeroBremRefit,stat,bremTrack.get()); + stat.incrementCounterByRegion(ECounter::kNscoreZeroBremRefit,bremTrack.get()); + // add track to map, map is sorted small to big ! trackScoreTrackMap.insert( make_pair(-score, TrackPtr(bremTrack.release(), fitted)) ); return; - } + } + else + { ATH_MSG_DEBUG ("Brem refit gave still track score zero, reject it"); // statistic - increment_by_eta(Counter::kNscoreZeroBremRefitScoreZero,stat,bremTrack.get()); - - cleanup_tracks.push_back(std::move(atrack)); - } - } else { - ATH_MSG_DEBUG ("Track score is zero, reject it"); - // statistic - increment_by_eta(Counter::kNscoreZero,stat,atrack.get()); - DEBUG_CODE( rejectedTrack(atrack.get(), prd_to_track_map) ); - cleanup_tracks.push_back(std::move(atrack)); + stat.incrementCounterByRegion(ECounter::kNscoreZeroBremRefitScoreZero,bremTrack.get()); + + } + cleanupTracks.push_back(std::move(atrack)); + } + } + else + { + ATH_MSG_DEBUG ("Track score is zero, reject it"); + // statistic + stat.incrementCounterByRegion(ECounter::kNscoreZero,atrack.get()); + + cleanupTracks.push_back(std::move(atrack)); + } } -} //================================================================================================== TrackCollection *Trk::SimpleAmbiguityProcessorTool::solveTracks(TrackScoreMap& trackScoreTrackMap, - Trk::PRDtoTrackMap &prd_to_track_map, - std::vector<std::unique_ptr<const Trk::Track> >& cleanup_tracks, - Trk::SimpleAmbiguityProcessorTool::Counter &stat) const + Trk::PRDtoTrackMap &prdToTrackMap, + std::vector<std::unique_ptr<const Trk::Track> >& cleanupTracks, + Counter &stat) const { - std::unique_ptr<TrackCollection> final_tracks(std::make_unique<TrackCollection>()); - using namespace std; - - DEBUG_CODE( fitStatReset() ); - + std::unique_ptr<TrackCollection> finalTracks(std::make_unique<TrackCollection>()); ATH_MSG_DEBUG ("Starting to solve tracks"); - // now loop as long as map is not empty while ( !trackScoreTrackMap.empty() ) { @@ -441,93 +385,75 @@ TrackCollection *Trk::SimpleAmbiguityProcessorTool::solveTracks(TrackScoreMap& t // clean it out to make sure not to many shared hits ATH_MSG_VERBOSE ("--- Trying next track "<<atrack.track()<<"\t with score "<<-ascore); std::unique_ptr<Trk::Track> cleanedTrack; - auto [cleanedTrack_tmp,keep_orig] = m_selectionTool->getCleanedOutTrack( atrack.track() , -(ascore), prd_to_track_map); + auto [cleanedTrack_tmp,keep_orig] = m_selectionTool->getCleanedOutTrack( atrack.track() , -(ascore), prdToTrackMap); cleanedTrack.reset( cleanedTrack_tmp); // cleaned track is input track and fitted if (keep_orig && atrack.fitted() ) { - DEBUG_CODE( keepFittedInputTrack(atrack.track(), ascore) ); // track can be kept as is and is already fitted ATH_MSG_DEBUG ("Accepted track "<<atrack.track()<<"\t has score "<<-(ascore)); // statistic - increment_by_eta(Counter::kNaccepted,stat,atrack.track()); + stat.incrementCounterByRegion(ECounter::kNaccepted,atrack.track()); if (m_tryBremFit && atrack->info().trackProperties(Trk::TrackInfo::BremFit)) - increment_by_eta(Counter::kNacceptedBrem,stat,atrack.track()); + stat.incrementCounterByRegion(ECounter::kNacceptedBrem,atrack.track()); // add track to PRD_AssociationTool - StatusCode sc = m_assoTool->addPRDs(prd_to_track_map, *atrack.track()); + StatusCode sc = m_assoTool->addPRDs(prdToTrackMap, *atrack.track()); if (sc.isFailure()) msg(MSG::ERROR) << "addPRDs() failed" << endmsg; // add to output list - - DEBUG_CODE( acceptedTrack(atrack.track()) ); - - final_tracks->push_back( const_cast<Track*>(atrack.release()) ); - - } - else if ( keep_orig ) - { - - DEBUG_CODE( memoriseOutliers(itnext->second.frst) ); - + finalTracks->push_back( const_cast<Track*>(atrack.release()) ); + } else if ( keep_orig ) { // don't forget to drop track from map // track can be kept as is, but is not yet fitted ATH_MSG_DEBUG ("Good track, but need to fit this track first, score, add it into map again and retry !"); - refitTrack(atrack.track(),trackScoreTrackMap, prd_to_track_map, cleanup_tracks, stat); + refitTrack(atrack.track(),trackScoreTrackMap, prdToTrackMap, cleanupTracks, stat); if (atrack.newTrack()) { - cleanup_tracks.push_back( std::unique_ptr<Trk::Track>(atrack.release()) ); + cleanupTracks.push_back( std::unique_ptr<Trk::Track>(atrack.release()) ); } // delete original copy } else if ( cleanedTrack ) { - - DEBUG_CODE(newCleanedTrack(cleanedTrack.get(), atrack.track()) ); - // now delete original track if (atrack.newTrack()) { - cleanup_tracks.push_back( std::unique_ptr<Trk::Track>(atrack.release())); + cleanupTracks.push_back( std::unique_ptr<Trk::Track>(atrack.release())); } // don't forget to drop track from map // stripped down version should be reconsidered ATH_MSG_DEBUG ("Candidate excluded, add subtrack to map. Track "<<cleanedTrack.get()); // statistic - increment_by_eta(Counter::kNsubTrack,stat,cleanedTrack.get()); + stat.incrementCounterByRegion(ECounter::kNsubTrack,cleanedTrack.get()); // track needs fitting ! - addTrack( cleanedTrack.release(), false, trackScoreTrackMap, prd_to_track_map, cleanup_tracks, stat); + addTrack( cleanedTrack.release(), false, trackScoreTrackMap, prdToTrackMap, cleanupTracks, stat); - } - else - { - - DEBUG_CODE( acceptedTrack(atrack.track())); + } else { // track should be discarded ATH_MSG_DEBUG ("Track "<< atrack.track() << " is excluded, no subtrack, reject"); // statistic - increment_by_eta(Counter::kNnoSubTrack,stat,atrack.track()); - if (atrack.newTrack()) { - cleanup_tracks.push_back( std::unique_ptr<Trk::Track>(atrack.release()) ); - } + stat.incrementCounterByRegion(ECounter::kNnoSubTrack,atrack.track()); + + if (atrack.newTrack()) { + cleanupTracks.push_back( std::unique_ptr<Trk::Track>(atrack.release()) ); + } // don't forget to drop track from map } } - - ATH_MSG_DEBUG ("Finished, number of track on output: "<<final_tracks->size()); - DEBUG_CODE( eventSummary(final_tracks) ); - return final_tracks.release(); + ATH_MSG_DEBUG ("Finished, number of track on output: "<<finalTracks->size()); + return finalTracks.release(); } //================================================================================================== void Trk::SimpleAmbiguityProcessorTool::refitTrack( const Trk::Track* track, TrackScoreMap& trackScoreTrackMap, - Trk::PRDtoTrackMap &prd_to_track_map, - std::vector<std::unique_ptr<const Trk::Track> >& cleanup_tracks, - Trk::SimpleAmbiguityProcessorTool::Counter &stat) const + Trk::PRDtoTrackMap &prdToTrackMap, + std::vector<std::unique_ptr<const Trk::Track> >& cleanupTracks, + Counter &stat) const { using namespace std; std::unique_ptr<Trk::Track> newTrack; @@ -536,7 +462,7 @@ void Trk::SimpleAmbiguityProcessorTool::refitTrack( const Trk::Track* track, { // simple case, fit PRD directly ATH_MSG_VERBOSE ("Refit track "<<track<<" from PRDs"); - newTrack.reset( refitPrds (track, prd_to_track_map,stat) ); + newTrack.reset( refitPrds (track, prdToTrackMap,stat) ); } else { @@ -578,12 +504,9 @@ void Trk::SimpleAmbiguityProcessorTool::refitTrack( const Trk::Track* track, if (newTrack) { ATH_MSG_DEBUG ("New track successfully fitted"<<newTrack.get()); - DEBUG_CODE( newCleanedTrack( newTrack.get(), atrack.get()) ); - - addTrack( newTrack.release(), true, trackScoreTrackMap, prd_to_track_map, cleanup_tracks, stat); + addTrack( newTrack.release(), true, trackScoreTrackMap, prdToTrackMap, cleanupTracks, stat); } else { - DEBUG_CODE( fillFailedFit(track, prd_to_track_map) ); ATH_MSG_DEBUG ("Fit failed !"); } @@ -592,12 +515,12 @@ void Trk::SimpleAmbiguityProcessorTool::refitTrack( const Trk::Track* track, //================================================================================================== Trk::Track* Trk::SimpleAmbiguityProcessorTool::refitPrds( const Trk::Track* track, - Trk::PRDtoTrackMap &prd_to_track_map, - Trk::SimpleAmbiguityProcessorTool::Counter &stat) const + Trk::PRDtoTrackMap &prdToTrackMap, + Counter &stat) const { // get vector of PRDs - std::vector<const Trk::PrepRawData*> prds = m_assoTool->getPrdsOnTrack(prd_to_track_map,*track); + std::vector<const Trk::PrepRawData*> prds = m_assoTool->getPrdsOnTrack(prdToTrackMap,*track); if ( prds.empty() ) { msg(MSG::WARNING) << "No PRDs on track"<<endmsg; @@ -622,7 +545,7 @@ Trk::Track* Trk::SimpleAmbiguityProcessorTool::refitPrds( const Trk::Track* trac if (m_tryBremFit && track->info().trackProperties(Trk::TrackInfo::BremFit)) { // statistics - increment_by_eta(Counter::kNbremFits,stat,track); + stat.incrementCounterByRegion(ECounter::kNbremFits,track); ATH_MSG_VERBOSE ("Brem track, refit with electron brem fit"); newTrack = m_fitterTool->fit(prds, *par, true, Trk::electron); @@ -631,7 +554,7 @@ Trk::Track* Trk::SimpleAmbiguityProcessorTool::refitPrds( const Trk::Track* trac else { // statistics - increment_by_eta(Counter::kNfits,stat,track); + stat.incrementCounterByRegion(ECounter::kNfits,track); ATH_MSG_VERBOSE ("Normal track, refit"); newTrack = m_fitterTool->fit(prds, *par, true, m_particleHypothesis); @@ -640,7 +563,7 @@ Trk::Track* Trk::SimpleAmbiguityProcessorTool::refitPrds( const Trk::Track* trac (!m_caloSeededBrem || track->info().patternRecoInfo(Trk::TrackInfo::TrackInCaloROI))) { // statistics - increment_by_eta(Counter::kNrecoveryBremFits,stat,track); + stat.incrementCounterByRegion(ECounter::kNrecoveryBremFits,track); ATH_MSG_VERBOSE ("Normal fit failed, try brem recovery"); newTrack = m_fitterTool->fit(prds, *par, true, Trk::electron); @@ -650,7 +573,7 @@ Trk::Track* Trk::SimpleAmbiguityProcessorTool::refitPrds( const Trk::Track* trac if(newTrack) { // statistic - increment_by_eta(Counter::kNgoodFits,stat,newTrack); + stat.incrementCounterByRegion(ECounter::kNgoodFits,newTrack); //keeping the track of previously accumulated TrackInfo const Trk::TrackInfo& old_info = track->info(); @@ -659,7 +582,7 @@ Trk::Track* Trk::SimpleAmbiguityProcessorTool::refitPrds( const Trk::Track* trac else { // statistic - increment_by_eta(Counter::kNfailedFits,stat,track); + stat.incrementCounterByRegion(ECounter::kNfailedFits,track); } return newTrack; } @@ -667,7 +590,7 @@ Trk::Track* Trk::SimpleAmbiguityProcessorTool::refitPrds( const Trk::Track* trac //================================================================================================== Trk::Track* Trk::SimpleAmbiguityProcessorTool::refitRots( const Trk::Track* track, - Trk::SimpleAmbiguityProcessorTool::Counter &stat) const + Counter &stat) const { ATH_MSG_VERBOSE ("Refit track "<<track); @@ -679,7 +602,7 @@ Trk::Track* Trk::SimpleAmbiguityProcessorTool::refitRots( const Trk::Track* trac track->info().trackProperties(Trk::TrackInfo::BremFit)) { // statistics - increment_by_eta(Counter::kNbremFits,stat,track); + stat.incrementCounterByRegion(ECounter::kNbremFits,track); ATH_MSG_VERBOSE ("Brem track, refit with electron brem fit"); newTrack = m_fitterTool->fit(*track, true, Trk::electron); @@ -687,7 +610,7 @@ Trk::Track* Trk::SimpleAmbiguityProcessorTool::refitRots( const Trk::Track* trac else { // statistics - increment_by_eta(Counter::kNfits,stat,track); + stat.incrementCounterByRegion(ECounter::kNfits,track); ATH_MSG_VERBOSE ("Normal track, refit"); newTrack = m_fitterTool->fit(*track, true, m_particleHypothesis); @@ -697,7 +620,7 @@ Trk::Track* Trk::SimpleAmbiguityProcessorTool::refitRots( const Trk::Track* trac (!m_caloSeededBrem || track->info().patternRecoInfo(Trk::TrackInfo::TrackInCaloROI))) { // statistics - increment_by_eta(Counter::kNrecoveryBremFits,stat,track); + stat.incrementCounterByRegion(ECounter::kNrecoveryBremFits,track); ATH_MSG_VERBOSE ("Normal fit failed, try brem recovery"); newTrack = m_fitterTool->fit(*track, true, Trk::electron); @@ -707,7 +630,7 @@ Trk::Track* Trk::SimpleAmbiguityProcessorTool::refitRots( const Trk::Track* trac if(newTrack) { // statistic - increment_by_eta(Counter::kNgoodFits,stat,newTrack); + stat.incrementCounterByRegion(ECounter::kNgoodFits,newTrack); //keeping the track of previously accumulated TrackInfo const Trk::TrackInfo& old_info = track->info(); @@ -716,7 +639,7 @@ Trk::Track* Trk::SimpleAmbiguityProcessorTool::refitRots( const Trk::Track* trac else { // statistic - increment_by_eta(Counter::kNfailedFits,stat,track); + stat.incrementCounterByRegion(ECounter::kNfailedFits,track); } return newTrack; } @@ -731,14 +654,71 @@ void Trk::SimpleAmbiguityProcessorTool::dumpTracks( const TrackCollection& track TrackScore totalScore = 0; TrackCollection::const_iterator it = tracks.begin(); TrackCollection::const_iterator itEnd = tracks.end(); - for (; it != itEnd ; ++it) - { + for (; it != itEnd ; ++it){ // score track: const TrackScore score = m_scoringTool->score( **it, m_suppressHoleSearch ); ATH_MSG_VERBOSE (num++<<"\tTrack :"<<*it<<"\tScore: "<<score); totalScore+=score; } ATH_MSG_DEBUG ("Total event score : "<<totalScore); + + +} + +void +Trk::SimpleAmbiguityProcessorTool::dumpStat(MsgStream &out) const { + auto parseFileName=[](const std::string & fullname){ + auto dotPosition = fullname.rfind("."); + auto slashPosition = fullname.rfind("/"); + auto stringLength = dotPosition - slashPosition; + return fullname.substr(slashPosition, stringLength); + }; + // @TODO restore ios + std::streamsize ss = std::cout.precision(); + out << "Output from "; + out << parseFileName(__FILE__); + out << "::"; + out << __func__; + out << "\n"; + out << "---------------------------------------------------------------------------------" << "\n"; + out << " Number of events processed : "<< m_stat.numberOfEvents() << "\n"; + out << " statistics by eta range ------All---Barrel---Trans.--- Endcap---DBM---" << "\n"; + out << "---------------------------------------------------------------------------------" << "\n"; + out << m_stat.dumpRegions( " Number of candidates at input :", ECounter::kNcandidates); + out << m_stat.dumpRegions( " - candidates rejected score 0 :", ECounter::kNcandScoreZero); + out << m_stat.dumpRegions( " - candidates rejected as double :", ECounter::kNcandDouble); + out << "---------------------------------------------------------------------------------" << "\n"; + out << m_stat.dumpRegions( " candidates with good score :", ECounter::kNscoreOk); + if (m_tryBremFit) { + out << m_stat.dumpRegions(" + recovered after brem refit :", ECounter::kNscoreZeroBremRefit); + } + out << m_stat.dumpRegions( " candidates rejected score 0 :", ECounter::kNscoreZero); + if (m_tryBremFit) { + out << m_stat.dumpRegions(" + rejected failed brem refit :", ECounter::kNscoreZeroBremRefitFailed); + } + out << "---------------------------------------------------------------------------------" << "\n"; + out << m_stat.dumpRegions( " number of normal fits :", ECounter::kNfits); + if (m_tryBremFit) { + out << m_stat.dumpRegions(" + 2nd brem fit for failed fit :", ECounter::kNrecoveryBremFits); + out << m_stat.dumpRegions(" normal brem fits for electrons :", ECounter::kNbremFits); + } + out << "---------------------------------------------------------------------------------" << "\n"; + out << m_stat.dumpRegions( " sum of succesful fits :", ECounter::kNgoodFits); + out << m_stat.dumpRegions( " sum of failed fits :", ECounter::kNfailedFits); + out << "---------------------------------------------------------------------------------" << "\n"; + out << m_stat.dumpRegions( " Number of subtracks created :", ECounter::kNsubTrack); + out << m_stat.dumpRegions( " Number of candidates excluded :", ECounter::kNnoSubTrack); + out << "---------------------------------------------------------------------------------" << "\n"; + out << m_stat.dumpRegions( " Number of tracks accepted :", ECounter::kNaccepted); + if (m_tryBremFit) { + out << m_stat.dumpRegions(" including number of brem fits :", ECounter::kNacceptedBrem); + } + out << "---------------------------------------------------------------------------------" << "\n"; + out << std::setiosflags(std::ios::fixed | std::ios::showpoint) << std::setprecision(2) + << " definition: ( 0.0 < Barrel < " << m_etabounds[Counter::iBarrel-1] << " < Transition < " << m_etabounds[Counter::iTransi-1] + << " < Endcap < " << m_etabounds[Counter::iEndcap-1] << " DBM )" << "\n"; + out << "-------------------------------------------------------------------------------" << "\n"; + out.precision (ss); } diff --git a/Tracking/TrkTools/TrkAmbiguityProcessor/src/SimpleAmbiguityProcessorTool.h b/Tracking/TrkTools/TrkAmbiguityProcessor/src/SimpleAmbiguityProcessorTool.h index deeaa910ead8a4963c6e2786eeca05777f6c8db8..1f7b0f441b4671abc6b27c376f8f5d80d1bb7960 100644 --- a/Tracking/TrkTools/TrkAmbiguityProcessor/src/SimpleAmbiguityProcessorTool.h +++ b/Tracking/TrkTools/TrkAmbiguityProcessor/src/SimpleAmbiguityProcessorTool.h @@ -5,8 +5,6 @@ #ifndef SIMPLEAMBIGUITYPROCESSORTOOL_H #define SIMPLEAMBIGUITYPROCESSORTOOL_H -// turn on debugging ? uncomment this -//#define SIMPLEAMBIGPROCDEBUGCODE #include "AthenaBaseComps/AthAlgTool.h" #include "TrkToolInterfaces/ITrackAmbiguityProcessorTool.h" @@ -25,20 +23,11 @@ #include <set> #include <vector> -#include <functional> -#include <atomic> #include <mutex> -#include <algorithm> #include <array> +#include "AmbiCounter.icc" #include "TrackPtr.h" - -#if defined SIMPLEAMBIGPROCNTUPLECODE || defined SIMPLEAMBIGPROCDEBUGCODE -#define DEBUG_CODE(a) do { a; } while (false) -#else -#define DEBUG_CODE(a) do { } while (false) -#endif - class AtlasDetectorID; class PixelID; @@ -50,8 +39,12 @@ namespace Trk { class SimpleAmbiguityProcessorTool : public AthAlgTool, virtual public ITrackAmbiguityProcessorTool { - struct Counter; public: + enum class ECounter {kNcandidates, kNcandScoreZero, kNcandDouble, + kNscoreOk,kNscoreZeroBremRefit,kNscoreZeroBremRefitFailed,kNscoreZeroBremRefitScoreZero,kNscoreZero, + kNaccepted,kNsubTrack,kNnoSubTrack,kNacceptedBrem, + kNbremFits,kNfits,kNrecoveryBremFits,kNgoodFits,kNfailedFits, kNCounter}; + using Counter = AmbiCounter<ECounter>; // public types typedef std::multimap< TrackScore, TrackPtr > TrackScoreMap; @@ -68,20 +61,20 @@ namespace Trk { @param tracks collection of tracks which will have ambiguities resolved. Will not be modified. The tracks will be refitted if no fitQuality is given at input. - @param prd_to_track_map on optional prd-to-track map being filled by the processor. + @param prdToTrackMap on optional prd-to-track map being filled by the processor. @return new collections of tracks, with ambiguities resolved. Ownership is passed on (i.e. client handles deletion). If no prd-to-track map is given the processor will create one internally (exported to storegate).*/ - virtual TrackCollection* process(const TrackCollection*, Trk::PRDtoTrackMap *prd_to_track_map) const override; + virtual TrackCollection* process(const TrackCollection*, Trk::PRDtoTrackMap *prdToTrackMap) const override; virtual TrackCollection* process(const TracksScores* scoredTracks) const override; /** statistics output to be called by algorithm during finalize. */ virtual void statistics() override; private: - TrackCollection* process_vector(std::vector<const Track*> &tracks, Trk::PRDtoTrackMap *prd_to_track_map) const; + TrackCollection* process_vector(std::vector<const Track*> &tracks, Trk::PRDtoTrackMap *prdToTrackMap) const; /**Add passed TrackCollection, and Trk::PrepRawData from tracks to caches @param tracks the TrackCollection is looped over, @@ -89,19 +82,19 @@ namespace Trk { The Trk::PrepRawData from each Trk::Track are added to the IPRD_AssociationTool*/ void addNewTracks(const std::vector<const Track*> &tracks, TrackScoreMap& trackScoreTrackMap, - Trk::PRDtoTrackMap &prd_to_track_map, - Trk::SimpleAmbiguityProcessorTool::Counter &stat) const; + Trk::PRDtoTrackMap &prdToTrackMap, + Counter &stat) const; void addTrack(Track* track, const bool fitted, TrackScoreMap &trackScoreMap, - Trk::PRDtoTrackMap &prd_to_track_map, - std::vector<std::unique_ptr<const Trk::Track> >& cleanup_tracks, - Trk::SimpleAmbiguityProcessorTool::Counter &stat) const; + Trk::PRDtoTrackMap &prdToTrackMap, + std::vector<std::unique_ptr<const Trk::Track> >& cleanupTracks, + Counter &stat) const; TrackCollection *solveTracks(TrackScoreMap &trackScoreTrackMap, - Trk::PRDtoTrackMap &prd_to_track_map, - std::vector<std::unique_ptr<const Trk::Track> > &cleanup_tracks, - Trk::SimpleAmbiguityProcessorTool::Counter &stat) const; + Trk::PRDtoTrackMap &prdToTrackMap, + std::vector<std::unique_ptr<const Trk::Track> > &cleanupTracks, + Counter &stat) const; /** add subtrack to map */ void addSubTrack( const std::vector<const TrackStateOnSurface*>& tsos) const; @@ -109,17 +102,17 @@ namespace Trk { /** refit track */ void refitTrack( const Trk::Track* track, TrackScoreMap &trackScoreMap, - Trk::PRDtoTrackMap &prd_to_track_map, - std::vector<std::unique_ptr<const Trk::Track> >& cleanup_tracks, - Trk::SimpleAmbiguityProcessorTool::Counter &stat) const; + Trk::PRDtoTrackMap &prdToTrackMap, + std::vector<std::unique_ptr<const Trk::Track> >& cleanupTracks, + Counter &stat) const; /** refit PRDs */ - Track* refitPrds( const Track* track, Trk::PRDtoTrackMap &prd_to_track_map, - Trk::SimpleAmbiguityProcessorTool::Counter &stat) const; + Track* refitPrds( const Track* track, Trk::PRDtoTrackMap &prdToTrackMap, + Counter &stat) const; /** refit ROTs corresponding to PRDs */ Track* refitRots( const Track* track, - Trk::SimpleAmbiguityProcessorTool::Counter &stat) const; + Counter &stat) const; /** print out tracks and their scores for debugging*/ void dumpTracks(const TrackCollection& tracks) const; @@ -155,13 +148,13 @@ namespace Trk { Trk::ParticleHypothesis m_particleHypothesis; /**Scoring tool - This tool is used to 'score' the tracks, i.e. to quantify what a good track is. - @todo The actual tool that is used should be configured through job options*/ + This tool is used to 'score' the tracks, i.e. to quantify what a good track is. + @todo The actual tool that is used should be configured through job options*/ ToolHandle<ITrackScoringTool> m_scoringTool; /** refitting tool - used to refit tracks once shared hits are removed. - Refitting tool used is configured via jobOptions.*/ + Refitting tool used is configured via jobOptions.*/ ToolHandle<ITrackFitter> m_fitterTool; ToolHandle<Trk::IPRDtoTrackMapTool> m_assoTool @@ -171,134 +164,17 @@ namespace Trk { {this, "TrackSummaryTool", "InDetTrackSummaryToolNoHoleSearch"}; /** selection tool - here the decision which hits remain on a track and - which are removed are made + which are removed are made */ ToolHandle<IAmbiTrackSelectionTool> m_selectionTool; /** monitoring statistics */ - enum StatIndex {iAll = 0, iBarrel = 1, iTransi = 2, iEndcap = 3, iDBM = 4, kNRegions=5}; + //enum RegionIndex {iAll = 0, iBarrel = 1, iTransi = 2, iEndcap = 3, iDBM = 4, nRegions=5}; std::vector<float> m_etabounds; //!< eta intervals for internal monitoring - struct Counter { - enum ECounter {kNcandidates, kNcandScoreZero, kNcandDouble, - kNscoreOk,kNscoreZeroBremRefit,kNscoreZeroBremRefitFailed,kNscoreZeroBremRefitScoreZero,kNscoreZero, - kNaccepted,kNsubTrack,kNnoSubTrack,kNacceptedBrem, - kNbremFits,kNfits,kNrecoveryBremFits,kNgoodFits,kNfailedFits, kNCounter}; - Counter() {init(); } - void init() { - for (unsigned int stat_i=0; stat_i < kNCounter; ++stat_i) { - std::fill(m_counter[stat_i].begin(),m_counter[stat_i].end(),0); - } - } - void increment(ECounter stat_i, unsigned int eta_bin_i) { - if (eta_bin_i>=kNRegions) return; - if (stat_i<kNCounter && eta_bin_i < m_counter[stat_i].size()) {} else { throw std::range_error("out of range"); } - ++m_counter[stat_i][eta_bin_i]; - } - void operator +=(const Counter &a) { - for (unsigned int stat_i=0; stat_i < kNCounter; ++stat_i) { - for (unsigned int eta_bin_i=0; eta_bin_i < a.m_counter[stat_i].size(); ++eta_bin_i) { - m_counter[stat_i][eta_bin_i] += a.m_counter[stat_i][eta_bin_i]; - } - } - } - - std::array<int,SimpleAmbiguityProcessorTool::kNRegions> m_counter[kNCounter]; - }; - mutable std::atomic<int> m_Nevents; mutable std::mutex m_statMutex; - mutable Counter m_stat; - /** internal monitoring: categories for counting different types of extension results*/ - - /** helper for monitoring and validation: does success/failure counting */ - void increment_by_eta(SimpleAmbiguityProcessorTool::Counter::ECounter counter, - SimpleAmbiguityProcessorTool::Counter &stat, - const Track*, - bool update_all=true) const; - - SimpleAmbiguityProcessorTool::StatIndex etaIndex(double eta) const; - void missingTrackOrParameters(const Track* track) const; - - void dumpRegions(MsgStream &out, - const char *head, - SimpleAmbiguityProcessorTool::Counter::ECounter stat_i) const; - -//================================================================================================== -// -// -// FROM HERE EVERYTHING IS DEBUGGING CODE !!! -// -//================================================================================================== - -#if defined SIMPLEAMBIGPROCNTUPLECODE || defined SIMPLEAMBIGPROCDEBUGCODE - virtual void ntupleReset() {} - virtual void fillEventData(std::vector<const Track*> &tracks) { (void) tracks; }; - virtual void findTrueTracks(std::vector<const Track*> &recTracks) { (void) recTracks; }; - virtual void fillValidationTree(const Trk::Track* track) const { (void) track; } - virtual void resetTrackOutliers() {} - virtual void setBarcodeStats(const Trk::Track *a_track, TrackScore score) { (void) a_track; (void) score;} - virtual void fillBadTrack(const Trk::Track *a_track, const Trk::PRDtoTrackMap &prd_to_track_map) - { (void) a_track; (void) prd_to_track_map; } - - virtual void fillDuplicateTrack(const Trk::Track *a_track) { (void) a_track; } - virtual void associateToOrig(const Trk::Track*new_track, const Trk::Track* orig_track) { (void) new_track; (void) orig_track; } - virtual void keepTrackOfTracks(const Trk::Track* oldTrack, const Trk::Track* newTrack) { (void) oldTrack; (void) newTrack; } - virtual void countTrueTracksInMap(const TrackScoreMap &trackScoreTrackMap) { (void) trackScoreTrackMap; } - virtual void rejectedTrack(const Trk::Track*track, const Trk::PRDtoTrackMap &prd_to_track_map) - { (void) track; (void) prd_to_track_map; } - - virtual void fitStatReset() {} - virtual void keepFittedInputTrack(const Trk::Track *a_track, TrackScore ascore) - { (void) a_track; (void) ascore; } - - virtual void acceptedTrack(const Trk::Track*track) { (void) track; } - virtual void memoriseOutliers(const Trk::Track*track) { (void) track; } - virtual void newCleanedTrack(const Trk::Track*new_track, const Trk::Track* orig_track) { (void) new_track; (void) orig_track; } - virtual void eventSummary(const TrackCollection *final_tracks) override {(void) final_tracks; } - virtual void fillFailedFit(const Trk::Track *a_track, const Trk::PRDtoTrackMap &prd_to_track_map) - { (void) a_track; (void) prd_to_track_map; } - -#endif // DebugCode - }; - - inline - SimpleAmbiguityProcessorTool::StatIndex SimpleAmbiguityProcessorTool::etaIndex(double eta) const { - eta=std::abs(eta); - if (eta < m_etabounds[0]) return Trk::SimpleAmbiguityProcessorTool::iBarrel; - else if (eta < m_etabounds[1]) return Trk::SimpleAmbiguityProcessorTool::iTransi; - else if (eta < m_etabounds[2]) return Trk::SimpleAmbiguityProcessorTool::iEndcap; - else if ((eta > m_etabounds[3]) && (eta < m_etabounds[4])) return Trk::SimpleAmbiguityProcessorTool::iDBM; - return Trk::SimpleAmbiguityProcessorTool::kNRegions; - } - - inline void SimpleAmbiguityProcessorTool::increment_by_eta(SimpleAmbiguityProcessorTool::Counter::ECounter stat_i, - SimpleAmbiguityProcessorTool::Counter &stat, - const Track* track, - bool updateAll) const - { - if (updateAll) stat.increment(stat_i,Trk::SimpleAmbiguityProcessorTool::iAll); - // test - if (track && track->trackParameters() ) { - // @TODO make sure that list of track parameters is not empty - stat.increment(stat_i, etaIndex(track->trackParameters()->front()->eta()) ); - } - else { - missingTrackOrParameters(track); - } - } - - inline - void SimpleAmbiguityProcessorTool::dumpRegions(MsgStream &out, - const char *head, - SimpleAmbiguityProcessorTool::Counter::ECounter stat_i) const { - const int iw=9; - out << head; - for (unsigned int eta_bin_i=0; eta_bin_i < kNRegions; ++eta_bin_i) { - assert( eta_bin_i < m_stat.m_counter[stat_i].size() ); - out << std::setiosflags(std::ios::dec) << std::setw(iw) << m_stat.m_counter[stat_i][eta_bin_i]; - } - out << "\n"; - } + mutable Counter m_stat ATLAS_THREAD_SAFE; + }; } //end ns #endif // TrackAmbiguityProcessorTool_H diff --git a/Tracking/TrkTools/TrkToolInterfaces/TrkToolInterfaces/ITrackSlimmingTool.h b/Tracking/TrkTools/TrkToolInterfaces/TrkToolInterfaces/ITrackSlimmingTool.h index 6a83f57791e3fa45cccb69b486ba4299a978c4b1..e34b42f63e59154ee97fc6739df1de9013b0e5aa 100755 --- a/Tracking/TrkTools/TrkToolInterfaces/TrkToolInterfaces/ITrackSlimmingTool.h +++ b/Tracking/TrkTools/TrkToolInterfaces/TrkToolInterfaces/ITrackSlimmingTool.h @@ -43,6 +43,12 @@ namespace Trk @return A 'slimmed' version of 'track', where exactly what information is copied depends on how the tool is configured */ virtual std::unique_ptr<Trk::Track> slimCopy(const Trk::Track& track) const=0; + + /** + * Slim/skim a non const Track. (m_setPersistificationHints is not used) + * @param track A reference to the track to be skimmed. It will be modified. + */ + virtual void slimTrack(Trk::Track& track) const = 0; }; inline const InterfaceID& Trk::ITrackSlimmingTool::interfaceID() diff --git a/Tracking/TrkTools/TrkTrackSlimmingTool/TrkTrackSlimmingTool/TrackSlimmingTool.h b/Tracking/TrkTools/TrkTrackSlimmingTool/TrkTrackSlimmingTool/TrackSlimmingTool.h index 95e0a09900f3a1afb6e3dccb5837944802e699c0..7c2e2b4671e583b0ecc0df9031f3ba20d91f447c 100755 --- a/Tracking/TrkTools/TrkTrackSlimmingTool/TrkTrackSlimmingTool/TrackSlimmingTool.h +++ b/Tracking/TrkTools/TrkTrackSlimmingTool/TrkTrackSlimmingTool/TrackSlimmingTool.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -62,6 +62,11 @@ namespace Trk */ std::unique_ptr<Trk::Track> slimCopy(const Trk::Track& track) const override final; + /** + * Slim/skim a non const Track. (m_setPersistificationHints is not used) + * @param track A reference to the track to be skimmed. It will be modified. + */ + void slimTrack(Trk::Track& track) const override final; private: /** any CaloDeposit with its adjacent MEOT's will be kept on the slimmed track (combined muon property) */ bool m_keepCaloDeposit; diff --git a/Tracking/TrkTools/TrkTrackSlimmingTool/src/TrackSlimmingTool.cxx b/Tracking/TrkTools/TrkTrackSlimmingTool/src/TrackSlimmingTool.cxx index 0275cb2af7c3f2270608e5278d3238ee3dbe5614..72b92612ef661692cafd57e15c1279afff509832 100755 --- a/Tracking/TrkTools/TrkTrackSlimmingTool/src/TrackSlimmingTool.cxx +++ b/Tracking/TrkTools/TrkTrackSlimmingTool/src/TrackSlimmingTool.cxx @@ -61,7 +61,6 @@ StatusCode Trk::TrackSlimmingTool::initialize() return StatusCode::SUCCESS; } - //================ Finalisation ================================================= StatusCode Trk::TrackSlimmingTool::finalize() { @@ -161,105 +160,135 @@ Trk::Track* Trk::TrackSlimmingTool::slim(const Trk::Track& track) const return nullptr; } -std::unique_ptr<Trk::Track> Trk::TrackSlimmingTool::slimCopy(const Trk::Track& track) const +void +Trk::TrackSlimmingTool::slimTrack(Trk::Track& track) const { - const DataVector<const TrackStateOnSurface>* oldTrackStates = track.trackStateOnSurfaces(); - if (oldTrackStates ==nullptr){ + const DataVector<const TrackStateOnSurface>* oldTrackStates = + track.trackStateOnSurfaces(); + if (oldTrackStates == nullptr) { ATH_MSG_WARNING("Track has no TSOS vector! Skipping track, returning 0."); - return nullptr; } // create vector for new TSOS (the ones which are kept) - DataVector<const TrackStateOnSurface>* trackStates = new DataVector<const TrackStateOnSurface>; - const TrackStateOnSurface* firstValidIDTSOS(nullptr); + DataVector<const TrackStateOnSurface>* trackStates = + new DataVector<const TrackStateOnSurface>; + const TrackStateOnSurface* firstValidIDTSOS(nullptr); const TrackStateOnSurface* lastValidIDTSOS(nullptr); const TrackStateOnSurface* firstValidMSTSOS(nullptr); const TrackStateOnSurface* lastValidMSTSOS(nullptr); - if (m_keepParameters){ + if (m_keepParameters) { // search last valid TSOS first (as won't be found in later loop) - findLastValidTSoS(oldTrackStates, lastValidIDTSOS,lastValidMSTSOS); + findLastValidTSoS(oldTrackStates, lastValidIDTSOS, lastValidMSTSOS); } - // If m_keepParameters is true, then we want to keep the first and last parameters of ID & MS. + // If m_keepParameters is true, then we want to keep the first and last + // parameters of ID & MS. const Trk::MeasurementBase* rot = nullptr; const Trk::TrackParameters* parameters = nullptr; - bool keepParameter=false; - std::bitset<TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> typePattern(0); - - DataVector<const TrackStateOnSurface>::const_iterator itTSoS = oldTrackStates->begin(); - for (; itTSoS!=oldTrackStates->end(); ++itTSoS) - { - parameters=nullptr; - rot=nullptr; - // if requested: keep calorimeter TSOS with adjacent scatterers (on combined muons) - if (m_keepCaloDeposit && (**itTSoS).type(TrackStateOnSurface::CaloDeposit)){ + bool keepParameter = false; + std::bitset<TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> + typePattern(0); + + DataVector<const TrackStateOnSurface>::const_iterator itTSoS = + oldTrackStates->begin(); + for (; itTSoS != oldTrackStates->end(); ++itTSoS) { + parameters = nullptr; + rot = nullptr; + // if requested: keep calorimeter TSOS with adjacent scatterers (on combined + // muons) + if (m_keepCaloDeposit && + (**itTSoS).type(TrackStateOnSurface::CaloDeposit)) { // preceding TSOS (if Scatterer) - if (itTSoS != oldTrackStates->begin()){ + if (itTSoS != oldTrackStates->begin()) { --itTSoS; - if ((**itTSoS).type(TrackStateOnSurface::Scatterer)){ - trackStates->push_back((**itTSoS).clone()); + if ((**itTSoS).type(TrackStateOnSurface::Scatterer)) { + trackStates->push_back((**itTSoS).clone()); } ++itTSoS; } - // copy removes CaloEnergy (just keep base EnergyLoss) - const MaterialEffectsOnTrack* meot = - dynamic_cast<const MaterialEffectsOnTrack*>((**itTSoS).materialEffectsOnTrack()); - if (meot && meot->energyLoss()){ - trackStates->push_back(new TrackStateOnSurface(nullptr, - (**itTSoS).trackParameters()->clone(), - nullptr, - new MaterialEffectsOnTrack(meot->thicknessInX0(), - nullptr, - new EnergyLoss(*meot->energyLoss()), - meot->associatedSurface()), - (**itTSoS).types())); + // copy removes CaloEnergy (just keep base EnergyLoss) + const MaterialEffectsOnTrack* meot = + dynamic_cast<const MaterialEffectsOnTrack*>( + (**itTSoS).materialEffectsOnTrack()); + if (meot && meot->energyLoss()) { + trackStates->push_back(new TrackStateOnSurface( + nullptr, + (**itTSoS).trackParameters()->clone(), + nullptr, + new MaterialEffectsOnTrack(meot->thicknessInX0(), + nullptr, + new EnergyLoss(*meot->energyLoss()), + meot->associatedSurface()), + (**itTSoS).types())); } // following TSOS (if Scatterer) ++itTSoS; - if (itTSoS != oldTrackStates->end() && (**itTSoS).type(TrackStateOnSurface::Scatterer)) - { - trackStates->push_back((**itTSoS).clone()); + if (itTSoS != oldTrackStates->end() && + (**itTSoS).type(TrackStateOnSurface::Scatterer)) { + trackStates->push_back((**itTSoS).clone()); } --itTSoS; } // We only keep TSOS if they either contain a perigee, OR are a measurement - if ((*itTSoS)->measurementOnTrack()==nullptr && !(*itTSoS)->type(TrackStateOnSurface::Perigee)){ + if ((*itTSoS)->measurementOnTrack() == nullptr && + !(*itTSoS)->type(TrackStateOnSurface::Perigee)) { continue; } - typePattern.reset(); - keepParameter=keepParameters((*itTSoS),firstValidIDTSOS, lastValidIDTSOS,firstValidMSTSOS,lastValidMSTSOS); + typePattern.reset(); + keepParameter = keepParameters((*itTSoS), + firstValidIDTSOS, + lastValidIDTSOS, + firstValidMSTSOS, + lastValidMSTSOS); - if (keepParameter) { - parameters=(*itTSoS)->trackParameters()->clone(); // make sure we add a new parameter by cloning - if ((*itTSoS)->type(TrackStateOnSurface::Perigee)) { + if (keepParameter) { + parameters = (*itTSoS) + ->trackParameters() + ->clone(); // make sure we add a new parameter by cloning + if ((*itTSoS)->type(TrackStateOnSurface::Perigee)) { typePattern.set(TrackStateOnSurface::Perigee); } } - - if ( (*itTSoS)->measurementOnTrack()!=nullptr && - ( (*itTSoS)->type(TrackStateOnSurface::Measurement) || ( m_keepOutliers && (*itTSoS)->type(TrackStateOnSurface::Outlier) ) ) ) - { - if ((*itTSoS)->type(TrackStateOnSurface::Measurement)) {typePattern.set(TrackStateOnSurface::Measurement);} - if ((*itTSoS)->type(TrackStateOnSurface::Outlier)) {typePattern.set(TrackStateOnSurface::Outlier);} - rot=(*itTSoS)->measurementOnTrack()->clone(); - } + if ((*itTSoS)->measurementOnTrack() != nullptr && + ((*itTSoS)->type(TrackStateOnSurface::Measurement) || + (m_keepOutliers && (*itTSoS)->type(TrackStateOnSurface::Outlier)))) { + if ((*itTSoS)->type(TrackStateOnSurface::Measurement)) { + typePattern.set(TrackStateOnSurface::Measurement); + } + if ((*itTSoS)->type(TrackStateOnSurface::Outlier)) { + typePattern.set(TrackStateOnSurface::Outlier); + } + rot = (*itTSoS)->measurementOnTrack()->clone(); + } Trk::TrackStateOnSurface* newTSOS = nullptr; - if (rot!=nullptr || parameters!=nullptr) { - newTSOS = new Trk::TrackStateOnSurface(rot, parameters, nullptr, nullptr, typePattern); - trackStates->push_back( newTSOS ); - } - } + if (rot != nullptr || parameters != nullptr) { + newTSOS = new Trk::TrackStateOnSurface( + rot, parameters, nullptr, nullptr, typePattern); + trackStates->push_back(newTSOS); + } + } + track.setTrackStateOnSurfaces(trackStates); + track.info().setTrackProperties(TrackInfo::SlimmedTrack); + //The above resets also the caches. +} - std::unique_ptr<Trk::Track> newTrack = std::make_unique<Trk::Track>(Trk::TrackInfo(track.info()), - trackStates, - track.fitQuality()->clone() - ); - newTrack->info().setTrackProperties(TrackInfo::SlimmedTrack); +std::unique_ptr<Trk::Track> +Trk::TrackSlimmingTool::slimCopy(const Trk::Track& track) const +{ + const DataVector<const TrackStateOnSurface>* oldTrackStates = + track.trackStateOnSurfaces(); + if (oldTrackStates == nullptr) { + ATH_MSG_WARNING("Track has no TSOS vector! Skipping track, returning 0."); + return nullptr; + } + //Make a copy of the input + std::unique_ptr<Trk::Track> newTrack = std::make_unique<Trk::Track>(track); // only attempt to copy the summary if the track has it! if (track.trackSummary()!=nullptr){ newTrack->m_trackSummary = new Trk::TrackSummary(*(track.trackSummary())); } + slimTrack(*newTrack); return newTrack; } diff --git a/Tracking/TrkVertexFitter/TrkV0Fitter/TrkV0Fitter/TrkV0VertexFitter.h b/Tracking/TrkVertexFitter/TrkV0Fitter/TrkV0Fitter/TrkV0VertexFitter.h index 1cfbea79bbd138833ad1da97a9315a779c151043..f9ebea43d60df21e03f3624f0629f3c05ac37cb8 100755 --- a/Tracking/TrkVertexFitter/TrkV0Fitter/TrkV0Fitter/TrkV0VertexFitter.h +++ b/Tracking/TrkVertexFitter/TrkV0Fitter/TrkV0Fitter/TrkV0VertexFitter.h @@ -43,6 +43,8 @@ namespace Trk class TrkV0VertexFitter : public extends<AthAlgTool, IVertexFitter> { public: + // The following 'using' can be removed when IVertexFitter::fit has been fully migrated to the one with the EventContext + using Trk::IVertexFitter::fit; virtual StatusCode initialize() override; virtual StatusCode finalize() override; diff --git a/Tracking/TrkVertexFitter/TrkVKalVrtFitter/TrkVKalVrtFitter/ITrkVKalVrtFitter.h b/Tracking/TrkVertexFitter/TrkVKalVrtFitter/TrkVKalVrtFitter/ITrkVKalVrtFitter.h index ba99128535dc6294d4e3edcb4c095d2f2e0c0e4a..a2cf878f004f989fef872eabaa24fa39445f7f2a 100755 --- a/Tracking/TrkVertexFitter/TrkVKalVrtFitter/TrkVKalVrtFitter/ITrkVKalVrtFitter.h +++ b/Tracking/TrkVertexFitter/TrkVKalVrtFitter/TrkVKalVrtFitter/ITrkVKalVrtFitter.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // ITrkVKalVrtFitter.h - old VKalVrtInterface @@ -17,6 +17,7 @@ // Gaudi includes #include "AthenaBaseComps/AthAlgTool.h" //#include "GaudiKernel/IToolSvc.h" +#include "GaudiKernel/EventContext.h" // #include "TrkVKalVrtFitter/IVKalState.h" #include "TrkTrack/Track.h" @@ -45,7 +46,19 @@ namespace Trk{ //--------------------------------------------------------------------------- //Interface itself - virtual std::unique_ptr<IVKalState> makeState() const = 0; + /* + * Context aware method + */ + virtual std::unique_ptr<IVKalState> makeState(const EventContext& ctx) const = 0; + + /* + * For non-migrated clients whcih should always use the context aware method + */ + virtual std::unique_ptr<IVKalState> makeState() const + { + return makeState(Gaudi::Hive::currentContext()); + } + virtual StatusCode VKalVrtFit(const std::vector<const xAOD::TrackParticle*> & listC, const std::vector<const xAOD::NeutralParticle*> & listN, diff --git a/Tracking/TrkVertexFitter/TrkVKalVrtFitter/TrkVKalVrtFitter/IVKalState.h b/Tracking/TrkVertexFitter/TrkVKalVrtFitter/TrkVKalVrtFitter/IVKalState.h index ccbc3c7fb915394a5f95b22fabecedfc1eca0c08..a8c4b009b1173cdceb6a031b04d2e2aef5e6c67d 100644 --- a/Tracking/TrkVertexFitter/TrkVKalVrtFitter/TrkVKalVrtFitter/IVKalState.h +++ b/Tracking/TrkVertexFitter/TrkVKalVrtFitter/TrkVKalVrtFitter/IVKalState.h @@ -1,6 +1,6 @@ // This file's extension implies that it's C, but it's really -*- C++ -*-. /* - * Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration. + * Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration. */ /** * @file TrkVKalVrtFitter/IVKalState.h diff --git a/Tracking/TrkVertexFitter/TrkVKalVrtFitter/TrkVKalVrtFitter/IVertexCascadeFitter.h b/Tracking/TrkVertexFitter/TrkVKalVrtFitter/TrkVKalVrtFitter/IVertexCascadeFitter.h index f22df380abb20f1919c0a2216421f4ab62df70f4..0a35671ea801f2ad305162b2cc451f8fc0f18548 100755 --- a/Tracking/TrkVertexFitter/TrkVKalVrtFitter/TrkVKalVrtFitter/IVertexCascadeFitter.h +++ b/Tracking/TrkVertexFitter/TrkVKalVrtFitter/TrkVKalVrtFitter/IVertexCascadeFitter.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // IVertexCascadeFitter.h - @@ -11,6 +11,7 @@ // Gaudi includes #include "AthenaBaseComps/AthAlgTool.h" //#include "GaudiKernel/IToolSvc.h" +#include "GaudiKernel/EventContext.h" // #include "VxVertex/Vertex.h" #include "TrkVKalVrtFitter/VxCascadeInfo.h" @@ -31,8 +32,19 @@ namespace Trk{ //--------------------------------------------------------------------------- //Interface itself - virtual std::unique_ptr<IVKalState> makeState() const = 0; - + /* + * Context aware method + */ + virtual std::unique_ptr<IVKalState> makeState(const EventContext& ctx) const = 0; + + /* + * For non-migrated clients whcih should always use the context aware method + */ + virtual std::unique_ptr<IVKalState> makeState() const + { + return makeState(Gaudi::Hive::currentContext()); + } + virtual VertexID startVertex(const std::vector<const xAOD::TrackParticle*> & list, const std::vector<double>& particleMass, IVKalState& istate, diff --git a/Tracking/TrkVertexFitter/TrkVKalVrtFitter/TrkVKalVrtFitter/TrkVKalVrtFitter.h b/Tracking/TrkVertexFitter/TrkVKalVrtFitter/TrkVKalVrtFitter/TrkVKalVrtFitter.h index c02c0262ccd46943987f41fd72763226f8f38b63..ac1dd17df9e00517ea0a436d8f7ad8f9bf9a2be6 100755 --- a/Tracking/TrkVertexFitter/TrkVKalVrtFitter/TrkVKalVrtFitter/TrkVKalVrtFitter.h +++ b/Tracking/TrkVertexFitter/TrkVKalVrtFitter/TrkVKalVrtFitter/TrkVKalVrtFitter.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // TrkVKalVrtFitter.h @@ -78,6 +78,10 @@ namespace Trk{ friend class VKalExtPropagator; public: + // The following 'using' can be removed when IVertexFitter::fit has been fully migrated to the one with the EventContext + using Trk::IVertexFitter::fit; + using Trk::ITrkVKalVrtFitter::makeState; + virtual StatusCode initialize() override; virtual StatusCode finalize() override; @@ -108,7 +112,8 @@ namespace Trk{ const xAOD::Vertex& constraint) const override; /*-------------- Interface for xAOD -------------*/ - virtual xAOD::Vertex * fit(const std::vector<const xAOD::TrackParticle*>& vectorTrk, + virtual xAOD::Vertex * fit(const EventContext& ctx, + const std::vector<const xAOD::TrackParticle*>& vectorTrk, const Amg::Vector3D& startingPoint) const override; virtual xAOD::Vertex * fit(const std::vector<const xAOD::TrackParticle*>& vectorTrk, const xAOD::Vertex& constraint) const override; @@ -166,7 +171,7 @@ namespace Trk{ //------ Personal VKalVrt staff - virtual std::unique_ptr<IVKalState> makeState() const override; + virtual std::unique_ptr<IVKalState> makeState(const EventContext& ctx) const override; virtual StatusCode VKalVrtFit(const std::vector<const xAOD::TrackParticle*>&, @@ -435,7 +440,12 @@ namespace Trk{ // Private technical functions // void setAthenaPropagator(const Trk::IExtrapolator*); + // context-aware init of state + void initState (const EventContext& ctx, State& state) const; + // init of state for backwards compartibility - calls context-aware version. Can be removed + // when fully migrated to EventContext void initState (State& state) const; + // // void FillMatrixP(AmgSymMatrix(5)& , std::vector<double>& ) const; diff --git a/Tracking/TrkVertexFitter/TrkVKalVrtFitter/TrkVKalVrtFitter/VKalVrtAtlas.h b/Tracking/TrkVertexFitter/TrkVKalVrtFitter/TrkVKalVrtFitter/VKalVrtAtlas.h index e278170b8964f2ddac79ae6d8847769240f0a1a4..bd46bca5e6805c054d36c9ad32aadecfcb7b5390 100755 --- a/Tracking/TrkVertexFitter/TrkVKalVrtFitter/TrkVKalVrtFitter/VKalVrtAtlas.h +++ b/Tracking/TrkVertexFitter/TrkVKalVrtFitter/TrkVKalVrtFitter/VKalVrtAtlas.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // VKalVrtAtlas.h diff --git a/Tracking/TrkVertexFitter/TrkVKalVrtFitter/TrkVKalVrtFitter/VxCascadeInfo.h b/Tracking/TrkVertexFitter/TrkVKalVrtFitter/TrkVKalVrtFitter/VxCascadeInfo.h index 2b29dec7e6d681781a22b17aab023932a0b7b49f..6cb33cc08e577ff6b5c2def63eef5d23f519d410 100644 --- a/Tracking/TrkVertexFitter/TrkVKalVrtFitter/TrkVKalVrtFitter/VxCascadeInfo.h +++ b/Tracking/TrkVertexFitter/TrkVKalVrtFitter/TrkVKalVrtFitter/VxCascadeInfo.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /**************************************** diff --git a/Tracking/TrkVertexFitter/TrkVKalVrtFitter/src/TrkVKalVrtFitter.cxx b/Tracking/TrkVertexFitter/TrkVKalVrtFitter/src/TrkVKalVrtFitter.cxx index da8f97a79741cc9831df3362bd1c3d80eaff858d..622a5309b1189f1421ccefded6f104767c8d42ac 100755 --- a/Tracking/TrkVertexFitter/TrkVKalVrtFitter/src/TrkVKalVrtFitter.cxx +++ b/Tracking/TrkVertexFitter/TrkVKalVrtFitter/src/TrkVKalVrtFitter.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // Header include @@ -110,10 +110,10 @@ TrkVKalVrtFitter::~TrkVKalVrtFitter(){ } -std::unique_ptr<IVKalState> TrkVKalVrtFitter::makeState() const +std::unique_ptr<IVKalState> TrkVKalVrtFitter::makeState(const EventContext& ctx) const { auto state = std::make_unique<State>(); - initState (*state); + initState (ctx, *state); return state; } @@ -219,6 +219,13 @@ StatusCode TrkVKalVrtFitter::initialize() void TrkVKalVrtFitter::initState (State& state) const +{ + initState(Gaudi::Hive::currentContext(), state); +} + + +void TrkVKalVrtFitter::initState (const EventContext& ctx, State& state) const + { //---------------------------------------------------------------------- // New magnetic field object is created. It's provided to VKalVrtCore. @@ -226,7 +233,7 @@ void TrkVKalVrtFitter::initState (State& state) const // if (m_isAtlasField) { // For the moment, use Gaudi Hive for the event context - would need to be passed in from clients - SG::ReadCondHandle<AtlasFieldCacheCondObj> readHandle{m_fieldCacheCondObjInputKey, Gaudi::Hive::currentContext()}; + SG::ReadCondHandle<AtlasFieldCacheCondObj> readHandle{m_fieldCacheCondObjInputKey, ctx}; const AtlasFieldCacheCondObj* fieldCondObj{*readHandle}; if (fieldCondObj == nullptr) { ATH_MSG_ERROR("Failed to retrieve AtlasFieldCacheCondObj with key " << m_fieldCacheCondObjInputKey.key()); @@ -642,13 +649,15 @@ xAOD::Vertex * TrkVKalVrtFitter::fit(const std::vector<const TrackParameters*> /** Interface for xAOD::TrackParticle with starting point */ -xAOD::Vertex * TrkVKalVrtFitter::fit(const std::vector<const xAOD::TrackParticle*> & xtpListC, +xAOD::Vertex * TrkVKalVrtFitter::fit(const EventContext& ctx, + const std::vector<const xAOD::TrackParticle*> & xtpListC, const Amg::Vector3D & startingPoint) const { State state; - initState (state); + initState (ctx, state); return fit (xtpListC, startingPoint, state); } + xAOD::Vertex * TrkVKalVrtFitter::fit(const std::vector<const xAOD::TrackParticle*> & xtpListC, const Amg::Vector3D & startingPoint, IVKalState& istate) const diff --git a/Tracking/TrkVertexFitter/TrkVertexBilloirTools/TrkVertexBilloirTools/FastVertexFitter.h b/Tracking/TrkVertexFitter/TrkVertexBilloirTools/TrkVertexBilloirTools/FastVertexFitter.h index e362d4c4ded793773bc047b355ff557c7a29d12a..73f167d8265a72fd25a7e07726cfce1cce2b3c7b 100755 --- a/Tracking/TrkVertexFitter/TrkVertexBilloirTools/TrkVertexBilloirTools/FastVertexFitter.h +++ b/Tracking/TrkVertexFitter/TrkVertexBilloirTools/TrkVertexBilloirTools/FastVertexFitter.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef TRKVERTEXFITTERBILLOIR_FASTVERTEXFITTER_H @@ -36,6 +36,9 @@ namespace Trk class FastVertexFitter : public extends<AthAlgTool, IVertexFitter> { public: + // The following 'using' can be removed when IVertexFitter::fit has been fully migrated to the one with the EventContext + using Trk::IVertexFitter::fit; + virtual StatusCode initialize() override; virtual StatusCode finalize() override; diff --git a/Tracking/TrkVertexFitter/TrkVertexBilloirTools/TrkVertexBilloirTools/FullVertexFitter.h b/Tracking/TrkVertexFitter/TrkVertexBilloirTools/TrkVertexBilloirTools/FullVertexFitter.h index 277ec410460674ed7bd758539d096c2c6b977fcc..e8347d99b360ef6d7a133d844e8233d1be781e0c 100755 --- a/Tracking/TrkVertexFitter/TrkVertexBilloirTools/TrkVertexBilloirTools/FullVertexFitter.h +++ b/Tracking/TrkVertexFitter/TrkVertexBilloirTools/TrkVertexBilloirTools/FullVertexFitter.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef TRKVERTEXFITTERBILLOIR_FULLVERTEXFITTER_H @@ -37,6 +37,9 @@ namespace Trk class FullVertexFitter : public extends<AthAlgTool, IVertexFitter> { public: + // The following 'using' can be removed when IVertexFitter::fit has been fully migrated to the one with the EventContext + using Trk::IVertexFitter::fit; + virtual StatusCode initialize() override; virtual StatusCode finalize() override; diff --git a/Tracking/TrkVertexFitter/TrkVertexFitterInterfaces/TrkVertexFitterInterfaces/IVertexFitter.h b/Tracking/TrkVertexFitter/TrkVertexFitterInterfaces/TrkVertexFitterInterfaces/IVertexFitter.h index 27a5f615cb4e8b54e803b84d378934cea6865af5..4582811059b73bb08ba3c51a9c27b1f8ca744c76 100755 --- a/Tracking/TrkVertexFitter/TrkVertexFitterInterfaces/TrkVertexFitterInterfaces/IVertexFitter.h +++ b/Tracking/TrkVertexFitter/TrkVertexFitterInterfaces/TrkVertexFitterInterfaces/IVertexFitter.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -62,6 +62,28 @@ namespace Trk */ virtual ~IVertexFitter() = default; + + /* + * First the context aware methods. + * If this set is not overloaded , it + * will call the methods without EventContext + */ + + + /** + *Interface for xAOD::TrackParticle with starting point + */ + virtual xAOD::Vertex * fit( + const EventContext& ctx, + const std::vector<const xAOD::TrackParticle*>& vectorTrk, + const Amg::Vector3D& startingPoint) const + { + (void)(ctx); + return fit(vectorTrk, startingPoint); + } + + + /** *Interface for Track with starting point */ @@ -99,7 +121,10 @@ namespace Trk *Interface for xAOD::TrackParticle with starting point */ virtual xAOD::Vertex * fit(const std::vector<const xAOD::TrackParticle*>& vectorTrk, - const Amg::Vector3D& startingPoint) const = 0; + const Amg::Vector3D& startingPoint) const + { + return fit(Gaudi::Hive::currentContext(), vectorTrk, startingPoint); + } /** * Interface for xAOD::TrackParticle and xAOD::NeutralParticle with vertex constraint diff --git a/Tracking/TrkVertexFitter/TrkVertexFitters/TrkVertexFitters/AdaptiveVertexFitter.h b/Tracking/TrkVertexFitter/TrkVertexFitters/TrkVertexFitters/AdaptiveVertexFitter.h index 61f4699f5d17a0e38c323b2b54e1b667883c389f..497606463370c2cb36ee03dafbe836a7afed357a 100755 --- a/Tracking/TrkVertexFitter/TrkVertexFitters/TrkVertexFitters/AdaptiveVertexFitter.h +++ b/Tracking/TrkVertexFitter/TrkVertexFitters/TrkVertexFitters/AdaptiveVertexFitter.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef TRKADAPTIVEFITTERTOOLS_ADAPTIVEVERTEXFITTER_H @@ -84,6 +84,9 @@ namespace Trk class AdaptiveVertexFitter : public extends<AthAlgTool, IVertexFitter> { public: + // The following 'using' can be removed when IVertexFitter::fit has been fully migrated to the one with the EventContext + using Trk::IVertexFitter::fit; + virtual StatusCode initialize() override; virtual StatusCode finalize() override; diff --git a/Tracking/TrkVertexFitter/TrkVertexFitters/TrkVertexFitters/DummyVertexSmoother.h b/Tracking/TrkVertexFitter/TrkVertexFitters/TrkVertexFitters/DummyVertexSmoother.h index be2ffce3681e289f8d93f25056248b5b200a2401..3b53f42052f034b0868230401ad5fae4a18f2739 100755 --- a/Tracking/TrkVertexFitter/TrkVertexFitters/TrkVertexFitters/DummyVertexSmoother.h +++ b/Tracking/TrkVertexFitter/TrkVertexFitters/TrkVertexFitters/DummyVertexSmoother.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef TRKVERTEXFITTERS_DUMMYVERTEXSMOOTHER_H diff --git a/Tracking/TrkVertexFitter/TrkVertexFitters/TrkVertexFitters/SequentialVertexFitter.h b/Tracking/TrkVertexFitter/TrkVertexFitters/TrkVertexFitters/SequentialVertexFitter.h index dc242a8ebf11b48b6d62f82ef014a5d644e73c4c..933515e6d0cf7688cb25088c16b2ad0916da9948 100755 --- a/Tracking/TrkVertexFitter/TrkVertexFitters/TrkVertexFitters/SequentialVertexFitter.h +++ b/Tracking/TrkVertexFitter/TrkVertexFitters/TrkVertexFitters/SequentialVertexFitter.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef TrkVertexFitters_SequentialVertexFitter_H @@ -55,6 +55,9 @@ namespace Trk class SequentialVertexFitter : public extends<AthAlgTool, IVertexFitter> { public: + // The following 'using' can be removed when IVertexFitter::fit has been fully migrated to the one with the EventContext + using Trk::IVertexFitter::fit; + virtual StatusCode initialize() override; virtual StatusCode finalize() override; diff --git a/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinder.h b/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinder.h index 2011d9cc05dabc823c1a6736447f2119fd982369..d4f73491854a1413a7739477abdae14482ebad2a 100644 --- a/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinder.h +++ b/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinder.h @@ -84,6 +84,9 @@ class TrigFastTrackFinder : public HLT::FexAlgo { double trackQuality(const Trk::Track* Tr) const; void filterSharedTracks(std::vector<std::tuple<bool, double, Trk::Track*>>& QT) const; + virtual bool isClonable() const override { return true; } + virtual unsigned int cardinality() const override { return 0; }//Mark as re-entrant + protected: void updateClusterMap(long int, const Trk::Track*, std::map<Identifier, std::vector<long int> >&) const; diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/AlignmentBarrelLUT.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/AlignmentBarrelLUT.h index 02fb29bf690202189d3566d4e1690c141d8abf4e..7d3389b20afbca4f5ef67053bb0394c46cd3821d 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/AlignmentBarrelLUT.h +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/AlignmentBarrelLUT.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef TRIGL2MUONSA_ALIGNMENTBARRELLUT_H @@ -10,8 +10,6 @@ #include "TMath.h" #include "GaudiKernel/Service.h" -#include "GaudiKernel/IInterface.h" -#include "GaudiKernel/StatusCode.h" #include <string> @@ -21,15 +19,10 @@ class AlignmentBarrelLUT: public AthAlgTool { public: - static const InterfaceID& interfaceID(); AlignmentBarrelLUT(const std::string& type, const std::string& name, const IInterface* parent); - ~AlignmentBarrelLUT(void); - - virtual StatusCode initialize(); - virtual StatusCode finalize (); StatusCode readLUT(std::string lut_fileName); @@ -38,16 +31,23 @@ class AlignmentBarrelLUT: public AthAlgTool std::pair<int, int> GetBinNumber(int saddress, int innerR, double etaMap, double phiMap) const; private: - double m_dZ[4][2][15][30][2]; // [s_address][innerR][eta][phi][etaQ] - - int m_NbinEta[4][2]; // [s_address][innerR] - float m_EtaMin[4][2]; - float m_EtaMax[4][2]; - float m_EtaStep[4][2]; - int m_NbinPhi[4][2]; - float m_PhiMin[4][2]; - float m_PhiMax[4][2]; - float m_PhiStep[4][2]; + + static const int s_saddress = 4; + static const int s_innerR = 2; + static const int s_eta = 15; + static const int s_phi = 30; + static const int s_etaQ = 2; + + double m_dZ[s_saddress][s_innerR][s_eta][s_phi][s_etaQ]; + + int m_NbinEta[s_saddress][s_innerR]; + float m_EtaMin[s_saddress][s_innerR]; + float m_EtaMax[s_saddress][s_innerR]; + float m_EtaStep[s_saddress][s_innerR]; + int m_NbinPhi[s_saddress][s_innerR]; + float m_PhiMin[s_saddress][s_innerR]; + float m_PhiMax[s_saddress][s_innerR]; + float m_PhiStep[s_saddress][s_innerR]; }; diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/AlignmentBarrelLUTSvc.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/AlignmentBarrelLUTSvc.h index 79dad7a3929ee8eb34f346f5d132c62a05c0c918..0922223f7101410fa0864c2fb6f6378532818c2a 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/AlignmentBarrelLUTSvc.h +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/AlignmentBarrelLUTSvc.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef TRIGL2MUONSA_ALIGNMENTBARRELLUTSVC_H @@ -7,8 +7,6 @@ #include <string> #include "AthenaBaseComps/AthService.h" -#include "GaudiKernel/IInterface.h" -#include "GaudiKernel/StatusCode.h" #include "GaudiKernel/ServiceHandle.h" #include "GaudiKernel/ToolHandle.h" @@ -16,35 +14,34 @@ #include "TrigL2MuonSA/AlignmentBarrelLUT.h" namespace TrigL2MuonSA { - + class AlignmentBarrelLUTSvc : public AthService, virtual public IInterface { public: - static const InterfaceID& interfaceID() { + static const InterfaceID& interfaceID() { static const InterfaceID IID(11498, 0 , 0); return IID; } public: AlignmentBarrelLUTSvc(const std::string& name,ISvcLocator* sl); - virtual ~AlignmentBarrelLUTSvc() {} - + virtual StatusCode queryInterface(const InterfaceID& riid,void** ppvIF); - - virtual StatusCode initialize(void); - virtual StatusCode finalize(void); + + virtual StatusCode initialize() override; private: Gaudi::Property< std::string > m_lut_fileName { - this, "LUTfile", "dZ_barrel.lut", ""}; + this, "LUTfile", "dZ_barrel.lut", ""}; + + ToolHandle<AlignmentBarrelLUT> m_alignmentBarrelLUT { + this, "AlignmentBarrelLUT", "TrigL2MuonSA::AlignmentBarrelLUT/AlignmentBarrelLUT"}; - ToolHandle<AlignmentBarrelLUT> m_alignmentBarrelLUT; - public: const ToolHandle<AlignmentBarrelLUT>* alignmentBarrelLUT(void) const { return &m_alignmentBarrelLUT; }; }; } - -#endif + +#endif diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/AlphaBetaEstimate.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/AlphaBetaEstimate.h index cec9c148b5814183574ec738e3ec672589de656a..55952a87248613e341d5061dcb3d8c798d9beab5 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/AlphaBetaEstimate.h +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/AlphaBetaEstimate.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef TRIGL2MUONSA_ALPHABETAESTIMATE_H @@ -22,46 +22,40 @@ namespace TrigL2MuonSA { class AlphaBetaEstimate: public AthAlgTool { public: - - static const InterfaceID& interfaceID(); AlphaBetaEstimate(const std::string& type, const std::string& name, const IInterface* parent); - ~AlphaBetaEstimate(); - - virtual StatusCode initialize(); - virtual StatusCode finalize (); - void setMCFlag(BooleanProperty use_mcLUT, const TrigL2MuonSA::PtEndcapLUTSvc* ptEndcapLUTSvc); - public: - - StatusCode setAlphaBeta(const LVL1::RecMuonRoI* p_roi, - TrigL2MuonSA::TgcFitResult& tgcFitResult, - TrigL2MuonSA::TrackPattern& trackPattern, - const TrigL2MuonSA::MuonRoad& muonRoad); - - private: - - double computeRadius(double InnerSlope, double InnerR, double InnerZ, - double MiddleSlope, double MiddleR, double MiddleZ, - double sign); - - double computeRadius3Points(double InnerZ, double InnerR, double EEZ, double EER,double MiddleZ, double MiddleR ) const ; - double calcDistance(double x1,double y1,double x2,double y2,double x3,double y3) const; - - inline bool isZero( float value, float tolerance = 1e-5 ) const { - return std::abs( value ) < tolerance; - } + public: - BooleanProperty m_use_mcLUT; + StatusCode setAlphaBeta(const LVL1::RecMuonRoI* p_roi, + TrigL2MuonSA::TgcFitResult& tgcFitResult, + TrigL2MuonSA::TrackPattern& trackPattern, + const TrigL2MuonSA::MuonRoad& muonRoad); + + private: + + double computeRadius(double InnerSlope, double InnerR, double InnerZ, + double MiddleSlope, double MiddleR, double MiddleZ, + double sign); + + double computeRadius3Points(double InnerZ, double InnerR, double EEZ, double EER,double MiddleZ, double MiddleR ) const ; + double calcDistance(double x1,double y1,double x2,double y2,double x3,double y3) const; + + inline bool isZero( float value, float tolerance = 1e-5 ) const { + return std::abs( value ) < tolerance; + } + + BooleanProperty m_use_mcLUT; + + const ToolHandle<PtEndcapLUT>* m_ptEndcapLUT {nullptr}; // point to LUT when calling setMCFlag() + +}; - const ToolHandle<PtEndcapLUT>* m_ptEndcapLUT; - }; - } // namespace TrigL2MuonSA #endif // ALPHABETAESTIMATE_H diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/CscDataPreparator.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/CscDataPreparator.h index e753a5a91515802cdd3b9e270d3b3e2a6dc6b4e4..90cc948bd37418d112fb9a546d77ca6285f0d307 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/CscDataPreparator.h +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/CscDataPreparator.h @@ -31,29 +31,23 @@ namespace TrigL2MuonSA { class CscDataPreparator: public AthAlgTool { public: - - static const InterfaceID& interfaceID(); - - public: - - CscDataPreparator(const std::string& type, + + CscDataPreparator(const std::string& type, const std::string& name, const IInterface* parent); - - ~CscDataPreparator()=default; - - virtual StatusCode initialize(); + + virtual StatusCode initialize() override; public: - + StatusCode prepareData(const TrigRoiDescriptor* p_roids, TrigL2MuonSA::MuonRoad& muonRoad, TrigL2MuonSA::CscHits& cscHits); - void setRoIBasedDataAccess(bool use_RoIBasedDataAccess); + void setRoIBasedDataAccess(bool use_RoIBasedDataAccess) {m_use_RoIBasedDataAccess = use_RoIBasedDataAccess;}; private: - + double calc_residual(double aw, double bw, double x, @@ -69,11 +63,14 @@ namespace TrigL2MuonSA { ServiceHandle<IRegSelSvc> m_regionSelector; // Tool handles for BS conversion and Rdo to Prep Data conversion - ToolHandle<Muon::IMuonRawDataProviderTool> m_rawDataProviderTool; - + ToolHandle<Muon::IMuonRawDataProviderTool> m_rawDataProviderTool{ + this, "CscRawDataProvider", "Muon::CSC_RawDataProviderTool/CSC_RawDataProviderTool"}; + // CSC PrepDataProvider - ToolHandle<Muon::IMuonRdoToPrepDataTool> m_cscPrepDataProvider; - ToolHandle<ICscClusterBuilder> m_cscClusterProvider; + ToolHandle<Muon::IMuonRdoToPrepDataTool> m_cscPrepDataProvider{ + this, "CscPrepDataProvider", "Muon::CscRdoToCscPrepDataTool/CscPrepDataProviderTool"}; + ToolHandle<ICscClusterBuilder> m_cscClusterProvider{ + this, "CscClusterProvider", "CscThresholdClusterBuilderTool"}; SG::ReadHandleKey<Muon::CscPrepDataContainer> m_cscPrepContainerKey{ this, "CSCPrepDataContainer", "CSC_Clusters", "Name of the CSCContainer to read in"}; @@ -82,10 +79,10 @@ namespace TrigL2MuonSA { // Flag to decide whether or not to run BS decoding Gaudi::Property< bool > m_decodeBS { this, "DecodeBS", true, "Flag to decide whether or not to run BS->RDO decoding" }; - + bool m_use_RoIBasedDataAccess; }; - + } // namespace TrigL2MuonSA -#endif // +#endif diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/CscRegUtils.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/CscRegUtils.h index 8acb98476dec5548277caf33cff5b1dff41c17cf..dc002d9862b2011eb9ff5cede561c62a3804cfc4 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/CscRegUtils.h +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/CscRegUtils.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef TRIGL2MUONSA_CSCREGUTILS_H @@ -7,8 +7,7 @@ #include "AthenaBaseComps/AthAlgTool.h" #include "GaudiKernel/Service.h" -#include "GaudiKernel/IInterface.h" -#include "GaudiKernel/StatusCode.h" +#include "GaudiKernel/ToolHandle.h" #include "GeoPrimitives/GeoPrimitives.h" @@ -20,16 +19,34 @@ namespace TrigL2MuonSA { -class UtilTools; class ReturnCode; +class UtilTools{ + +public: + UtilTools(){} + + double calc_theta(double eta){ return 2*atan(exp((-1)*eta)); } + double calc_theta(double x, double y, double z){ return acos(z/sqrt(x*x+y*y+z*z)); } // for position not for direction theta in [0,pi] + double calc_eta(double x, double y, double z){return (-1)*log(tan(calc_theta(x,y,z)/2.));} + double calc_phi( double x, double y); + double calc_dphi(double phi1, double phi2); + double calc_sumsq(double x, double y){ return sqrt(x*x+y*y); } + double calc_sumsq(double x, double y, double z){ return sqrt(x*x+y*y+z*z);} + double cotan(double theta){ return tan(M_PI-theta); } + double relative_error(double measured, double reference){return (measured-reference)/reference; } + double average_phi(double phi1, double phi2); + +}; + + class CscRegDict: public AthAlgTool{ - + public: - + // typedef TrigL2MuonSA::ReturnCode ReturnCode; - + typedef struct { double etaMin; double etaMax; @@ -43,17 +60,14 @@ class CscRegDict: public AthAlgTool{ double posCorrectionPlusR; double posCorrectionMinusR; } CscRegion; - - static const InterfaceID &interfaceID(); + CscRegDict(const std::string &type, const std::string &name, const IInterface *parent); - ~CscRegDict(); - - StatusCode initialize(); - StatusCode finalize(); - + + virtual StatusCode initialize() override; + double phiCen(int module){ return m_reg_dict[module].phiCen; } double phiMod(int module){ return m_reg_dict[module].phiMod; } - + int get_hash(int stationname, int stationeta, int stationphi); //return a module context hashId. Amg::Vector3D nomalVector(int module); double displacement(int module); @@ -64,43 +78,34 @@ class CscRegDict: public AthAlgTool{ int stationName(int hash); int stationEta(int hash); int stationPhi(int hash); - + private: Gaudi::Property< bool > m_isMC { this, "MCFlag", true, "" }; CscRegion m_reg_dict[32];//dictionary of CSC regions int m_module_hashes[2][2][8];//dictionary of hashIds - - + + ReturnCode initializeHashDictionary(); ReturnCode initializeDictionaryForData(); ReturnCode initializePosCorrectionParameters(); - - double PhiConv(double phi); //convert phi [0,2*pi)=>[-pi,pi) - - TrigL2MuonSA::UtilTools *m_util; - -}; - -inline double CscRegDict::displacement(int module){ + double PhiConv(double phi); //convert phi [0,2*pi)=>[-pi,pi) - return (0<=module && module <32) ? m_reg_dict[module].Displacement : 0.; - -} + TrigL2MuonSA::UtilTools m_util; +}; +inline double CscRegDict::displacement(int module){ + return (0<=module && module <32) ? m_reg_dict[module].Displacement : 0.; +} inline int CscRegDict::stationName(int hash){ - if(hash<0 || hash>31) return 999; - else return (hash<16) ? 50 : 51; - + else return (hash<16) ? 50 : 51; } - inline int CscRegDict::stationEta(int hash){ - if(hash<0 || hash>31) return 999; else{ int secteta=(hash - hash%8)/8;// secteta: 0(Small Cside),1(Small Aside), 2(Large Cside), 3(Large Aside) @@ -108,69 +113,36 @@ inline int CscRegDict::stationEta(int hash){ } } - inline int CscRegDict::stationPhi(int hash){ - if(hash<0 || hash>31) return 999; else return hash%8+1; - } -class UtilTools{ - -public: - UtilTools(){} - ~UtilTools(){} - - double calc_theta(double eta){ return 2*atan(exp((-1)*eta)); } - double calc_theta(double x, double y, double z){ return acos(z/sqrt(x*x+y*y+z*z)); } // for position not for direction theta in [0,pi] - double calc_eta(double x, double y, double z){return (-1)*log(tan(calc_theta(x,y,z)/2.));} - double calc_phi( double x, double y); - double calc_dphi(double phi1, double phi2); - double calc_sumsq(double x, double y){ return sqrt(x*x+y*y); } - double calc_sumsq(double x, double y, double z){ return sqrt(x*x+y*y+z*z);} - double cotan(double theta){ return tan(M_PI-theta); } - double relative_error(double measured, double reference){return (measured-reference)/reference; } - double average_phi(double phi1, double phi2); - - -}; - - - - class ReturnCode{ - + public: ReturnCode(){} ReturnCode(unsigned int retcode){m_retcode=retcode;} ~ReturnCode(){} - + enum{ FAILURE=0, SUCCESS=1 }; - + bool isSuccess(){return (m_retcode==SUCCESS);} - + void operator= (unsigned int retcode){m_retcode=retcode;} bool operator== ( unsigned int code){return (m_retcode==code);} bool operator!= ( unsigned int code){return (m_retcode!=code);} - + private: unsigned int m_retcode; - + }; }//namespace TrigL2MuonSA - - - - - - - #endif /* TRIGL2MUONSA_CSCREGUTILS_H */ diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/CscSegmentMaker.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/CscSegmentMaker.h index e648df99754230b49b1f0c0691c22986dbf819a3..a9b438830ae300fa72a89f954b4986358197932f 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/CscSegmentMaker.h +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/CscSegmentMaker.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef TRIGL2MUONSA_CSCSEGMENTMAKER_H @@ -7,13 +7,8 @@ #include "AthenaBaseComps/AthAlgTool.h" -#include "GaudiKernel/ISvcLocator.h" -#include "GaudiKernel/Bootstrap.h" -#include "GaudiKernel/ToolHandle.h" #include "GaudiKernel/Service.h" -#include "GaudiKernel/IInterface.h" -#include "GaudiKernel/StatusCode.h" #include "GeoPrimitives/GeoPrimitives.h" @@ -32,144 +27,129 @@ namespace MuonGM{ namespace TrigL2MuonSA{ - -class CscSegment; - - class CscSegmentMaker: public AthAlgTool{ - - - public: - - - typedef struct{ - double loc_x; - double loc_y; - double loc_z; - double error; - double residual; - int measphi; - //int index4; not used - bool enabled; - int stationname; - bool isIP; - } localCscHit; - - typedef struct{ - double a; - double b; - double zshift; - double chi2; - int nhit; - int stationname; - double residual; - //int outlier; obsolete - std::vector<localCscHit> localHits; - }local2dSegment; - - public: - static const InterfaceID& interfaceID(); - CscSegmentMaker(const std::string& type, const std::string &name, const IInterface* parent); - ~CscSegmentMaker(); - - - StatusCode initialize(); - StatusCode finalize(); - - - // ReturnCode initializeRegDict(ToolHandle<CscRegDict> cscregdict); - - ReturnCode FindSuperPointCsc( const TrigL2MuonSA::CscHits &cscHits, std::vector<TrigL2MuonSA::TrackPattern> &v_trackPatterns, const TrigL2MuonSA::TgcFitResult &tgcFitResult, const TrigL2MuonSA::MuonRoad &muroad); - - - ReturnCode make_segment(int mod_hash, TrigL2MuonSA::CscHits clusters[8], CscSegment &cscsegment, CscSegment &cscsegment_noip ); - - ReturnCode make_2dsegment(int measphi, const localCscHit &ip_loc,const std::vector<localCscHit> hits_loc[4], local2dSegment &seg2d_eta,local2dSegment &local2d_noip, int &nhite); - - ReturnCode make_2dseg4hit(int measphi, const localCscHit &ip_loc,std::vector<localCscHit> hits_loc[4], std::vector<local2dSegment> &seg2d_4hitCollection, int &nhite); - - ReturnCode make_2dseg3hit(int measphi, const localCscHit &ip_loc, const std::vector<localCscHit> hits_loc[4], std::vector<local2dSegment> &seg2d_4hitCollection, int &nhit); - - ReturnCode fit_clusters(int measphi, const std::vector<localCscHit> &hits_fit, local2dSegment &seg2d); - - ReturnCode make_4dsegment(const local2dSegment &seg2d_eta, const local2dSegment &seg2d_phi, - Amg::Vector3D &seg_pos, Amg::Vector3D &seg_dir); - - ReturnCode getModuleSP(int mod_hash[2], const TrigL2MuonSA::TgcFitResult &tgcFitResult, int phibin, const TrigL2MuonSA::MuonRoad &muroad, const int exist_clusters[32]); - - ReturnCode display_hits(const std::vector<localCscHit> localHits[4]); - - CscSegment segmentAtFirstLayer(int mod_hash, TrigL2MuonSA::CscSegment *mu_seg); - - private: - IntegerProperty m_msglevel; - UtilTools *m_util; - ToolHandle<CscRegDict> m_cscregdict { - this, "CscRegDict", "TrigL2MuonSA::CscRegDict", ""}; -#ifndef XAOD_ANALYSIS - const MuonGM::MuonDetectorManager *m_muonMgr; -#endif - - - //properties - Gaudi::Property< bool > m_use_geometry { - this, "UseGeometry", false, ""}; - Gaudi::Property< double > m_max_chisquare { - this, "max_chisquare", 25., ""}; - Gaudi::Property< double > m_max_residual_eta { - this, "max_residual_eta", 100., ""}; - Gaudi::Property< double > m_max_residual_phi { - this, "max_residual_phi", 250., ""}; - Gaudi::Property< double > m_err_eta { - this, "err_eta", 3., ""}; - Gaudi::Property< double > m_err_phi { - this, "err_phi", 6., ""}; - Gaudi::Property< double > m_err_ip { - this, "err_ip", 250., ""}; - - -}; - -class CscSegment{ - - public: - - CscSegment(); - ~CscSegment(); - - double x(){ return m_x; } - double y(){ return m_y; } - double z(){ return m_z; } - double px(){ return m_px; } - double py(){ return m_py; } - double pz(){ return m_pz; } - double slopeRZ(){ return m_slopeRZ; } - double interceptRZ(){ return m_interceptRZ; } - double chiSquare(){ return m_chisquare; } - double chiSquarePhi(){ return m_chisquare_phi; } - - //unsigned int l1id(){ return m_l1id; } - //void setL1id(unsigned int l1id){ m_l1id = l1id; } - int nHitEta(){ return m_nhit_eta; } - void setNHitEta( int nhite){ m_nhit_eta = nhite; } - int nHitPhi(){ return m_nhit_phi; } - void setNHitPhi( int nhitp){ m_nhit_phi = nhitp; } - bool isClean(); - - ReturnCode set(double x, double y, double z, double px, double py, double pz, double chisquare, double chisquare_phi); - ReturnCode set(Amg::Vector3D &seg_pos, Amg::Vector3D &seg_dir, double chisquare, double chisquare_phi); - - private: - //unsigned int m_l1id; //not used - double m_x, m_y, m_z, m_px, m_py, m_pz; - double m_slopeRZ, m_interceptRZ; - int m_nhit_eta, m_nhit_phi; - //bool m_clean; //not used - double m_chisquare; - double m_chisquare_phi; - -}; - - + + class CscSegment; + + class CscSegmentMaker: public AthAlgTool{ + + + public: + + + typedef struct{ + double loc_x; + double loc_y; + double loc_z; + double error; + double residual; + int measphi; + bool enabled; + int stationname; + bool isIP; + } localCscHit; + + typedef struct{ + double a; + double b; + double zshift; + double chi2; + int nhit; + int stationname; + double residual; + std::vector<localCscHit> localHits; + }local2dSegment; + + public: + CscSegmentMaker(const std::string& type, const std::string &name, const IInterface* parent); + + + virtual StatusCode initialize() override; + + + ReturnCode FindSuperPointCsc( const TrigL2MuonSA::CscHits &cscHits, std::vector<TrigL2MuonSA::TrackPattern> &v_trackPatterns, const TrigL2MuonSA::TgcFitResult &tgcFitResult, const TrigL2MuonSA::MuonRoad &muroad); + + + ReturnCode make_segment(int mod_hash, TrigL2MuonSA::CscHits clusters[8], CscSegment &cscsegment, CscSegment &cscsegment_noip ); + + ReturnCode make_2dsegment(int measphi, const localCscHit &ip_loc,const std::vector<localCscHit> hits_loc[4], local2dSegment &seg2d_eta,local2dSegment &local2d_noip, int &nhite); + + ReturnCode make_2dseg4hit(int measphi, const localCscHit &ip_loc,std::vector<localCscHit> hits_loc[4], std::vector<local2dSegment> &seg2d_4hitCollection, int &nhite); + + ReturnCode make_2dseg3hit(int measphi, const localCscHit &ip_loc, const std::vector<localCscHit> hits_loc[4], std::vector<local2dSegment> &seg2d_4hitCollection, int &nhit); + + ReturnCode fit_clusters(int measphi, const std::vector<localCscHit> &hits_fit, local2dSegment &seg2d); + + ReturnCode make_4dsegment(const local2dSegment &seg2d_eta, const local2dSegment &seg2d_phi, + Amg::Vector3D &seg_pos, Amg::Vector3D &seg_dir); + + ReturnCode getModuleSP(int mod_hash[2], const TrigL2MuonSA::TgcFitResult &tgcFitResult, int phibin, const TrigL2MuonSA::MuonRoad &muroad, const int exist_clusters[32]); + + ReturnCode display_hits(const std::vector<localCscHit> localHits[4]); + + CscSegment segmentAtFirstLayer(int mod_hash, TrigL2MuonSA::CscSegment *mu_seg); + + private: + UtilTools m_util; + ToolHandle<CscRegDict> m_cscregdict { + this, "CscRegDict", "TrigL2MuonSA::CscRegDict", ""}; + const MuonGM::MuonDetectorManager *m_muonMgr {nullptr}; + + + //properties + Gaudi::Property< bool > m_use_geometry { + this, "UseGeometry", false, ""}; + Gaudi::Property< double > m_max_chisquare { + this, "max_chisquare", 25., ""}; + Gaudi::Property< double > m_max_residual_eta { + this, "max_residual_eta", 100., ""}; + Gaudi::Property< double > m_max_residual_phi { + this, "max_residual_phi", 250., ""}; + Gaudi::Property< double > m_err_eta { + this, "err_eta", 3., ""}; + Gaudi::Property< double > m_err_phi { + this, "err_phi", 6., ""}; + Gaudi::Property< double > m_err_ip { + this, "err_ip", 250., ""}; + + + }; + + class CscSegment{ + + public: + + CscSegment(); + + double x(){ return m_x; } + double y(){ return m_y; } + double z(){ return m_z; } + double px(){ return m_px; } + double py(){ return m_py; } + double pz(){ return m_pz; } + double slopeRZ(){ return m_slopeRZ; } + double interceptRZ(){ return m_interceptRZ; } + double chiSquare(){ return m_chisquare; } + double chiSquarePhi(){ return m_chisquare_phi; } + + int nHitEta(){ return m_nhit_eta; } + void setNHitEta( int nhite){ m_nhit_eta = nhite; } + int nHitPhi(){ return m_nhit_phi; } + void setNHitPhi( int nhitp){ m_nhit_phi = nhitp; } + bool isClean(); + + ReturnCode set(double x, double y, double z, double px, double py, double pz, double chisquare, double chisquare_phi); + ReturnCode set(Amg::Vector3D &seg_pos, Amg::Vector3D &seg_dir, double chisquare, double chisquare_phi); + + private: + double m_x, m_y, m_z, m_px, m_py, m_pz; + double m_slopeRZ, m_interceptRZ; + int m_nhit_eta, m_nhit_phi; + double m_chisquare; + double m_chisquare_phi; + + }; + + }//namespace TrigL2MuonSA diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MdtDataPreparator.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MdtDataPreparator.h index 68f3fde556266fe0d3582ea5e67e2ae8dc8b04d0..08986d6bed03dd0c6bbd788f227805f7a0f4c2b4 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MdtDataPreparator.h +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MdtDataPreparator.h @@ -42,25 +42,23 @@ namespace MuonGM{ // -------------------------------------------------------------------------------- namespace TrigL2MuonSA { - + class MdtDataPreparator: public AthAlgTool { public: - + static const InterfaceID& interfaceID(); - + public: - + MdtDataPreparator(const std::string& type, const std::string& name, const IInterface* parent); - - ~MdtDataPreparator()=default; - - virtual StatusCode initialize(); - + + virtual StatusCode initialize() override; + public: - + StatusCode prepareData(const LVL1::RecMuonRoI* p_roi, const TrigRoiDescriptor* p_roids, const TrigL2MuonSA::RpcFitResult& rpcFitResult, @@ -77,15 +75,15 @@ namespace TrigL2MuonSA { TrigL2MuonSA::MdtHits& mdtHits_normal, TrigL2MuonSA::MdtHits& mdtHits_overlap); - void setRpcGeometry(bool use_rpc); - void setMdtDataCollection(bool use_mdtcsm); - void setRoIBasedDataAccess(bool use_RoIBasedDataAccess); + void setRpcGeometry(bool use_rpc) {m_mdtRegionDefiner->setRpcGeometry(use_rpc);}; + void setMdtDataCollection(bool use_mdtcsm){m_use_mdtcsm = use_mdtcsm;}; + void setRoIBasedDataAccess(bool use_RoIBasedDataAccess){m_use_RoIBasedDataAccess = use_RoIBasedDataAccess;}; public: float etaMinChamber[11],etaMaxChamber[11],phiMinChamber[11],phiMaxChamber[11]; private: - + StatusCode getMdtHits(const LVL1::RecMuonRoI* p_roi, const TrigRoiDescriptor* p_roids, const TrigL2MuonSA::MdtRegion& mdtRegion, @@ -96,19 +94,19 @@ namespace TrigL2MuonSA { void getMdtIdHashesBarrel(const TrigL2MuonSA::MdtRegion& mdtRegion, std::vector<IdentifierHash>& mdtIdHashes_normal, std::vector<IdentifierHash>& mdtIdHashes_overlap); - + void getMdtIdHashesEndcap(const TrigL2MuonSA::MdtRegion& mdtRegion, std::vector<IdentifierHash>& mdtIdHashes_normal, std::vector<IdentifierHash>& mdtIdHashes_overlap); - + StatusCode getMdtCsm(const MdtCsmContainer* pMdtCsmContainer, const std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*>& v_robFragments, const std::vector<IdentifierHash>& v_idHash, std::vector<const MdtCsm*>& v_mdtCsms); - + bool decodeMdtCsm(const MdtCsm* csm, TrigL2MuonSA::MdtHits& mdtHits, const TrigL2MuonSA::MuonRoad& muonRoad); uint32_t get_system_id (unsigned short int SubsystemId) const; - + StatusCode collectMdtHitsFromPrepData(const std::vector<IdentifierHash>& v_idHash, std::vector<uint32_t>& v_robIds, TrigL2MuonSA::MdtHits& mdtHits, @@ -118,33 +116,34 @@ namespace TrigL2MuonSA { private: - // Reference to StoreGateSvc; - ServiceHandle<ActiveStoreSvc> m_activeStore; - // Tools for the Raw data conversion - ToolHandle<Muon::IMuonRawDataProviderTool> m_mdtRawDataProvider; - + ToolHandle<Muon::IMuonRawDataProviderTool> m_mdtRawDataProvider { + this, "MDT_RawDataProvider", "Muon::MDT_RawDataProviderTool"}; + + // Geometry Services - const MuonGM::MuonDetectorManager* m_muonMgr; - const MuonGM::MdtReadoutElement* m_mdtReadout; - const MuonGM::MuonStation* m_muonStation; + const MuonGM::MuonDetectorManager* m_muonMgr {nullptr}; + const MuonGM::MdtReadoutElement* m_mdtReadout {nullptr}; + const MuonGM::MuonStation* m_muonStation {nullptr}; ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}; IdentifierHash m_hash_id; - + // Region Selector ServiceHandle<IRegSelSvc> m_regionSelector; - + // ROB DataProvider - ServiceHandle<IROBDataProviderSvc> m_robDataProvider; - + ServiceHandle<IROBDataProviderSvc> m_robDataProvider; + // Utils TrigL2MuonSA::RecMuonRoIUtils m_recMuonRoIUtils; - - // - ToolHandle<MdtRegionDefiner> m_mdtRegionDefiner; + + // MdtRegionDefiner + ToolHandle<MdtRegionDefiner> m_mdtRegionDefiner { + this, "MdtRegionDefiner", "TrigL2MuonSA::MdtRegionDefiner"}; // handles to data access - ToolHandle<Muon::IMuonRdoToPrepDataTool> m_mdtPrepDataProvider; + ToolHandle<Muon::IMuonRdoToPrepDataTool> m_mdtPrepDataProvider { + this, "MdtPrepDataProvider", "Muon::MdtRdoToPrepDataTool/MdtPrepDataProviderTool"}; SG::ReadHandleKey<MdtCsmContainer> m_mdtCsmContainerKey{ this, "MDTCSMContainer", "MDTCSM", "Name of the MDTRDO to read in"}; @@ -169,4 +168,4 @@ namespace TrigL2MuonSA { } // namespace TrigL2MuonSA -#endif // +#endif // diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MdtRegionDefiner.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MdtRegionDefiner.h index 8692341db11dfd81a14d0d427ed9d96e842be3e7..555de87e2c439684f5dc76c6bf0c4c83717ed18f 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MdtRegionDefiner.h +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MdtRegionDefiner.h @@ -36,30 +36,27 @@ namespace TrigL2MuonSA { class MdtRegionDefiner: public AthAlgTool { public: - static const InterfaceID& interfaceID(); MdtRegionDefiner(const std::string& type, const std::string& name, const IInterface* parent); - - ~MdtRegionDefiner()=default; - virtual StatusCode initialize(); + virtual StatusCode initialize() override; // function using the new cabling/geometry - void setMdtGeometry(const MuonGM::MuonDetectorManager* muonMgr); - void setRpcGeometry(bool use_rpc); + void setMdtGeometry(const MuonGM::MuonDetectorManager* muonMgr) {m_muonMgr = muonMgr;}; + void setRpcGeometry(bool use_rpc){m_use_rpc = use_rpc;}; public: - StatusCode getMdtRegions(const LVL1::RecMuonRoI* p_roi, + StatusCode getMdtRegions(const LVL1::RecMuonRoI* p_roi, const TrigL2MuonSA::RpcFitResult& rpcFitResult, - TrigL2MuonSA::MuonRoad& muonRoad, - TrigL2MuonSA::MdtRegion& mdtRegion); + TrigL2MuonSA::MuonRoad& muonRoad, + TrigL2MuonSA::MdtRegion& mdtRegion); - StatusCode getMdtRegions(const LVL1::RecMuonRoI* p_roi, + StatusCode getMdtRegions(const LVL1::RecMuonRoI* p_roi, const TrigL2MuonSA::TgcFitResult& tgcFitResult, - TrigL2MuonSA::MuonRoad& muonRoad, - TrigL2MuonSA::MdtRegion& mdtRegion); + TrigL2MuonSA::MuonRoad& muonRoad, + TrigL2MuonSA::MdtRegion& mdtRegion); private: StatusCode prepareTgcPoints(const TrigL2MuonSA::TgcHits& tgcHits); @@ -72,25 +69,25 @@ namespace TrigL2MuonSA { float& etaMin, float& etaMax); void find_phi_min_max(float phiMiddle, float& phiMin, float& phiMax); - void find_station_sector(std::string name, int phi, bool& endcap, int& chamber, int& sector); + void find_station_sector(std::string name, int phi, bool& endcap, int& chamber, int& sector); - StatusCode computePhi(const LVL1::RecMuonRoI* p_roi, + StatusCode computePhi(const LVL1::RecMuonRoI* p_roi, const TrigL2MuonSA::RpcFitResult& rpcFitResult, const TrigL2MuonSA::MdtRegion& mdtRegion, TrigL2MuonSA::MuonRoad& muonRoad); - StatusCode computePhi(const LVL1::RecMuonRoI* p_roi, + StatusCode computePhi(const LVL1::RecMuonRoI* p_roi, const TrigL2MuonSA::TgcFitResult& tgcFitResult, const TrigL2MuonSA::MdtRegion& mdtRegion, TrigL2MuonSA::MuonRoad& muonRoad); private: ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}; - const MuonGM::MuonDetectorManager* m_muonMgr; - const MuonGM::MdtReadoutElement* m_mdtReadout; - const MuonGM::MuonStation* m_muonStation; + const MuonGM::MuonDetectorManager* m_muonMgr {nullptr}; // assined by setMdtGeometry() + const MuonGM::MdtReadoutElement* m_mdtReadout {nullptr}; + const MuonGM::MuonStation* m_muonStation {nullptr}; - bool m_use_rpc; + bool m_use_rpc {true}; TrigL2MuonSA::TgcFit::PointArray m_tgcStripMidPoints; // List of TGC strip middle station points. TrigL2MuonSA::TgcFit::PointArray m_tgcWireMidPoints; // List of TGC wire middle station points. diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/RpcRoadDefiner.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/RpcRoadDefiner.h index 9b7a9cf9c02495942e4d11a13d5ec262a4b57032..b2f5ef5aea48b2754efd44c28056ef27fc1818b8 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/RpcRoadDefiner.h +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/RpcRoadDefiner.h @@ -30,15 +30,12 @@ namespace TrigL2MuonSA { class RpcRoadDefiner: public AthAlgTool { public: - static const InterfaceID& interfaceID(); RpcRoadDefiner(const std::string& type, const std::string& name, const IInterface* parent); - ~RpcRoadDefiner()=default; - virtual StatusCode initialize(); - virtual StatusCode finalize (); + virtual StatusCode initialize() override; public: StatusCode defineRoad(const LVL1::RecMuonRoI* p_roi, @@ -51,19 +48,17 @@ class RpcRoadDefiner: public AthAlgTool double roiEtaMinHigh, double roiEtaMaxHigh); - void setMdtGeometry(const ServiceHandle<IRegSelSvc>& regionSelector); - void setRoadWidthForFailure(double rWidth_RPC_Failed); - void setRpcGeometry(bool use_rpc); + void setMdtGeometry(const ServiceHandle<IRegSelSvc>& regionSelector){ m_regionSelector = regionSelector; }; + void setRoadWidthForFailure(double rWidth_RPC_Failed){ m_rWidth_RPC_Failed = rWidth_RPC_Failed; }; + void setRpcGeometry(bool use_rpc){ m_use_rpc = use_rpc; }; protected: float f(float x, float c0, float c1, float c2, float c3) const; float fp(float x, float c33, float c22, float c1) const; private: - const BarrelRoadData* m_roadData; - - double m_rWidth_RPC_Failed; - bool m_use_rpc; + double m_rWidth_RPC_Failed{0}; + bool m_use_rpc{true}; ServiceHandle<IRegSelSvc> m_regionSelector; ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}; diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/SagittaRadiusEstimate.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/SagittaRadiusEstimate.h index 9fbe6566596e9f19549de67626ed3ec05ad376cf..51f36afad5ca7d4d1b8a56f24f09928395a10212 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/SagittaRadiusEstimate.h +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/SagittaRadiusEstimate.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef TRIGL2MUONSA_SAGITTARADIUSESTIMATE_H @@ -23,21 +23,14 @@ namespace TrigL2MuonSA { { public: - static const InterfaceID& interfaceID(); - SagittaRadiusEstimate(const std::string& type, const std::string& name, const IInterface* parent); - ~SagittaRadiusEstimate(); - - virtual StatusCode initialize(); - virtual StatusCode finalize (); - void setMCFlag(BooleanProperty use_mcLUT, const AlignmentBarrelLUTSvc* alignmentBarrelLUTSvc); - void setUseEndcapInner( BooleanProperty use_endcapInner ); + void setUseEndcapInner( BooleanProperty use_endcapInner ){ m_use_endcapInner = use_endcapInner; }; public: @@ -47,9 +40,9 @@ namespace TrigL2MuonSA { private: - BooleanProperty m_use_mcLUT; + BooleanProperty m_use_mcLUT{0}; - BooleanProperty m_use_endcapInner; + BooleanProperty m_use_endcapInner{0}; const ToolHandle<AlignmentBarrelLUT>* m_alignmentBarrelLUT; diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcDataPreparator.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcDataPreparator.h index 0ec663e82cdf77dedb935a39aaf075e94f0cfb91..46aea41df3602afb8e9ac5ce50a565a7f099046e 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcDataPreparator.h +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcDataPreparator.h @@ -24,7 +24,6 @@ #include "MuonIdHelpers/IMuonIdHelperSvc.h" namespace MuonGM { - class MuonDetectorManager; class TgcReadoutElement; } @@ -44,26 +43,20 @@ class TgcDataPreparator: public AthAlgTool unsigned short int bitpos; }; - public: - - static const InterfaceID& interfaceID(); - public: TgcDataPreparator(const std::string& type, const std::string& name, const IInterface* parent); - ~TgcDataPreparator()=default; - - virtual StatusCode initialize(); + virtual StatusCode initialize() override; StatusCode prepareData(const LVL1::RecMuonRoI* p_roi, TrigL2MuonSA::TgcHits& tgcHits); void setOptions(const TrigL2MuonSA::TgcDataPreparatorOptions& options) { m_options = options; }; - void setRoIBasedDataAccess(bool use_RoIBasedDataAccess); + void setRoIBasedDataAccess(bool use_RoIBasedDataAccess){ m_use_RoIBasedDataAccess = use_RoIBasedDataAccess; }; private: @@ -74,21 +67,19 @@ class TgcDataPreparator: public AthAlgTool private: - const MuonGM::MuonDetectorManager* m_muonMgr; const MuonGM::TgcReadoutElement* m_tgcReadout; ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}; - //ActiveStoreSvc* m_activeStore; - ServiceHandle<ActiveStoreSvc> m_activeStore; - // Cabling (new) MuonTGC_CablingSvc* m_tgcCabling; // Tool handles for BS conversion and Rdo to Prep Data conversion - ToolHandle<Muon::IMuonRawDataProviderTool> m_rawDataProviderTool; + ToolHandle<Muon::IMuonRawDataProviderTool> m_rawDataProviderTool{ + this, "TgcRawDataProvider", "Muon::TGC_RawDataProviderTool/TGC_RawDataProviderTool"}; // Tool for Rdo to Prep Data conversion - ToolHandle<Muon::IMuonRdoToPrepDataTool> m_tgcPrepDataProvider; + ToolHandle<Muon::IMuonRdoToPrepDataTool> m_tgcPrepDataProvider{ + this, "TgcPrepDataProvider", "Muon::TgcRdoToPrepDataTool/TgcPrepDataProviderTool"}; // Region Selector ServiceHandle<IRegSelSvc> m_regionSelector; @@ -97,10 +88,10 @@ class TgcDataPreparator: public AthAlgTool ServiceHandle<IROBDataProviderSvc> m_robDataProvider; // option - TrigL2MuonSA::TgcDataPreparatorOptions m_options; + TrigL2MuonSA::TgcDataPreparatorOptions m_options{}; // utils - TrigL2MuonSA::RecMuonRoIUtils m_recMuonRoIUtils; + TrigL2MuonSA::RecMuonRoIUtils m_recMuonRoIUtils{}; SG::ReadHandleKey<Muon::TgcPrepDataContainer> m_tgcContainerKey{ this, "TGCPrepDataContainer", "TGC_Measurements", "Name of the TGCContainer to read in"}; diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcFit.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcFit.h index a6589bc21b8f223ccf7ded4107c7ce7548677715..d4feeae668eca874e77b104711290307e44269cb 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcFit.h +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcFit.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef TRIGL2MUONSA_TGCFIT_H @@ -149,7 +149,6 @@ class TgcFit: public AthAlgTool }; public: - static const InterfaceID& interfaceID(); /* * Default constuctor. @@ -158,15 +157,7 @@ class TgcFit: public AthAlgTool const std::string& name, const IInterface* parent); - /* - * Default destructor. - */ - - ~TgcFit(void); - - virtual StatusCode initialize(); - virtual StatusCode finalize (); - + // not used void setFitParameters(double CHI2_TEST, unsigned MIN_WIRE_POINTS, unsigned MIN_STRIP_POINTS); @@ -200,11 +191,12 @@ class TgcFit: public AthAlgTool protected: PointArray m_superPoints; /**< List of wire (eta) super-points. */ - double m_CHI2_TEST; /** Test for outliers: w * (value - mean)^2 > CHI2_TEST. */ - unsigned m_MIN_WIRE_POINTS; /**< Minimum number of wire points for linear fit. */ - unsigned m_MIN_STRIP_POINTS; /**< Minimum number of strip points for linear fit. */ - void printDebug(const std::string& str); + double m_CHI2_TEST { 10.0 }; /** Test for outliers: w * (value - mean)^2 > CHI2_TEST. */ + unsigned m_MIN_WIRE_POINTS { 4 }; /**< Minimum number of wire points for linear fit. */ + unsigned m_MIN_STRIP_POINTS { 3 }; /**< Minimum number of strip points for linear fit. */ + + void printDebug(const std::string& str){ ATH_MSG_DEBUG(str); }; }; } diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcRoadDefiner.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcRoadDefiner.h index e1e925aaa593d4c3c2a21becb9551c4e893cc3c1..ebeba873716980305027555c04ff13fccc6e6ce8 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcRoadDefiner.h +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcRoadDefiner.h @@ -30,40 +30,38 @@ namespace TrigL2MuonSA { class TgcRoadDefiner: public AthAlgTool { public: - static const InterfaceID& interfaceID(); - TgcRoadDefiner(const std::string& type, const std::string& name, const IInterface* parent); - - ~TgcRoadDefiner()=default; - virtual StatusCode initialize(); + virtual StatusCode initialize() override; StatusCode defineRoad(const LVL1::RecMuonRoI* p_roi, const TrigL2MuonSA::TgcHits& tgcHits, TrigL2MuonSA::MuonRoad& muonRoad, TrigL2MuonSA::TgcFitResult& tgcFitResult); - void setMdtGeometry(const ServiceHandle<IRegSelSvc>& regionSelector); - void setPtLUT(const TrigL2MuonSA::PtEndcapLUTSvc* ptEndcapLUTSvc); - void setRoadWidthForFailure(double rWidth_TGC_Failed); - void setExtrapolatorTool(ToolHandle<ITrigMuonBackExtrapolator>* backExtrapolator); + void setMdtGeometry(const ServiceHandle<IRegSelSvc>& regionSelector) { m_regionSelector = regionSelector; }; + void setPtLUT(const TrigL2MuonSA::PtEndcapLUTSvc* ptEndcapLUTSvc) { m_ptEndcapLUT = ptEndcapLUTSvc->ptEndcapLUT(); }; + void setRoadWidthForFailure(double rWidth_TGC_Failed) { m_rWidth_TGC_Failed = rWidth_TGC_Failed; }; + void setExtrapolatorTool(ToolHandle<ITrigMuonBackExtrapolator>* backExtrapolator) { m_backExtrapolatorTool = backExtrapolator; }; bool prepareTgcPoints(const TrigL2MuonSA::TgcHits& tgcHits); private: - ToolHandle<ITrigMuonBackExtrapolator>* m_backExtrapolatorTool; - const ToolHandle<PtEndcapLUT>* m_ptEndcapLUT; + // setted in MuFastSteering::hltInitialize, setExtrapolatorTool + ToolHandle<ITrigMuonBackExtrapolator>* m_backExtrapolatorTool {nullptr}; + // setted in MuFastSteering::hltInitialize, setMCFlag + const ToolHandle<PtEndcapLUT>* m_ptEndcapLUT {nullptr}; - ToolHandle<TgcFit> m_tgcFit; + ToolHandle<TgcFit> m_tgcFit {"TrigL2MuonSA::TgcFit"}; TrigL2MuonSA::TgcFit::PointArray m_tgcStripMidPoints; // List of TGC strip middle station points. TrigL2MuonSA::TgcFit::PointArray m_tgcWireMidPoints; // List of TGC wire middle station points. TrigL2MuonSA::TgcFit::PointArray m_tgcStripInnPoints; // List of TGC strip inner station points. TrigL2MuonSA::TgcFit::PointArray m_tgcWireInnPoints; // List of TGC wire inner station points. - double m_rWidth_TGC_Failed; + double m_rWidth_TGC_Failed {0}; ServiceHandle<IRegSelSvc> m_regionSelector; ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}; diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/AlignmentBarrelLUT.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/AlignmentBarrelLUT.cxx index 7e9ccbb798ed201798f2db020e1160c8c93d4f91..c12771e1b30800d84e9d0635c91ab73a4ba1047e 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/AlignmentBarrelLUT.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/AlignmentBarrelLUT.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "TrigL2MuonSA/AlignmentBarrelLUT.h" @@ -10,44 +10,11 @@ // -------------------------------------------------------------------------------- // -------------------------------------------------------------------------------- -static const InterfaceID IID_AlignmentBarrelLUT("IID_AlignmentBarrelLUT", 1, 0); - -const InterfaceID& TrigL2MuonSA::AlignmentBarrelLUT::interfaceID() { return IID_AlignmentBarrelLUT; } - -// -------------------------------------------------------------------------------- -// -------------------------------------------------------------------------------- - TrigL2MuonSA::AlignmentBarrelLUT::AlignmentBarrelLUT(const std::string& type, const std::string& name, const IInterface* parent): AthAlgTool(type, name, parent) { - declareInterface<TrigL2MuonSA::AlignmentBarrelLUT>(this); -} - -// -------------------------------------------------------------------------------- -// -------------------------------------------------------------------------------- - -TrigL2MuonSA::AlignmentBarrelLUT::~AlignmentBarrelLUT() -{ -} - -// -------------------------------------------------------------------------------- -// -------------------------------------------------------------------------------- - -StatusCode TrigL2MuonSA::AlignmentBarrelLUT::initialize() -{ - ATH_MSG_DEBUG("Initializing AlignmentBarrelLUT - package version " << PACKAGE_VERSION) ; - - StatusCode sc; - sc = AthAlgTool::initialize(); - if (!sc.isSuccess()) { - ATH_MSG_ERROR("Could not initialize the AthAlgTool base class."); - return sc; - } - - // - return StatusCode::SUCCESS; } // -------------------------------------------------------------------------------- @@ -62,8 +29,8 @@ StatusCode TrigL2MuonSA::AlignmentBarrelLUT::readLUT(std::string lut_fileName) std::ifstream file; - for(int i_saddress=0; i_saddress<4; i_saddress++) { - for(int i_innerR=0; i_innerR<2; i_innerR++) { + for(int i_saddress=0; i_saddress<s_saddress; i_saddress++) { + for(int i_innerR=0; i_innerR<s_innerR; i_innerR++) { m_NbinEta[i_saddress][i_innerR]=0; m_EtaMin[i_saddress][i_innerR]=0; m_EtaMax[i_saddress][i_innerR]=0; @@ -73,9 +40,9 @@ StatusCode TrigL2MuonSA::AlignmentBarrelLUT::readLUT(std::string lut_fileName) m_PhiMax[i_saddress][i_innerR]=0; m_PhiStep[i_saddress][i_innerR]=0; - for(int i_eta=0; i_eta<15; i_eta++) { - for(int i_phi=0; i_phi<30; i_phi++) { - for(int i_etaQ=0; i_etaQ<2; i_etaQ++) { + for(int i_eta=0; i_eta<s_eta; i_eta++) { + for(int i_phi=0; i_phi<s_phi; i_phi++) { + for(int i_etaQ=0; i_etaQ<s_etaQ; i_etaQ++) { m_dZ[i_saddress][i_innerR][i_eta][i_phi][i_etaQ] = 0; } } @@ -99,9 +66,9 @@ StatusCode TrigL2MuonSA::AlignmentBarrelLUT::readLUT(std::string lut_fileName) m_EtaStep[saddress][innerR] = (m_EtaMax[saddress][innerR] - m_EtaMin[saddress][innerR]) / (float)m_NbinEta[saddress][innerR]; m_PhiStep[saddress][innerR] = (m_PhiMax[saddress][innerR] - m_PhiMin[saddress][innerR]) / (float)m_NbinPhi[saddress][innerR]; - for (int i_eta=0; i_eta<15; i_eta++) { - for (int i_phi=0; i_phi<30; i_phi++) { - for (int i_etaQ=0; i_etaQ<2; i_etaQ++) { + for (int i_eta=0; i_eta<s_eta; i_eta++) { + for (int i_phi=0; i_phi<s_phi; i_phi++) { + for (int i_etaQ=0; i_etaQ<s_etaQ; i_etaQ++) { file >> N0 >> N1 >> N2 >> A0 >> A1 >> A2; @@ -188,17 +155,3 @@ std::pair<int, int> TrigL2MuonSA::AlignmentBarrelLUT::GetBinNumber(int saddress, return std::make_pair(etaBin,phiBin); } - -// -------------------------------------------------------------------------------- -// -------------------------------------------------------------------------------- - -StatusCode TrigL2MuonSA::AlignmentBarrelLUT::finalize() -{ - ATH_MSG_DEBUG("Finalizing AlignmentBarrelLUT - package version " << PACKAGE_VERSION); - - StatusCode sc = AthAlgTool::finalize(); - return sc; -} - -// -------------------------------------------------------------------------------- -// -------------------------------------------------------------------------------- diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/AlignmentBarrelLUTSvc.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/AlignmentBarrelLUTSvc.cxx index d04f84e47ac9845ec7f6d32f1547c7509b85080b..23c6dd7ff5801590894006f07fb04bc49ceb5b3b 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/AlignmentBarrelLUTSvc.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/AlignmentBarrelLUTSvc.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "GaudiKernel/ISvcLocator.h" @@ -9,11 +9,8 @@ #include "AthenaBaseComps/AthMsgStreamMacros.h" -using namespace std; - TrigL2MuonSA::AlignmentBarrelLUTSvc::AlignmentBarrelLUTSvc(const std::string& name,ISvcLocator* sl) : - AthService(name,sl), - m_alignmentBarrelLUT("TrigL2MuonSA::AlignmentBarrelLUT") + AthService(name,sl) { } @@ -36,46 +33,20 @@ StatusCode TrigL2MuonSA::AlignmentBarrelLUTSvc::queryInterface(const InterfaceID StatusCode TrigL2MuonSA::AlignmentBarrelLUTSvc::initialize() { - ATH_MSG_DEBUG("Initializing " << name() << " - package version " << PACKAGE_VERSION); - - StatusCode sc; - - sc = AthService::initialize(); - if ( sc.isFailure() ) return sc; - + // implement the search of LUT trought the pathresolver Tool. std::string lut_fileName = PathResolver::find_file (m_lut_fileName, "DATAPATH"); ATH_MSG_INFO(lut_fileName); - + if (lut_fileName.empty()) { ATH_MSG_ERROR("Cannot find EndcapLUT file " << lut_fileName); return StatusCode::FAILURE; } - - sc = m_alignmentBarrelLUT.retrieve(); - if ( sc.isFailure() ) { - ATH_MSG_ERROR("Could not retrieve " << m_alignmentBarrelLUT); - return sc; - } - ATH_MSG_DEBUG("Retrieved service " << m_alignmentBarrelLUT); - // read LUT - sc = m_alignmentBarrelLUT->readLUT(lut_fileName); - if ( sc.isFailure() ) { - ATH_MSG_ERROR("Failed to read barrel alignment LUT" << lut_fileName); - return sc; - } - - return StatusCode::SUCCESS; -} + ATH_CHECK( m_alignmentBarrelLUT.retrieve() ); -// -------------------------------------------------------------------------------- -// -------------------------------------------------------------------------------- + // read LUT + ATH_CHECK( m_alignmentBarrelLUT->readLUT(lut_fileName) ); -StatusCode TrigL2MuonSA::AlignmentBarrelLUTSvc::finalize() -{ return StatusCode::SUCCESS; -} - -// -------------------------------------------------------------------------------- -// -------------------------------------------------------------------------------- +} diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/AlphaBetaEstimate.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/AlphaBetaEstimate.cxx index 1c1fef6ce9fe8703e7532bc640188191a5a5b364..71db753e207072f16986b3b0ead2b4a9790e18fa 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/AlphaBetaEstimate.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/AlphaBetaEstimate.cxx @@ -1,58 +1,24 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "TrigL2MuonSA/AlphaBetaEstimate.h" -#include "CLHEP/Units/PhysicalConstants.h" +#include <cmath> #include "xAODTrigMuon/TrigMuonDefs.h" #include "AthenaBaseComps/AthMsgStreamMacros.h" -// -------------------------------------------------------------------------------- -// -------------------------------------------------------------------------------- - -static const InterfaceID IID_AlphaBetaEstimate("IID_AlphaBetaEstimate", 1, 0); - -const InterfaceID& TrigL2MuonSA::AlphaBetaEstimate::interfaceID() { return IID_AlphaBetaEstimate; } - // -------------------------------------------------------------------------------- // -------------------------------------------------------------------------------- TrigL2MuonSA::AlphaBetaEstimate::AlphaBetaEstimate(const std::string& type, const std::string& name, const IInterface* parent): - AthAlgTool(type, name, parent), - m_ptEndcapLUT(0) -{ - declareInterface<TrigL2MuonSA::AlphaBetaEstimate>(this); -} - -// -------------------------------------------------------------------------------- -// -------------------------------------------------------------------------------- - -TrigL2MuonSA::AlphaBetaEstimate::~AlphaBetaEstimate() -{ -} - -// -------------------------------------------------------------------------------- -// -------------------------------------------------------------------------------- - -StatusCode TrigL2MuonSA::AlphaBetaEstimate::initialize() + AthAlgTool(type, name, parent) { - ATH_MSG_DEBUG("Initializing AlphaBetaEstimate - package version " << PACKAGE_VERSION) ; - - StatusCode sc; - sc = AthAlgTool::initialize(); - if (!sc.isSuccess()) { - ATH_MSG_ERROR("Could not initialize the AthAlgTool base class."); - return sc; - } - - // - return StatusCode::SUCCESS; } // -------------------------------------------------------------------------------- @@ -74,7 +40,7 @@ StatusCode TrigL2MuonSA::AlphaBetaEstimate::setAlphaBeta(const LVL1::RecMuonRoI* const TrigL2MuonSA::MuonRoad& /*muonRoad*/) { const int MAX_STATION = 6; - const double PHI_RANGE = 12./(CLHEP::pi/8.); + const double PHI_RANGE = 12./(M_PI/8.); // computing ALPHA, BETA and RADIUS float InnerSlope = 0; @@ -147,11 +113,11 @@ StatusCode TrigL2MuonSA::AlphaBetaEstimate::setAlphaBeta(const LVL1::RecMuonRoI* if ( isZero(tgcFitResult.tgcMid1[3]) || isZero(tgcFitResult.tgcMid2[3]) ) { if ( !isZero(tgcFitResult.tgcMid1[3]) ) phi = phi1; if ( !isZero(tgcFitResult.tgcMid2[3]) ) phi = phi2; - } else if( phi1*phi2 < 0 && std::abs(phi1)>(CLHEP::pi/2.) ) { - double tmp1 = (phi1>0)? phi1 - CLHEP::pi : phi1 + CLHEP::pi; - double tmp2 = (phi2>0)? phi2 - CLHEP::pi : phi2 + CLHEP::pi; + } else if( phi1*phi2 < 0 && std::abs(phi1)>(M_PI/2.) ) { + double tmp1 = (phi1>0)? phi1 - M_PI : phi1 + M_PI; + double tmp2 = (phi2>0)? phi2 - M_PI : phi2 + M_PI; double tmp = (tmp1+tmp2)/2.; - phi = (tmp>0.)? tmp - CLHEP::pi : tmp + CLHEP::pi; + phi = (tmp>0.)? tmp - M_PI : tmp + M_PI; } else { phi = (phi2+phi1)/2.; } @@ -181,13 +147,13 @@ StatusCode TrigL2MuonSA::AlphaBetaEstimate::setAlphaBeta(const LVL1::RecMuonRoI* else if ( !isZero(InnerZ) ) trackPattern.etaMap = etaInner; if ( !isZero(tgcFitResult.tgcInn[3]) ) phi = tgcFitResult.tgcInn[1]; - if ( phim > CLHEP::pi+0.1 ) phim = phim - 2*CLHEP::pi; + if ( phim > M_PI+0.1 ) phim = phim - 2*M_PI; if ( phim >= 0 ) trackPattern.phiMap = (phi>=0.)? phi - phim : phim - fabs(phi); else trackPattern.phiMap = phi - phim; - int Octant = (int)(tgcFitResult.tgcMid1[1] / (CLHEP::pi/4.)); - double PhiInOctant = fabs(tgcFitResult.tgcMid1[1] - Octant * (CLHEP::pi/4.)); - if (PhiInOctant > (CLHEP::pi/8.)) PhiInOctant = (CLHEP::pi/4.) - PhiInOctant; + int Octant = (int)(tgcFitResult.tgcMid1[1] / (M_PI/4.)); + double PhiInOctant = fabs(tgcFitResult.tgcMid1[1] - Octant * (M_PI/4.)); + if (PhiInOctant > (M_PI/8.)) PhiInOctant = (M_PI/4.) - PhiInOctant; trackPattern.endcapBeta = 0.0; trackPattern.phiMS = phi; @@ -197,8 +163,8 @@ StatusCode TrigL2MuonSA::AlphaBetaEstimate::setAlphaBeta(const LVL1::RecMuonRoI* trackPattern.phiBin = static_cast<int>(PhiInOctant * PHI_RANGE); trackPattern.etaBin = static_cast<int>((fabs(tgcFitResult.tgcMid1[0])-1.)/0.05); - double phiEE = (tgcFitResult.tgcMid1[1]>0) ? tgcFitResult.tgcMid1[1] : tgcFitResult.tgcMid1[1] + 2*CLHEP::pi; - trackPattern.phiBinEE = static_cast<int> (phiEE*96/CLHEP::pi); + double phiEE = (tgcFitResult.tgcMid1[1]>0) ? tgcFitResult.tgcMid1[1] : tgcFitResult.tgcMid1[1] + 2*M_PI; + trackPattern.phiBinEE = static_cast<int> (phiEE*96/M_PI); } else { // TGC data readout problem -> use RoI (eta, phi) and assume straight track @@ -206,13 +172,13 @@ StatusCode TrigL2MuonSA::AlphaBetaEstimate::setAlphaBeta(const LVL1::RecMuonRoI* trackPattern.etaMap = p_roi->eta(); phi = p_roi->phi(); - if ( phim > CLHEP::pi+0.1 ) phim = phim - 2*CLHEP::pi; + if ( phim > M_PI+0.1 ) phim = phim - 2*M_PI; if ( phim >= 0 ) trackPattern.phiMap = (phi>=0.)? phi - phim : phim - fabs(phi); else trackPattern.phiMap = phi - phim; - int Octant = (int)(p_roi->phi() / (CLHEP::pi/4.)); - double PhiInOctant = fabs(p_roi->phi() - Octant * (CLHEP::pi/4.)); - if (PhiInOctant > (CLHEP::pi/8.)) PhiInOctant = (CLHEP::pi/4.) - PhiInOctant; + int Octant = (int)(p_roi->phi() / (M_PI/4.)); + double PhiInOctant = fabs(p_roi->phi() - Octant * (M_PI/4.)); + if (PhiInOctant > (M_PI/8.)) PhiInOctant = (M_PI/4.) - PhiInOctant; trackPattern.endcapBeta = 0.0; trackPattern.phiMS = phi; @@ -222,8 +188,8 @@ StatusCode TrigL2MuonSA::AlphaBetaEstimate::setAlphaBeta(const LVL1::RecMuonRoI* trackPattern.phiBin = static_cast<int>(PhiInOctant * PHI_RANGE); trackPattern.etaBin = static_cast<int>((fabs(p_roi->eta())-1.)/0.05); - double phiEE = (p_roi->phi()>0) ? p_roi->phi() : p_roi->phi() + 2*CLHEP::pi; - trackPattern.phiBinEE = static_cast<int> (phiEE*96/CLHEP::pi); + double phiEE = (p_roi->phi()>0) ? p_roi->phi() : p_roi->phi() + 2*M_PI; + trackPattern.phiBinEE = static_cast<int> (phiEE*96/M_PI); } @@ -391,17 +357,3 @@ double TrigL2MuonSA::AlphaBetaEstimate::calcDistance(double x1,double y1,double double d=fabs(b)/sqrt(a*a+1); return d; } - -// -------------------------------------------------------------------------------- -// -------------------------------------------------------------------------------- - -StatusCode TrigL2MuonSA::AlphaBetaEstimate::finalize() -{ - ATH_MSG_DEBUG("Finalizing AlphaBetaEstimate - package version " << PACKAGE_VERSION); - - StatusCode sc = AthAlgTool::finalize(); - return sc; -} - -// -------------------------------------------------------------------------------- -// -------------------------------------------------------------------------------- diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscDataPreparator.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscDataPreparator.cxx index 7a87e4d61a95b771b8c8cb0d1e2ce5bcfa6784df..23586ce55052d82366c96f81af683ae4c021203d 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscDataPreparator.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscDataPreparator.cxx @@ -5,22 +5,15 @@ #include "TrigL2MuonSA/CscDataPreparator.h" #include "StoreGate/ActiveStoreSvc.h" -#include "CLHEP/Units/PhysicalConstants.h" #include "xAODTrigMuon/TrigMuonDefs.h" #include "TrigSteeringEvent/TrigRoiDescriptor.h" #include "AthenaBaseComps/AthMsgStreamMacros.h" -using namespace Muon; - // -------------------------------------------------------------------------------- // -------------------------------------------------------------------------------- -static const InterfaceID IID_CscDataPreparator("IID_CscDataPreparator", 1, 0); bool IsUnspoiled ( Muon::CscClusterStatus status ); - -const InterfaceID& TrigL2MuonSA::CscDataPreparator::interfaceID() { return IID_CscDataPreparator; } - // -------------------------------------------------------------------------------- // -------------------------------------------------------------------------------- @@ -28,15 +21,8 @@ TrigL2MuonSA::CscDataPreparator::CscDataPreparator(const std::string& type, const std::string& name, const IInterface* parent): AthAlgTool(type,name,parent), - m_regionSelector( "RegSelSvc", name ), - m_rawDataProviderTool("Muon::CSC_RawDataProviderTool/CSC_RawDataProviderTool"), - m_cscPrepDataProvider("Muon::CscRdoToCscPrepDataTool/CscPrepDataProviderTool"), - m_cscClusterProvider("CscThresholdClusterBuilderTool") + m_regionSelector( "RegSelSvc", name ) { - declareInterface<TrigL2MuonSA::CscDataPreparator>(this); - declareProperty("CscRawDataProvider", m_rawDataProviderTool); - declareProperty("CscPrepDataProvider", m_cscPrepDataProvider); - declareProperty("CscClusterProvider", m_cscClusterProvider); } // -------------------------------------------------------------------------------- @@ -77,22 +63,13 @@ StatusCode TrigL2MuonSA::CscDataPreparator::initialize() ATH_CHECK(m_cscPrepContainerKey.initialize(!m_cscPrepContainerKey.empty())); - // + // return StatusCode::SUCCESS; } // -------------------------------------------------------------------------------- // -------------------------------------------------------------------------------- -void TrigL2MuonSA::CscDataPreparator::setRoIBasedDataAccess(bool use_RoIBasedDataAccess) -{ - m_use_RoIBasedDataAccess = use_RoIBasedDataAccess; - return; -} - -// -------------------------------------------------------------------------------- -// -------------------------------------------------------------------------------- - StatusCode TrigL2MuonSA::CscDataPreparator::prepareData(const TrigRoiDescriptor* p_roids, TrigL2MuonSA::MuonRoad& muonRoad, TrigL2MuonSA::CscHits& cscHits) @@ -152,26 +129,19 @@ StatusCode TrigL2MuonSA::CscDataPreparator::prepareData(const TrigRoiDescriptor* // Get CSC container if(!m_cscPrepContainerKey.empty() &&(!m_doDecoding || to_full_decode || !cscHashIDs.empty() )){ auto cscPrepContainerHandle = SG::makeHandle(m_cscPrepContainerKey); - const CscPrepDataContainer* cscPrepContainer = cscPrepContainerHandle.cptr(); + const Muon::CscPrepDataContainer* cscPrepContainer = cscPrepContainerHandle.cptr(); if (!cscPrepContainerHandle.isValid()) { ATH_MSG_ERROR("Cannot retrieve CSC PRD Container key: " << m_cscPrepContainerKey.key()); return StatusCode::FAILURE; } - // Loop over collections - CscPrepDataContainer::const_iterator it = cscPrepContainer->begin(); - CscPrepDataContainer::const_iterator it_end = cscPrepContainer->end(); - for( ; it != it_end; ++it ){ - const Muon::CscPrepDataCollection* col = *it; - if( !col ) continue; + // Loop over collections + for( const Muon::CscPrepDataCollection* cscCol : *cscPrepContainer ){ + if( cscCol==nullptr ) continue; + cscHits.reserve( cscHits.size() + cscCol->size() ); // Loop over data in the collection - Muon::CscPrepDataCollection::const_iterator cit = col->begin(); - Muon::CscPrepDataCollection::const_iterator cit_end = col->end(); - for( ; cit != cit_end; ++cit ){ - if( !*cit ) continue; - - // Data in the collection - const Muon::CscPrepData& prepData = **cit; + for( const Muon::CscPrepData* prepData : *cscCol ) { + if( prepData==nullptr ) continue; // Road info int chamber = xAOD::L2MuonParameters::Chamber::CSC; @@ -181,29 +151,29 @@ StatusCode TrigL2MuonSA::CscDataPreparator::prepareData(const TrigRoiDescriptor* double phiw = muonRoad.phi[4][0];//roi_descriptor->phi(); //muonRoad.phi[chamber][0]; //cluster status - bool isunspoiled = IsUnspoiled (prepData.status()); + bool isunspoiled = IsUnspoiled (prepData->status()); // Create new digit TrigL2MuonSA::CscHitData cscHit; - cscHit.StationName = m_idHelperSvc->cscIdHelper().stationName( prepData.identify() ); - cscHit.StationEta = m_idHelperSvc->cscIdHelper().stationEta( prepData.identify() ); - cscHit.StationPhi = m_idHelperSvc->cscIdHelper().stationPhi( prepData.identify() ); + cscHit.StationName = m_idHelperSvc->cscIdHelper().stationName( prepData->identify() ); + cscHit.StationEta = m_idHelperSvc->cscIdHelper().stationEta( prepData->identify() ); + cscHit.StationPhi = m_idHelperSvc->cscIdHelper().stationPhi( prepData->identify() ); cscHit.ChamberLayer = (true==isunspoiled) ? 1 : 0; - cscHit.WireLayer = m_idHelperSvc->cscIdHelper().wireLayer( prepData.identify() ); - cscHit.MeasuresPhi = m_idHelperSvc->cscIdHelper().measuresPhi( prepData.identify() ); - cscHit.Strip = m_idHelperSvc->cscIdHelper().strip( prepData.identify() ); + cscHit.WireLayer = m_idHelperSvc->cscIdHelper().wireLayer( prepData->identify() ); + cscHit.MeasuresPhi = m_idHelperSvc->cscIdHelper().measuresPhi( prepData->identify() ); + cscHit.Strip = m_idHelperSvc->cscIdHelper().strip( prepData->identify() ); cscHit.Chamber = chamber; cscHit.StripId = (cscHit.StationName << 18) | ((cscHit.StationEta + 2) << 16) | (cscHit.StationPhi << 12) | (cscHit.WireLayer << 9) | (cscHit.MeasuresPhi << 8) | (cscHit.Strip); - cscHit.eta = prepData.globalPosition().eta(); - cscHit.phi = prepData.globalPosition().phi(); - cscHit.r = prepData.globalPosition().perp(); - cscHit.z = prepData.globalPosition().z(); - cscHit.charge = prepData.charge(); - cscHit.time = prepData.time(); - cscHit.resolution = sqrt( prepData.localCovariance()(0,0) ); + cscHit.eta = prepData->globalPosition().eta(); + cscHit.phi = prepData->globalPosition().phi(); + cscHit.r = prepData->globalPosition().perp(); + cscHit.z = prepData->globalPosition().z(); + cscHit.charge = prepData->charge(); + cscHit.time = prepData->time(); + cscHit.resolution = sqrt( prepData->localCovariance()(0,0) ); cscHit.Residual = ( cscHit.MeasuresPhi==0 ) ? calc_residual( aw, bw, cscHit.z, cscHit.r ) : calc_residual_phi( aw,bw,phiw, cscHit.phi, cscHit.z); cscHit.isOutlier = 0; /*if( fabs(cscHit.Residual) > rWidth ) { diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscRegUtils.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscRegUtils.cxx index 6bdc41a67f9996f263382cefa16d6d8803216d2c..3aa88f323f9798ca8576b6e73978c21293415a15 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscRegUtils.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscRegUtils.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ @@ -10,46 +10,28 @@ #include <cmath> -static const InterfaceID IID_CscRegDict("IID_CscRegDict", 1, 0); - namespace TrigL2MuonSA{ -const InterfaceID& CscRegDict :: interfaceID(){ return IID_CscRegDict; } - - CscRegDict :: CscRegDict(const std::string &type, const std::string &name, const IInterface *parent) : AthAlgTool(type,name,parent), - m_util(0) + m_util() { - declareInterface<TrigL2MuonSA::CscRegDict>(this); } -CscRegDict :: ~CscRegDict(){ } - - StatusCode CscRegDict :: initialize(){ - ATH_MSG_DEBUG("Initializing TrigL2MuonSA::CscRegDict - package version " << PACKAGE_VERSION ); - - StatusCode sc = AthAlgTool::initialize(); - if (!sc.isSuccess()) { - ATH_MSG_ERROR( "Could not initialize the AthAlgTool base class." ); - return sc; - } - - if (!m_util) m_util = new UtilTools(); int i=0; - - //small sector + + //small sector const double SPwid = 0.32369; const double Setamin = 1.97667; const double Setamax = 2.76781; const double SDisplace = (7441.+7518.)/2.;//7428.3; const double SAtanNormal = 0.20223129856437; - - //Cside Small + + //Cside Small for (int phi=0; phi<8; ++phi) { m_reg_dict[i].etaMin=(-1)*Setamax; m_reg_dict[i].etaMax=(-1)*Setamin; @@ -63,10 +45,10 @@ StatusCode CscRegDict :: initialize(){ ATH_MSG_DEBUG( "CscRegDict: hash= " << i << " StationName=" << stationName(i) << " StationEta=" << stationEta(i) << " StationPhi=" << stationPhi(i) << " eta:[" << m_reg_dict[i].etaMin << "," << m_reg_dict[i].etaMax << "]" << " phi:[" << m_reg_dict[i].phiMin << "," << m_reg_dict[i].phiMax << "]" - << " theta:[" << m_util->calc_theta(m_reg_dict[i].etaMin) << "," << m_util->calc_theta(m_reg_dict[i].etaMax) << "]"); + << " theta:[" << m_util.calc_theta(m_reg_dict[i].etaMin) << "," << m_util.calc_theta(m_reg_dict[i].etaMax) << "]"); ++i; } - //Aside Small + //Aside Small for (int phi=0; phi<8; ++phi) { m_reg_dict[i].etaMin=Setamin; m_reg_dict[i].etaMax=Setamax; @@ -80,20 +62,19 @@ StatusCode CscRegDict :: initialize(){ ATH_MSG_DEBUG( "CscRegDict: hash= " << i << " StationName=" << stationName(i) << " StationEta=" << stationEta(i) << " StationPhi=" << stationPhi(i) << " eta:[" << m_reg_dict[i].etaMin << "," << m_reg_dict[i].etaMax << "]" << " phi:[" << m_reg_dict[i].phiMin << "," << m_reg_dict[i].phiMax << "]" - << " theta:[" << m_util->calc_theta(m_reg_dict[i].etaMin) << "," << m_util->calc_theta(m_reg_dict[i].etaMax) << "]"); + << " theta:[" << m_util.calc_theta(m_reg_dict[i].etaMin) << "," << m_util.calc_theta(m_reg_dict[i].etaMax) << "]"); ++i; } - - - - //large sector + + + //large sector const double LPwid = 0.514507; const double Letamin = 2.01471; const double Letamax = 2.75914; const double LDisplace = (7800.+7880.)/2.;//7789.6; const double LAtanNormal = 0.20223129856437; - - //Cside Large + + //Cside Large for (int phi=0; phi<8; ++phi) { m_reg_dict[i].etaMin=(-1)*Letamax; m_reg_dict[i].etaMax=(-1)*Letamin; @@ -107,7 +88,7 @@ StatusCode CscRegDict :: initialize(){ ATH_MSG_DEBUG( "CscRegDict: hash= " << i << " StationName=" << stationName(i) << " StationEta=" << stationEta(i) << " StationPhi=" << stationPhi(i) << " eta:[" << m_reg_dict[i].etaMin << "," << m_reg_dict[i].etaMax << "]" << " phi:[" << m_reg_dict[i].phiMin << "," << m_reg_dict[i].phiMax << "]" - << " theta:[" << m_util->calc_theta(m_reg_dict[i].etaMin) << "," << m_util->calc_theta(m_reg_dict[i].etaMax) << "]"); + << " theta:[" << m_util.calc_theta(m_reg_dict[i].etaMin) << "," << m_util.calc_theta(m_reg_dict[i].etaMax) << "]"); ++i; } //Aside Large @@ -124,36 +105,25 @@ StatusCode CscRegDict :: initialize(){ ATH_MSG_DEBUG( "CscRegDict: hash= " << i << " StationName=" << stationName(i) << " StationEta=" << stationEta(i) << " StationPhi=" << stationPhi(i) << " eta:[" << m_reg_dict[i].etaMin << "," << m_reg_dict[i].etaMax << "]" << " phi:[" << m_reg_dict[i].phiMin << "," << m_reg_dict[i].phiMax << "]" - << " theta:[" << m_util->calc_theta(m_reg_dict[i].etaMin) << "," << m_util->calc_theta(m_reg_dict[i].etaMax) << "]"); + << " theta:[" << m_util.calc_theta(m_reg_dict[i].etaMin) << "," << m_util.calc_theta(m_reg_dict[i].etaMax) << "]"); ++i; } /* - ATH_MSG_DEBUG( "m_isMC=" << m_isMC ); + ATH_MSG_DEBUG( "m_isMC=" << m_isMC ); if (!m_isMC){ initializePosCorrectionParameters(); initializeDictionaryForData(); } */ initializeHashDictionary(); - - - return StatusCode::SUCCESS; -} -StatusCode CscRegDict :: finalize(){ - ATH_MSG_DEBUG("Finalizing CscRegDict - package version " << PACKAGE_VERSION); - - delete m_util; m_util=0; - return StatusCode::SUCCESS; } - int CscRegDict :: get_hash(int stationname, int stationeta, int stationphi){ - - + int sname, seta, sphi; if (stationname == 50 || stationname == 51) sname = stationname-50; else { ATH_MSG_DEBUG( "stationname is out of [50,51]"); @@ -169,14 +139,11 @@ int CscRegDict :: get_hash(int stationname, int stationeta, int stationphi){ } return m_module_hashes[sname][seta][sphi]; - } - - double CscRegDict :: PhiConv(double phi){ if (phi>M_PI) { diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscSegmentMaker.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscSegmentMaker.cxx index ec8882e83ff86ebec9a8686dd589176f07624ba9..a66f0c5ba71140318ac60916e7a19990980d12ef 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscSegmentMaker.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/CscSegmentMaker.cxx @@ -1,12 +1,10 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ -#ifndef XAOD_ANALYSIS #include "MuonReadoutGeometry/CscReadoutElement.h" #include "MuonReadoutGeometry/MuonDetectorManager.h" -#endif #include "TrigL2MuonSA/CscSegmentMaker.h" #include "AthenaBaseComps/AthMsgStreamMacros.h" @@ -15,74 +13,27 @@ #include "xAODTrigMuon/TrigMuonDefs.h" #include <cmath> -static const InterfaceID IID_CscSegmentMaker("IID_CscSegmentMaker", 1, 0); - - namespace TrigL2MuonSA { - -const InterfaceID& CscSegmentMaker::interfaceID() { return IID_CscSegmentMaker; } - - CscSegmentMaker::CscSegmentMaker(const std::string& type, const std::string& name, const IInterface* parent) - : AthAlgTool(type, name, parent), - m_util(0) -#ifndef XAOD_ANALYSIS - ,m_muonMgr(0) -#endif + : AthAlgTool(type, name, parent), + m_util() { - declareInterface<TrigL2MuonSA::CscSegmentMaker>(this); } -CscSegmentMaker :: ~CscSegmentMaker(){} - - StatusCode CscSegmentMaker :: initialize(){ - ATH_MSG_DEBUG("Initializing TrigL2MuonSA::CscSegmentMaker - package version " << PACKAGE_VERSION); - - StatusCode sc = AthAlgTool::initialize(); - if(!sc.isSuccess()) { - ATH_MSG_ERROR("Could not initialize the AthAlgTool base class."); - return sc; - } - - if (!m_util) m_util = new UtilTools(); - sc = m_cscregdict.retrieve(); - if(!sc.isSuccess()) { - ATH_MSG_ERROR("Could not initialize CscRegDict"); - return sc; - } - -#ifndef XAOD_ANALYSIS - if(detStore()->retrieve(m_muonMgr).isFailure()){ - ATH_MSG_WARNING("Cannot retrieve MuonDetectorManager"); - return StatusCode::SUCCESS; - } -#endif - - - - return StatusCode::SUCCESS; -} + ATH_CHECK( m_cscregdict.retrieve() ); + ATH_CHECK( detStore()->retrieve(m_muonMgr) ); -StatusCode CscSegmentMaker :: finalize(){ - ATH_MSG_DEBUG("Finalizing TgcRoadDefiner - package version " << PACKAGE_VERSION); - - delete m_util; m_util=0; - - StatusCode sc = AthAlgTool::finalize(); - - return sc; + return StatusCode::SUCCESS; } - - ReturnCode CscSegmentMaker :: FindSuperPointCsc( const TrigL2MuonSA::CscHits &cscHits, std::vector<TrigL2MuonSA::TrackPattern> &v_trackPatterns, const TrigL2MuonSA::TgcFitResult &tgcFitResult, @@ -95,14 +46,14 @@ ReturnCode CscSegmentMaker :: FindSuperPointCsc( const TrigL2MuonSA::CscHits &cs std::vector<TrigL2MuonSA::TrackPattern>::iterator itTrack; for (itTrack=v_trackPatterns.begin(); itTrack!=v_trackPatterns.end(); itTrack++) { // loop for track candidates - //get module hash to read + //get module hash to read int hash_clusters[32]={0}; TrigL2MuonSA::CscHits clusters[32][8]; for(unsigned int iclu=0; iclu<cscHits.size(); ++iclu){ const TrigL2MuonSA::CscHitData &cscHit = cscHits[iclu]; - //outlier or not + //outlier or not double width = (cscHit.MeasuresPhi == 0 ) ? m_max_residual_eta : m_max_residual_phi; if ( width < fabs(cscHit.Residual) ) continue; @@ -119,7 +70,7 @@ ReturnCode CscSegmentMaker :: FindSuperPointCsc( const TrigL2MuonSA::CscHits &cs }//for clusters - //decide which module to read + //decide which module to read int hashSPs[2]={999,999}; if( getModuleSP( hashSPs, tgcFitResult, (*itTrack).phiBin, muroad, hash_clusters)!=ReturnCode::FAILURE ){ @@ -158,7 +109,7 @@ ReturnCode CscSegmentMaker :: FindSuperPointCsc( const TrigL2MuonSA::CscHits &cs double CSCR=cscsegment_ext.x()*cos(phiMod)+cscsegment_ext.y()*sin(phiMod); double CSCZ=cscsegment_ext.z(); double PhiAtCsc = phimiddle/* - fabs(CSCZ-tgcmidZ)*dPhidz*/; - double CSCSPR = CSCR/cos( m_util->calc_dphi(PhiAtCsc,phiMod) ); + double CSCSPR = CSCR/cos( m_util.calc_dphi(PhiAtCsc,phiMod) ); superPoint->Z = CSCZ; @@ -174,7 +125,7 @@ ReturnCode CscSegmentMaker :: FindSuperPointCsc( const TrigL2MuonSA::CscHits &cs //calculate outerSP's correction (dphidz of tgcFitResult) double phiouter = phimiddle+fabs(outerz-tgcmidZ)*dPhidz; - outerCorFactor = cos( m_util->calc_dphi(phiouter,phiMod) )/cos( m_util->calc_dphi(phimiddle,phiMod) ); + outerCorFactor = cos( m_util.calc_dphi(phiouter,phiMod) )/cos( m_util.calc_dphi(phimiddle,phiMod) ); ATH_MSG_DEBUG("outerCorFactor=" << outerCorFactor); }//if there is a segment. @@ -206,7 +157,6 @@ ReturnCode CscSegmentMaker :: make_segment(int mod_hash, TrigL2MuonSA::CscHits Amg::Transform3D gToLocal; -#ifndef XAOD_ANALYSIS if(m_use_geometry){ const CscIdHelper *idHelper = m_muonMgr->cscIdHelper(); @@ -219,16 +169,13 @@ ReturnCode CscSegmentMaker :: make_segment(int mod_hash, TrigL2MuonSA::CscHits ATH_MSG_DEBUG("CscReadoutElement"); gToLocal = csc->GlobalToAmdbLRSTransform(); }else{ -#endif double rotpi = (m_cscregdict->stationEta(mod_hash)>0) ? -M_PI/2. : M_PI/2.; Amg::AngleAxis3D rotZamg( (-1)*(m_cscregdict->phiMod(mod_hash)), Amg::Vector3D(0,0,1)); Amg::AngleAxis3D rotYamg( (-1)*(m_cscregdict->actualAtanNormal(mod_hash)), Amg::Vector3D(0,1,0) ); Amg::AngleAxis3D rotPIamg( rotpi, Amg::Vector3D(0,0,1)); Amg::Translation3D translation( 0.0, 0.0, (-1)*(m_cscregdict->displacement(mod_hash)) ); gToLocal=translation*rotPIamg*rotYamg*rotZamg; -#ifndef XAOD_ANALYSIS } -#endif localCscHit ip_loc; @@ -250,7 +197,6 @@ ReturnCode CscSegmentMaker :: make_segment(int mod_hash, TrigL2MuonSA::CscHits double r = cschit.r; double phi = cschit.phi; double z = cschit.z; - //l1id=cschit.m_l1id; //move to local coordinate system Amg::Vector3D vect(r*cos(phi),r*sin(phi),z); @@ -262,9 +208,8 @@ ReturnCode CscSegmentMaker :: make_segment(int mod_hash, TrigL2MuonSA::CscHits loc_hit.loc_y = loc_vect(Amg::y); loc_hit.loc_z = loc_vect(Amg::z); loc_hit.measphi=cschit.MeasuresPhi; - loc_hit.error = (loc_hit.measphi==0) ? m_err_eta : m_err_phi;//cschit.eta; + loc_hit.error = (loc_hit.measphi==0) ? m_err_eta : m_err_phi; loc_hit.residual = cschit.Residual; - //loc_hit.index4=ihit; not used loc_hit.enabled=true; loc_hit.isIP=false; loc_hit.stationname=cschit.StationName; @@ -306,11 +251,9 @@ ReturnCode CscSegmentMaker :: make_segment(int mod_hash, TrigL2MuonSA::CscHits cscsegment.set(seg_pos,seg_dir, seg2d_eta.chi2, seg2d_phi.chi2); cscsegment.setNHitEta(seg2d_eta.nhit); cscsegment.setNHitPhi(seg2d_phi.nhit); - //cscsegment.setL1id(l1id); cscsegment_noip.set(seg_pos_noip,seg_dir_noip, seg2d_eta_noip.chi2, seg2d_phi_noip.chi2); cscsegment_noip.setNHitEta(seg2d_eta_noip.nhit); cscsegment_noip.setNHitPhi(seg2d_phi_noip.nhit); - //cscsegment_noip.setL1id(l1id); return ReturnCode::SUCCESS; @@ -555,8 +498,6 @@ ReturnCode CscSegmentMaker :: fit_clusters(int measphi, const std::vector<localC seg2d.zshift=rp/rq; seg2d.residual=aver_res/rq; - //int outlier=1; not used - //double displace=99999.; not used for (unsigned int ihit=0; ihit< hits_fit.size(); ++ihit) { @@ -570,16 +511,9 @@ ReturnCode CscSegmentMaker :: fit_clusters(int measphi, const std::vector<localC Sxx += w*x*x; Syy += w*y*y; Sxy += w*x*y; - //double displace_tmp = fabs( seg2d.residual - w*x); - /*obsolete - if( !hits_fit[ihit].isIP && displace>displace_tmp ){ - displace = displace_tmp; - outlier = ihit;//most distant hit as outlier - }*/ }//ihit - // seg2d.outlier=outlier; if(nhit_with_ip>1){ @@ -656,7 +590,7 @@ ReturnCode CscSegmentMaker :: getModuleSP(int mod_hashes[2], const TrigL2MuonSA: int stationeta = m_cscregdict->stationEta(imod); int side = (muroad.side) ? 1 : -1; double phiMod = m_cscregdict->phiMod(imod); - double dphi = m_util->calc_dphi(phiMod, tgcFitResult.phi); + double dphi = m_util.calc_dphi(phiMod, tgcFitResult.phi); ATH_MSG_DEBUG("getModuleSP()::(phi,side) modlue:(" << phiMod << "," << stationeta << ") tgcroad:(" << tgcFitResult.phi << "," << side << ")"); if( fabs(dphi)>M_PI/8. || side != stationeta) continue; @@ -700,9 +634,6 @@ CscSegment CscSegmentMaker :: segmentAtFirstLayer(int mod_hash, TrigL2MuonSA::Cs double b0=mu_seg->x(), b1=mu_seg->y(),b2=mu_seg->z(); double t = ( alpha-(n(0)*b0+n(1)*b1+n(2)*b2) )/( n(0)*a0+n(1)*a1+n(2)*a2 ); double x0=a0*t+b0,x1=a1*t+b1,x2=a2*t+b2; - //double phiMod=m_cscregdict->phiMod(mod_hash); - //double slope=( (a0*cos(phiMod)+a1*sin(phiMod))/a2 ); - //double intercept= x0*cos(phiMod)+x1*sin(phiMod) + slope*x2 ; double chisquare=mu_seg->chiSquare(); double chisquare_phi=mu_seg->chiSquarePhi(); @@ -750,10 +681,6 @@ CscSegment :: CscSegment(){ m_chisquare_phi=0.; } -CscSegment :: ~CscSegment(){} - - - ReturnCode CscSegment :: set(double x, double y, double z, double px, double py, double pz, double chisquare, double chisquare_phi) { diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MdtDataPreparator.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MdtDataPreparator.cxx index acc48b43e3be16bd21cd48fe8a3bec8f0a2a07ea..1812493f0c191b59287a70a1548a9eeda0c9bc88 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MdtDataPreparator.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MdtDataPreparator.cxx @@ -8,7 +8,7 @@ #include "MuonRDO/MdtCsmContainer.h" -#include "CLHEP/Units/PhysicalConstants.h" +#include <cmath> #include "Identifier/IdentifierHash.h" #include "MuonCnvToolInterfaces/IMuonRawDataProviderTool.h" @@ -36,16 +36,6 @@ #include "AthenaBaseComps/AthMsgStreamMacros.h" -using namespace Muon; -using namespace MuonGM; - -// -------------------------------------------------------------------------------- -// -------------------------------------------------------------------------------- - -static const InterfaceID IID_MdtDataPreparator("IID_MdtDataPreparator", 1, 0); - -const InterfaceID& TrigL2MuonSA::MdtDataPreparator::interfaceID() { return IID_MdtDataPreparator; } - // -------------------------------------------------------------------------------- // -------------------------------------------------------------------------------- @@ -53,21 +43,13 @@ TrigL2MuonSA::MdtDataPreparator::MdtDataPreparator(const std::string& type, const std::string& name, const IInterface* parent): AthAlgTool(type,name,parent), - m_activeStore( "ActiveStoreSvc", name ), - m_mdtRawDataProvider("Muon::MDT_RawDataProviderTool"), m_regionSelector("RegSelSvc", name ), m_robDataProvider("ROBDataProviderSvc", name), m_recMuonRoIUtils(), - m_mdtRegionDefiner("TrigL2MuonSA::MdtRegionDefiner"), - m_mdtPrepDataProvider("Muon::MdtRdoToPrepDataTool/MdtPrepDataProviderTool"), m_use_mdtcsm(true), m_BMGpresent(false), m_BMGid(-1) { - declareInterface<TrigL2MuonSA::MdtDataPreparator>(this); - - declareProperty("MDT_RawDataProvider", m_mdtRawDataProvider); - declareProperty("MdtPrepDataProvider", m_mdtPrepDataProvider); } // -------------------------------------------------------------------------------- @@ -75,113 +57,66 @@ TrigL2MuonSA::MdtDataPreparator::MdtDataPreparator(const std::string& type, StatusCode TrigL2MuonSA::MdtDataPreparator::initialize() { - // Get a message stream instance - ATH_MSG_DEBUG("Initializing MdtDataPreparator - package version " << PACKAGE_VERSION); - - StatusCode sc; - sc = AthAlgTool::initialize(); - if (!sc.isSuccess()) { - ATH_MSG_ERROR("Could not initialize the AthAlgTool base class."); - return sc; - } - - // consistency check for decoding flag settings - if(m_decodeBS && !m_doDecoding) { - ATH_MSG_FATAL("Inconsistent setup, you tried to enable BS decoding but disable all decoding. Please fix the configuration"); - return StatusCode::FAILURE; - } - - ATH_MSG_DEBUG("Decode BS set to" << m_decodeBS ); - // disable MDT Raw data provider if we either don't decode BS or don't decode MDTs - if ( m_mdtRawDataProvider.retrieve(DisableTool{ !m_decodeBS || !m_doDecoding }).isFailure()) { - ATH_MSG_ERROR("Failed to retrieve " << m_mdtRawDataProvider ); - return StatusCode::FAILURE; - } else { - ATH_MSG_DEBUG("Retrieved tool " << m_mdtRawDataProvider); - } - // - std::string serviceName; - - // Locate RegionSelector - ATH_CHECK( m_regionSelector.retrieve()); - ATH_MSG_DEBUG("Retrieved service " << m_regionSelector.name()); - // Locate ROBDataProvider - ATH_CHECK( m_robDataProvider.retrieve() ); - ATH_MSG_DEBUG("Retrieved service " << m_robDataProvider.name()); - - - ATH_CHECK( m_mdtRegionDefiner.retrieve() ); - ATH_MSG_DEBUG("Retrieved service " << m_mdtRegionDefiner); - - ATH_CHECK( m_readKey.initialize() ); - - // retrieve the mdtidhelper - ATH_CHECK( detStore()->retrieve(m_muonMgr,"Muon") ); - ATH_MSG_DEBUG("Retrieved GeoModel from DetectorStore."); - ATH_CHECK( m_idHelperSvc.retrieve() ); - - // Disable MDT PRD converter if we don't do the MDT data decoding - ATH_CHECK( m_mdtPrepDataProvider.retrieve(DisableTool{!m_doDecoding}) ); - ATH_MSG_DEBUG("Retrieved " << m_mdtPrepDataProvider); - - // Retrieve ActiveStore - ATH_CHECK( m_activeStore.retrieve() ); - ATH_MSG_DEBUG("Retrieved ActiveStoreSvc."); - - m_BMGpresent = m_idHelperSvc->mdtIdHelper().stationNameIndex("BMG") != -1; - if(m_BMGpresent){ - ATH_MSG_INFO("Processing configuration for layouts with BMG chambers."); - m_BMGid = m_idHelperSvc->mdtIdHelper().stationNameIndex("BMG"); - for(int phi=6; phi<8; phi++) { // phi sectors - BMGs are ony in (6 aka 12) and (7 aka 14) - for(int eta=1; eta<4; eta++) { // eta sectors - BMGs are in eta 1 to 3 - for(int side=-1; side<2; side+=2) { // side - both sides have BMGs - if( !m_muonMgr->getMuonStation("BMG", side*eta, phi) ) continue; - for(int roe=1; roe<=( m_muonMgr->getMuonStation("BMG", side*eta, phi) )->nMuonReadoutElements(); roe++) { // iterate on readout elemets - const MuonGM::MdtReadoutElement* mdtRE = - dynamic_cast<const MuonGM::MdtReadoutElement*> ( ( m_muonMgr->getMuonStation("BMG", side*eta, phi) )->getMuonReadoutElement(roe) ); // has to be an MDT - if(mdtRE) initDeadChannels(mdtRE); - } - } - } - } - } - - - // pass the flags that determine if we run the actual decoding here so we don't create a data dependency if it is not needed - ATH_CHECK(m_mdtCsmContainerKey.initialize(m_decodeBS && m_doDecoding)); - - ATH_CHECK(m_mdtPrepContainerKey.initialize()); - - // - return StatusCode::SUCCESS; -} - -// -------------------------------------------------------------------------------- -// -------------------------------------------------------------------------------- + // consistency check for decoding flag settings + if(m_decodeBS && !m_doDecoding) { + ATH_MSG_FATAL("Inconsistent setup, you tried to enable BS decoding but disable all decoding. Please fix the configuration"); + return StatusCode::FAILURE; + } -void TrigL2MuonSA::MdtDataPreparator::setRpcGeometry(bool use_rpc) -{ - m_mdtRegionDefiner->setRpcGeometry(use_rpc); - return; -} + ATH_MSG_DEBUG("Decode BS set to" << m_decodeBS ); + // disable MDT Raw data provider if we either don't decode BS or don't decode MDTs + ATH_CHECK( m_mdtRawDataProvider.retrieve(DisableTool{ !m_decodeBS || !m_doDecoding }) ); + std::string serviceName; + + // Locate RegionSelector + ATH_CHECK( m_regionSelector.retrieve()); + ATH_MSG_DEBUG("Retrieved service " << m_regionSelector.name()); + + // Locate ROBDataProvider + ATH_CHECK( m_robDataProvider.retrieve() ); + ATH_MSG_DEBUG("Retrieved service " << m_robDataProvider.name()); + + + ATH_CHECK( m_mdtRegionDefiner.retrieve() ); + ATH_MSG_DEBUG("Retrieved service " << m_mdtRegionDefiner); + + ATH_CHECK( m_readKey.initialize() ); + + // retrieve the mdtidhelper + ATH_CHECK( detStore()->retrieve(m_muonMgr,"Muon") ); + ATH_MSG_DEBUG("Retrieved GeoModel from DetectorStore."); + ATH_CHECK( m_idHelperSvc.retrieve() ); + + // Disable MDT PRD converter if we don't do the MDT data decoding + ATH_CHECK( m_mdtPrepDataProvider.retrieve(DisableTool{!m_doDecoding}) ); + ATH_MSG_DEBUG("Retrieved " << m_mdtPrepDataProvider); + + m_BMGpresent = m_idHelperSvc->mdtIdHelper().stationNameIndex("BMG") != -1; + if(m_BMGpresent){ + ATH_MSG_INFO("Processing configuration for layouts with BMG chambers."); + m_BMGid = m_idHelperSvc->mdtIdHelper().stationNameIndex("BMG"); + for(int phi=6; phi<8; phi++) { // phi sectors - BMGs are ony in (6 aka 12) and (7 aka 14) + for(int eta=1; eta<4; eta++) { // eta sectors - BMGs are in eta 1 to 3 + for(int side=-1; side<2; side+=2) { // side - both sides have BMGs + if( !m_muonMgr->getMuonStation("BMG", side*eta, phi) ) continue; + for(int roe=1; roe<=( m_muonMgr->getMuonStation("BMG", side*eta, phi) )->nMuonReadoutElements(); roe++) { // iterate on readout elemets + const MuonGM::MdtReadoutElement* mdtRE = + dynamic_cast<const MuonGM::MdtReadoutElement*> ( ( m_muonMgr->getMuonStation("BMG", side*eta, phi) )->getMuonReadoutElement(roe) ); // has to be an MDT + if(mdtRE) initDeadChannels(mdtRE); + } + } + } + } + } -// -------------------------------------------------------------------------------- -// -------------------------------------------------------------------------------- -void TrigL2MuonSA::MdtDataPreparator::setMdtDataCollection(bool use_mdtcsm) -{ - m_use_mdtcsm = use_mdtcsm; - return; -} + // pass the flags that determine if we run the actual decoding here so we don't create a data dependency if it is not needed + ATH_CHECK(m_mdtCsmContainerKey.initialize(m_decodeBS && m_doDecoding)); -// -------------------------------------------------------------------------------- -// -------------------------------------------------------------------------------- + ATH_CHECK(m_mdtPrepContainerKey.initialize()); -void TrigL2MuonSA::MdtDataPreparator::setRoIBasedDataAccess(bool use_RoIBasedDataAccess) -{ - m_use_RoIBasedDataAccess = use_RoIBasedDataAccess; - return; + return StatusCode::SUCCESS; } // -------------------------------------------------------------------------------- @@ -195,25 +130,15 @@ StatusCode TrigL2MuonSA::MdtDataPreparator::prepareData(const LVL1::RecMuonRoI* TrigL2MuonSA::MdtHits& mdtHits_normal, TrigL2MuonSA::MdtHits& mdtHits_overlap) { - StatusCode sc; m_mdtRegionDefiner->setMdtGeometry(m_muonMgr); // define regions - sc = m_mdtRegionDefiner->getMdtRegions(p_roi, rpcFitResult, muonRoad, mdtRegion); - if( sc!= StatusCode::SUCCESS ) { - ATH_MSG_WARNING("Error in getting MDT region"); - return sc; - } + ATH_CHECK( m_mdtRegionDefiner->getMdtRegions(p_roi, rpcFitResult, muonRoad, mdtRegion) ); - sc = getMdtHits(p_roi, p_roids, mdtRegion, muonRoad, mdtHits_normal, mdtHits_overlap); - if( sc!= StatusCode::SUCCESS ) { - ATH_MSG_WARNING("Error in getting MDT hits"); - return sc; - } + ATH_CHECK( getMdtHits(p_roi, p_roids, mdtRegion, muonRoad, mdtHits_normal, mdtHits_overlap) ); return StatusCode::SUCCESS; - } // -------------------------------------------------------------------------------- @@ -227,22 +152,13 @@ StatusCode TrigL2MuonSA::MdtDataPreparator::prepareData(const LVL1::RecMuonRoI* TrigL2MuonSA::MdtHits& mdtHits_normal, TrigL2MuonSA::MdtHits& mdtHits_overlap) { - StatusCode sc; m_mdtRegionDefiner->setMdtGeometry(m_muonMgr); // define regions - sc = m_mdtRegionDefiner->getMdtRegions(p_roi, tgcFitResult, muonRoad, mdtRegion); - if( sc!= StatusCode::SUCCESS ) { - ATH_MSG_WARNING("Error in getting MDT region"); - return sc; - } + ATH_CHECK( m_mdtRegionDefiner->getMdtRegions(p_roi, tgcFitResult, muonRoad, mdtRegion) ); - sc = getMdtHits(p_roi, p_roids, mdtRegion, muonRoad, mdtHits_normal, mdtHits_overlap); - if( sc!= StatusCode::SUCCESS ) { - ATH_MSG_WARNING("Error in getting MDT hits"); - return sc; - } + ATH_CHECK( getMdtHits(p_roi, p_roids, mdtRegion, muonRoad, mdtHits_normal, mdtHits_overlap) ); return StatusCode::SUCCESS; } @@ -267,11 +183,11 @@ StatusCode TrigL2MuonSA::MdtDataPreparator::getMdtHits(const LVL1::RecMuonRoI* double phi = p_roi->phi(); double phiMin = p_roi->phi() - 0.1; double phiMax = p_roi->phi() + 0.1; - if( phi < 0 ) phi += 2*CLHEP::pi; - if( phiMin < 0 ) phiMin += 2*CLHEP::pi; - if( phiMax < 0 ) phiMax += 2*CLHEP::pi; + if( phi < 0 ) phi += 2*M_PI; + if( phiMin < 0 ) phiMin += 2*M_PI; + if( phiMax < 0 ) phiMax += 2*M_PI; - TrigRoiDescriptor* roi = new TrigRoiDescriptor( p_roi->eta(), etaMin, etaMax, phi, phiMin, phiMax ); + TrigRoiDescriptor* roi = new TrigRoiDescriptor( p_roi->eta(), etaMin, etaMax, phi, phiMin, phiMax ); const IRoiDescriptor* iroi = (IRoiDescriptor*) roi; @@ -407,14 +323,10 @@ StatusCode TrigL2MuonSA::MdtDataPreparator::getMdtHits(const LVL1::RecMuonRoI* m_regionSelector->DetROBIDListUint(MDT, v_robIds); } - StatusCode sc = collectMdtHitsFromPrepData(mdtHashList, v_robIds, mdtHits_normal, muonRoad); - if( sc!= StatusCode::SUCCESS ) { - ATH_MSG_WARNING("Error in getting collection of MDT hit from prep data"); - return sc; - } + ATH_CHECK( collectMdtHitsFromPrepData(mdtHashList, v_robIds, mdtHits_normal, muonRoad) ); } - // + return StatusCode::SUCCESS; } @@ -449,7 +361,7 @@ StatusCode TrigL2MuonSA::MdtDataPreparator::getMdtCsm(const MdtCsmContainer* pMd if(std::find(v_robIds.begin(), v_robIds.end(), newROBId) != v_robIds.end()) redundant = true; if(!redundant) - v_robIds.push_back(newROBId); + v_robIds.push_back(newROBId); else if(processingDetEl != 2){ ++i; continue; @@ -563,7 +475,7 @@ bool TrigL2MuonSA::MdtDataPreparator::decodeMdtCsm(const MdtCsm* csm, // even though the total TDC is 17 bits (19 bits for HPTDC) it's ok to use // unsigned short int (16 bit) as no more than 2000 tics are delivered by // the DAQ and therefore hte leading bits of coarse can be lost - unsigned short int drift = (*amt)->fine() | ( (*amt)->coarse() << 5); + unsigned short int drift = (*amt)->fine() | ( (*amt)->coarse() << 5); int StationPhi; int StationName; @@ -574,7 +486,7 @@ bool TrigL2MuonSA::MdtDataPreparator::decodeMdtCsm(const MdtCsm* csm, double cXmid; double cYmid; double cAmid = 0; - double cPhip; + double cPhip; MdtAmtMap* amtMap = csmMap->getTdcMap(TdcId); if (!amtMap) { @@ -582,7 +494,7 @@ bool TrigL2MuonSA::MdtDataPreparator::decodeMdtCsm(const MdtCsm* csm, ++amt; continue; } - bool offlineID = amtMap->offlineId(ChannelId, StationName, StationEta, StationPhi, MultiLayer, Layer, Tube); + bool offlineID = amtMap->offlineId(ChannelId, StationName, StationEta, StationPhi, MultiLayer, Layer, Tube); if(!offlineID) { ATH_MSG_WARNING("problem getting info from amtMap"); @@ -661,10 +573,10 @@ bool TrigL2MuonSA::MdtDataPreparator::decodeMdtCsm(const MdtCsm* csm, double cphi = muonRoad.phi[chamber][0]; if( cPhip*cphi>0 ) dphi = std::abs(cPhip - cphi); else { - if(fabs(cphi) > CLHEP::pi/2.) { - double phi1 = (cPhip>0.)? cPhip-CLHEP::pi : cPhip+CLHEP::pi; - double phi2 = (cphi >0.)? cphi -CLHEP::pi : cphi +CLHEP::pi; - dphi = std::abs(phi1) + std::abs(phi2); + if(fabs(cphi) > M_PI/2.) { + double phi1 = (cPhip>0.)? cPhip-M_PI : cPhip+M_PI; + double phi2 = (cphi >0.)? cphi -M_PI : cphi +M_PI; + dphi = std::abs(phi1) + std::abs(phi2); } else { dphi = std::abs(cPhip) + std::abs(cphi); @@ -675,13 +587,13 @@ bool TrigL2MuonSA::MdtDataPreparator::decodeMdtCsm(const MdtCsm* csm, R = sqrt(R*R+R*R*tan(dphi)*tan(dphi)); Amg::Vector3D OrigOfMdtInAmdbFrame = - Amg::Hep3VectorToEigen( m_muonStation->getBlineFixedPointInAmdbLRS() ); - double Rmin =(trans*OrigOfMdtInAmdbFrame).perp(); + Amg::Hep3VectorToEigen( m_muonStation->getBlineFixedPointInAmdbLRS() ); + double Rmin =(trans*OrigOfMdtInAmdbFrame).perp(); float cInCo = 1./cos(std::abs(atan(OrtoRadialPos/Rmin))); float cPhi0 = cPhip - atan(OrtoRadialPos/Rmin); - if(cPhi0 > CLHEP::pi) cPhip -= 2*CLHEP::pi; - if(cPhip<0. && (fabs(CLHEP::pi+cPhip) < 0.05) ) cPhip = acos(0.)*2.; + if(cPhi0 > M_PI) cPhip -= 2*M_PI; + if(cPhip<0. && (fabs(M_PI+cPhip) < 0.05) ) cPhip = acos(0.)*2.; uint32_t OnlineId = ChannelId | (TdcId << 5) | (LinkId << 10) | (get_system_id(SubsystemId) << 13) | (MrodId <<16); @@ -768,7 +680,7 @@ void TrigL2MuonSA::MdtDataPreparator::getMdtIdHashesBarrel(const TrigL2MuonSA::M //combine regions of sector and type for(int j_station=0; j_station<6; j_station++) { int cha=0; - if (j_station==0) cha = xAOD::L2MuonParameters::Chamber::BarrelInner; + if (j_station==0) cha = xAOD::L2MuonParameters::Chamber::BarrelInner; if (j_station==1) cha = xAOD::L2MuonParameters::Chamber::BarrelMiddle; if (j_station==2) cha = xAOD::L2MuonParameters::Chamber::BarrelOuter; if (j_station==3) cha = xAOD::L2MuonParameters::Chamber::BME; @@ -789,7 +701,7 @@ void TrigL2MuonSA::MdtDataPreparator::getMdtIdHashesBarrel(const TrigL2MuonSA::M // get hashIdlist by using region selector for(int i_station=0; i_station<6; i_station++) { int chamber=0; - if (i_station==0) chamber = xAOD::L2MuonParameters::Chamber::BarrelInner; + if (i_station==0) chamber = xAOD::L2MuonParameters::Chamber::BarrelInner; if (i_station==1) chamber = xAOD::L2MuonParameters::Chamber::BarrelMiddle; if (i_station==2) chamber = xAOD::L2MuonParameters::Chamber::BarrelOuter; if (i_station==3) chamber = xAOD::L2MuonParameters::Chamber::BME; @@ -838,7 +750,7 @@ void TrigL2MuonSA::MdtDataPreparator::getMdtIdHashesEndcap(const TrigL2MuonSA::M //combine regions of sector and type for(int j_station=0; j_station<6; j_station++) { int cha=0; - if (j_station==0) cha = xAOD::L2MuonParameters::Chamber::EndcapInner; + if (j_station==0) cha = xAOD::L2MuonParameters::Chamber::EndcapInner; if (j_station==1) cha = xAOD::L2MuonParameters::Chamber::EndcapMiddle; if (j_station==2) cha = xAOD::L2MuonParameters::Chamber::EndcapOuter; if (j_station==3) cha = xAOD::L2MuonParameters::Chamber::EndcapExtra; @@ -859,7 +771,7 @@ void TrigL2MuonSA::MdtDataPreparator::getMdtIdHashesEndcap(const TrigL2MuonSA::M // get hashIdlist by using region selector for(int i_station=0; i_station<6; i_station++) { int chamber = 0; - if (i_station==0) chamber = xAOD::L2MuonParameters::Chamber::EndcapInner; + if (i_station==0) chamber = xAOD::L2MuonParameters::Chamber::EndcapInner; if (i_station==1) chamber = xAOD::L2MuonParameters::Chamber::EndcapMiddle; if (i_station==2) chamber = xAOD::L2MuonParameters::Chamber::EndcapOuter; if (i_station==3) chamber = xAOD::L2MuonParameters::Chamber::EndcapExtra; @@ -904,110 +816,89 @@ StatusCode TrigL2MuonSA::MdtDataPreparator::collectMdtHitsFromPrepData(const std std::vector<uint32_t>& v_robIds, TrigL2MuonSA::MdtHits& mdtHits, const TrigL2MuonSA::MuonRoad& muonRoad) -{ +{ if(m_doDecoding) { if(m_decodeBS) { if ( m_mdtRawDataProvider->convert(v_robIds).isFailure()) { ATH_MSG_WARNING("Conversion of BS for decoding of MDTs failed"); } } - if (m_mdtPrepDataProvider->decode(v_robIds).isSuccess()) { - ATH_MSG_DEBUG("Calling ROB based decoding with "<< v_robIds.size() << " ROB's"); - } - else{ - ATH_MSG_WARNING("Error in ROB based decoding"); - return StatusCode::FAILURE; - } + ATH_CHECK( m_mdtPrepDataProvider->decode(v_robIds) ); + ATH_MSG_DEBUG("Calling ROB based decoding with "<< v_robIds.size() << " ROB's"); } - - // Get MDT container + + // Get MDT container if (v_idHash.empty()) { ATH_MSG_DEBUG("Hash list is empty"); return StatusCode::SUCCESS; } - - const MdtPrepDataContainer* mdtPrds; - if (m_activeStore) { - auto mdtPrepContainerHandle = SG::makeHandle(m_mdtPrepContainerKey); - mdtPrds = mdtPrepContainerHandle.cptr(); - if (!mdtPrepContainerHandle.isValid()) { - ATH_MSG_ERROR(" Cannot retrieve MDT PRD Container " << m_mdtPrepContainerKey.key()); - return StatusCode::FAILURE; - } - } else { - ATH_MSG_ERROR("Null pointer to ActiveStore"); + + const Muon::MdtPrepDataContainer* mdtPrds; + auto mdtPrepContainerHandle = SG::makeHandle(m_mdtPrepContainerKey); + mdtPrds = mdtPrepContainerHandle.cptr(); + if (!mdtPrepContainerHandle.isValid()) { + ATH_MSG_ERROR(" Cannot retrieve MDT PRD Container " << m_mdtPrepContainerKey.key()); return StatusCode::FAILURE; } - - // Get MDT collections + + // Get MDT collections ///// Vectors of prep data collections std::vector<const Muon::MdtPrepDataCollection*> mdtCols; - - MdtPrepDataContainer::const_iterator MDTcoll; - for(std::vector<IdentifierHash>::const_iterator idit = v_idHash.begin(); idit != v_idHash.end(); ++idit) { - - MDTcoll = mdtPrds->indexFind(*idit); - + + for(const IdentifierHash& id : v_idHash) { + + Muon::MdtPrepDataContainer::const_iterator MDTcoll = mdtPrds->indexFind(id); + if( MDTcoll == mdtPrds->end() ) { - ATH_MSG_DEBUG("MDT prep data collection not found in Hash ID" << (int)*idit); + ATH_MSG_DEBUG("MDT prep data collection not found in Hash ID" << (int)id); continue; } - + if( (*MDTcoll)->size() == 0 ) { - ATH_MSG_DEBUG("MDT prep data collection is empty in Hash ID" << (int)*idit); + ATH_MSG_DEBUG("MDT prep data collection is empty in Hash ID" << (int)id); continue; } - + mdtCols.push_back(*MDTcoll); - + ATH_MSG_DEBUG("Selected Mdt Collection: " << m_idHelperSvc->mdtIdHelper().show_to_string((*MDTcoll)->identify()) << " with size " << (*MDTcoll)->size() - << "in Hash ID" << (int)*idit); + << "in Hash ID" << (int)id); } - - 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(); - - if (cit_begin == cit_end) return StatusCode::SUCCESS; - - Muon::MdtPrepDataCollection::const_iterator cit = cit_begin; - for( ; cit!=cit_end;++cit ) { - - const Muon::MdtPrepData* mdt = (*cit); - + + for( const Muon::MdtPrepDataCollection* mdtCol : mdtCols ){ + + mdtHits.reserve( mdtHits.size() + mdtCol->size() ); + for( const Muon::MdtPrepData* mdt : *mdtCol ) { + m_mdtReadout = mdt->detectorElement(); - if (!m_mdtReadout) continue; - + if (!m_mdtReadout) continue; + m_muonStation = m_mdtReadout->parentMuonStation(); - + int StationPhi = m_mdtReadout->getStationPhi(); int StationEta = m_mdtReadout->getStationEta(); int MultiLayer = m_mdtReadout->getMultilayer(); double cXmid; double cYmid; double cAmid = 0; - double cPhip; - + double cPhip; + Identifier id = mdt->identify(); int adc = mdt->adc(); int drift = mdt->tdc(); - + int TubeLayers = m_mdtReadout->getNLayers(); int TubeLayer = m_idHelperSvc->mdtIdHelper().tubeLayer(id); if(TubeLayer > TubeLayers) TubeLayer -= TubeLayers; int Layer = (MultiLayer-1)*TubeLayers + TubeLayer; int Tube = m_idHelperSvc->mdtIdHelper().tube(id); - + double OrtoRadialPos = m_mdtReadout->getStationS(); std::string chamberType = m_mdtReadout->getStationType(); char st = chamberType[1]; - + int chamber = 0; if (chamberType[0]=='E') { /// Endcap @@ -1020,9 +911,9 @@ StatusCode TrigL2MuonSA::MdtDataPreparator::collectMdtHitsFromPrepData(const std if (st=='I') chamber = xAOD::L2MuonParameters::Chamber::BarrelInner; if (st=='M') chamber = xAOD::L2MuonParameters::Chamber::BarrelMiddle; if (st=='O') chamber = xAOD::L2MuonParameters::Chamber::BarrelOuter; - if (st=='E' && chamberType[2]=='E') chamber = xAOD::L2MuonParameters::Chamber::BEE; - if (st=='M' && chamberType[2]=='E') chamber = xAOD::L2MuonParameters::Chamber::BME; - if (st=='M' && chamberType[2]=='G') chamber = xAOD::L2MuonParameters::Chamber::Backup; + if (st=='E' && chamberType[2]=='E') chamber = xAOD::L2MuonParameters::Chamber::BEE; + if (st=='M' && chamberType[2]=='E') chamber = xAOD::L2MuonParameters::Chamber::BME; + if (st=='M' && chamberType[2]=='G') chamber = xAOD::L2MuonParameters::Chamber::Backup; } double R = -99999., Z = -99999.; @@ -1037,7 +928,7 @@ StatusCode TrigL2MuonSA::MdtDataPreparator::collectMdtHitsFromPrepData(const std } R = m_mdtReadout->center(TubeLayer, Tube).perp(); Z = m_mdtReadout->center(TubeLayer, Tube).z(); - + Amg::Transform3D trans = Amg::CLHEPTransformToEigen(*m_muonStation->getNominalAmdbLRSToGlobal()); if(m_muonStation->endcap()==0){ cXmid = (trans*Amg::Vector3D(0.,0.,0.)).z(); @@ -1052,42 +943,42 @@ StatusCode TrigL2MuonSA::MdtDataPreparator::collectMdtHitsFromPrepData(const std else cYmid -= halfZThicknessOfMultilayer; } cPhip = (trans*Amg::Vector3D(0.,0.,0.)).phi(); - + double dphi = 0; double cphi = muonRoad.phi[chamber][0]; if( cPhip*cphi>0 ) { dphi = std::abs(cPhip - cphi); } else { - if(fabs(cphi) > CLHEP::pi/2.) { - double phi1 = (cPhip>0.)? cPhip-CLHEP::pi : cPhip+CLHEP::pi; - double phi2 = (cphi >0.)? cphi -CLHEP::pi : cphi +CLHEP::pi; - dphi = std::abs(phi1) + std::abs(phi2); + if(fabs(cphi) > M_PI/2.) { + double phi1 = (cPhip>0.)? cPhip-M_PI : cPhip+M_PI; + double phi2 = (cphi >0.)? cphi -M_PI : cphi +M_PI; + dphi = std::abs(phi1) + std::abs(phi2); } else { dphi = std::abs(cPhip) + std::abs(cphi); } } - + if(m_muonStation->endcap()==1) R = sqrt(R*R+R*R*tan(dphi)*tan(dphi)); - - Amg::Vector3D OrigOfMdtInAmdbFrame = - Amg::Hep3VectorToEigen( m_muonStation->getBlineFixedPointInAmdbLRS() ); - double Rmin =(trans*OrigOfMdtInAmdbFrame).perp(); - + + Amg::Vector3D OrigOfMdtInAmdbFrame = + Amg::Hep3VectorToEigen( m_muonStation->getBlineFixedPointInAmdbLRS() ); + double Rmin =(trans*OrigOfMdtInAmdbFrame).perp(); + float cInCo = 1./cos(std::abs(atan(OrtoRadialPos/Rmin))); float cPhi0 = cPhip - atan(OrtoRadialPos/Rmin); - if(cPhi0 > CLHEP::pi) cPhip -= 2*CLHEP::pi; - if(cPhip<0. && (fabs(CLHEP::pi+cPhip) < 0.05) ) cPhip = acos(0.)*2.; - + if(cPhi0 > M_PI) cPhip -= 2*M_PI; + if(cPhip<0. && (fabs(M_PI+cPhip) < 0.05) ) cPhip = acos(0.)*2.; + ATH_MSG_DEBUG(" ...MDT hit Z/R/chamber/MultiLater/TubeLayer/Tube/Layer/adc/tdc = " << Z << "/" << R << "/" << chamber << "/" << MultiLayer << "/" << TubeLayer << "/" << Tube << "/" << Layer << "/" << adc << "/" << drift); - + // no residual check for the moment // (residual check at pattern finder) if(Layer!=0 && Tube !=0) { - + // create the new digit TrigL2MuonSA::MdtHitData tmp; tmp.name = 0; @@ -1118,10 +1009,10 @@ StatusCode TrigL2MuonSA::MdtDataPreparator::collectMdtHitsFromPrepData(const std tmp.Residual = 0; tmp.isOutlier = 0; tmp.Chamber = chamber; - tmp.Id = id; - + tmp.Id = id; + mdtHits.push_back(tmp); - } + } } // end of MdtPrepDataCollection loop } // end of MdtPrepDataCollection vector loop diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MdtRegionDefiner.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MdtRegionDefiner.cxx index 2c43904d65b573bac763a6fbfe24c4961818f5df..e7de388953c0dceaebb9a33e2ff81e892fd32df4 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MdtRegionDefiner.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MdtRegionDefiner.cxx @@ -4,23 +4,13 @@ #include "TrigL2MuonSA/MdtRegionDefiner.h" -#include "CLHEP/Units/PhysicalConstants.h" #include "TrigL2MuonSA/MdtRegion.h" #include "MuonReadoutGeometry/MuonDetectorManager.h" #include "MuonReadoutGeometry/MdtReadoutElement.h" #include "MuonReadoutGeometry/MuonStation.h" #include "GeoPrimitives/CLHEPtoEigenConverter.h" #include "xAODTrigMuon/TrigMuonDefs.h" - -#include "AthenaBaseComps/AthMsgStreamMacros.h" - -// -------------------------------------------------------------------------------- -// -------------------------------------------------------------------------------- - -static const InterfaceID IID_MdtRegionDefiner("IID_MdtRegionDefiner", 1, 0); - -const InterfaceID& TrigL2MuonSA::MdtRegionDefiner::interfaceID() { return IID_MdtRegionDefiner; } - +#include <cmath> // -------------------------------------------------------------------------------- // -------------------------------------------------------------------------------- @@ -28,11 +18,8 @@ const InterfaceID& TrigL2MuonSA::MdtRegionDefiner::interfaceID() { return IID_Md TrigL2MuonSA::MdtRegionDefiner::MdtRegionDefiner(const std::string& type, const std::string& name, const IInterface* parent): - AthAlgTool(type, name, parent), - m_muonMgr(0), m_mdtReadout(0), m_muonStation(0), - m_use_rpc(true) + AthAlgTool(type, name, parent) { - declareInterface<TrigL2MuonSA::MdtRegionDefiner>(this); } // -------------------------------------------------------------------------------- @@ -40,30 +27,10 @@ TrigL2MuonSA::MdtRegionDefiner::MdtRegionDefiner(const std::string& type, StatusCode TrigL2MuonSA::MdtRegionDefiner::initialize() { - ATH_MSG_DEBUG("Initializing MdtRegionDefiner - package version " << PACKAGE_VERSION) ; ATH_CHECK(m_idHelperSvc.retrieve()); - return StatusCode::SUCCESS; -} - -// -------------------------------------------------------------------------------- -// -------------------------------------------------------------------------------- - -void TrigL2MuonSA::MdtRegionDefiner::setRpcGeometry(bool use_rpc) -{ - m_use_rpc = use_rpc; - return; -} - -// -------------------------------------------------------------------------------- -// -------------------------------------------------------------------------------- - -// set the pointers for the new cabling and geometry -void TrigL2MuonSA::MdtRegionDefiner::setMdtGeometry(const MuonGM::MuonDetectorManager* muonMgr) -{ - m_muonMgr = muonMgr; + return StatusCode::SUCCESS; } - // -------------------------------------------------------------------------------- // -------------------------------------------------------------------------------- @@ -79,7 +46,7 @@ StatusCode TrigL2MuonSA::MdtRegionDefiner::getMdtRegions(const LVL1::RecMuonRoI* sectors[0] = muonRoad.MDT_sector_trigger; sectors[1] = muonRoad.MDT_sector_overlap; - int endcap_inner = xAOD::L2MuonParameters::Chamber::EndcapInner; + int endcap_inner = xAOD::L2MuonParameters::Chamber::EndcapInner; for(int i_station=0; i_station<6; i_station++) { int chamber = 0; @@ -129,29 +96,29 @@ StatusCode TrigL2MuonSA::MdtRegionDefiner::getMdtRegions(const LVL1::RecMuonRoI* ty1 = m_idHelperSvc->mdtIdHelper().stationNameIndex(name)+1; else if(ty2 == -1) ty2 = m_idHelperSvc->mdtIdHelper().stationNameIndex(name)+1; - m_mdtReadout = m_muonMgr->getMdtReadoutElement(id); + m_mdtReadout = m_muonMgr->getMdtReadoutElement(id); m_muonStation = m_mdtReadout->parentMuonStation(); Amg::Transform3D trans = Amg::CLHEPTransformToEigen(*m_muonStation->getNominalAmdbLRSToGlobal()); //HepGeom::Transform3D* trans = m_muonStation->getNominalAmdbLRSToGlobal(); Amg::Vector3D OrigOfMdtInAmdbFrame = - Amg::Hep3VectorToEigen( m_muonStation->getBlineFixedPointInAmdbLRS() ); + Amg::Hep3VectorToEigen( m_muonStation->getBlineFixedPointInAmdbLRS() ); // HepPoint3D OrigOfMdtInAmdbFrame = m_muonStation->getBlineFixedPointInAmdbLRS(); tmp_rMin = (trans*OrigOfMdtInAmdbFrame).perp(); tmp_rMax = tmp_rMin+m_muonStation->Rsize(); if(rMin==0 || tmp_rMin < rMin)rMin = tmp_rMin; - if(rMax==0 || tmp_rMax > rMax)rMax = tmp_rMax; - if ( chamber_this == endcap_inner ){ - tmp_zMin = (trans*OrigOfMdtInAmdbFrame).z(); - if(tmp_zMin < 0) sign = -1; - else if(tmp_zMin > 0) sign = 1; - tmp_zMax = tmp_zMin + sign*m_muonStation->Zsize(); + if(rMax==0 || tmp_rMax > rMax)rMax = tmp_rMax; + if ( chamber_this == endcap_inner ){ + tmp_zMin = (trans*OrigOfMdtInAmdbFrame).z(); + if(tmp_zMin < 0) sign = -1; + else if(tmp_zMin > 0) sign = 1; + tmp_zMax = tmp_zMin + sign*m_muonStation->Zsize(); if(zMin==0 || tmp_zMin < zMin)zMin = tmp_zMin; - if(zMax==0 || tmp_zMax > zMax)zMax = tmp_zMax; - } + if(zMax==0 || tmp_zMax > zMax)zMax = tmp_zMax; + } } } @@ -234,9 +201,9 @@ StatusCode TrigL2MuonSA::MdtRegionDefiner::getMdtRegions(const LVL1::RecMuonRoI* sectors[0] = muonRoad.MDT_sector_trigger; sectors[1] = muonRoad.MDT_sector_overlap; - int endcap_middle = xAOD::L2MuonParameters::Chamber::EndcapMiddle; - int barrel_inner = xAOD::L2MuonParameters::Chamber::BarrelInner; - int bee = xAOD::L2MuonParameters::Chamber::BEE; + int endcap_middle = xAOD::L2MuonParameters::Chamber::EndcapMiddle; + int barrel_inner = xAOD::L2MuonParameters::Chamber::BarrelInner; + int bee = xAOD::L2MuonParameters::Chamber::BEE; for(int i_station=0; i_station<7; i_station++) { int chamber = 0; @@ -262,8 +229,8 @@ StatusCode TrigL2MuonSA::MdtRegionDefiner::getMdtRegions(const LVL1::RecMuonRoI* int types[2]; int& ty1 = types[0]; int& ty2 = types[1]; - float sta_zMin = 0; - float sta_zMax = 0; + float sta_zMin = 0; + float sta_zMax = 0; float tmp_zMin = 0; float tmp_zMax = 0; @@ -289,7 +256,7 @@ StatusCode TrigL2MuonSA::MdtRegionDefiner::getMdtRegions(const LVL1::RecMuonRoI* ty1 = m_idHelperSvc->mdtIdHelper().stationNameIndex(name)+1; else if(ty2 == -1) ty2 = m_idHelperSvc->mdtIdHelper().stationNameIndex(name)+1; - m_mdtReadout = m_muonMgr->getMdtReadoutElement(id); + m_mdtReadout = m_muonMgr->getMdtReadoutElement(id); m_muonStation = m_mdtReadout->parentMuonStation(); float scale = 10.; @@ -297,7 +264,7 @@ StatusCode TrigL2MuonSA::MdtRegionDefiner::getMdtRegions(const LVL1::RecMuonRoI* //HepGeom::Transform3D* trans = m_muonStation->getNominalAmdbLRSToGlobal(); Amg::Vector3D OrigOfMdtInAmdbFrame = - Amg::Hep3VectorToEigen( m_muonStation->getBlineFixedPointInAmdbLRS() ); + Amg::Hep3VectorToEigen( m_muonStation->getBlineFixedPointInAmdbLRS() ); // HepPoint3D OrigOfMdtInAmdbFrame = m_muonStation->getBlineFixedPointInAmdbLRS(); tmp_zMin = (trans*OrigOfMdtInAmdbFrame).z(); @@ -314,14 +281,14 @@ StatusCode TrigL2MuonSA::MdtRegionDefiner::getMdtRegions(const LVL1::RecMuonRoI* tmp_rMin = (trans*OrigOfMdtInAmdbFrame).perp()/scale; tmp_rMax = tmp_rMin+m_muonStation->Rsize()/scale; if(rMin==0 || tmp_rMin < rMin)rMin = tmp_rMin; - if(rMax==0 || tmp_rMax > rMax)rMax = tmp_rMax; + if(rMax==0 || tmp_rMax > rMax)rMax = tmp_rMax; } if (chamber_this==bee){//BEE tmp_rMin = (trans*OrigOfMdtInAmdbFrame).perp()/scale; tmp_rMax = tmp_rMin+m_muonStation->Rsize()/scale; if(rMin==0 || tmp_rMin < rMin)rMin = tmp_rMin; - if(rMax==0 || tmp_rMax > rMax)rMax = tmp_rMax; + if(rMax==0 || tmp_rMax > rMax)rMax = tmp_rMax; } } @@ -447,8 +414,8 @@ void TrigL2MuonSA::MdtRegionDefiner::find_phi_min_max(float phiMiddle, float& ph { phiMin = phiMiddle - 0.1; phiMax = phiMiddle + 0.1; - if ( phiMin < -1.*CLHEP::pi ) phiMin += 2.*CLHEP::pi; - if ( phiMax > 1.*CLHEP::pi ) phiMax -= 2.*CLHEP::pi; + if ( phiMin < -1.*M_PI ) phiMin += 2.*M_PI; + if ( phiMax > 1.*M_PI ) phiMax -= 2.*M_PI; } // -------------------------------------------------------------------------------- @@ -468,18 +435,18 @@ void TrigL2MuonSA::MdtRegionDefiner::find_eta_min_max(float zMin, float rMin, fl float eta[4]; float theta; - theta = (fabs(zMin)>0.1)? atan(rMin/fabsf(zMin)): CLHEP::pi/2.; + theta = (fabs(zMin)>0.1)? atan(rMin/fabsf(zMin)): M_PI/2.; eta[0] = (zMin>0.)? -log(tan(theta/2.)) : log(tan(theta/2.)); - theta = (fabs(zMax)>0.1)? atan(rMin/fabsf(zMax)): CLHEP::pi/2.; + theta = (fabs(zMax)>0.1)? atan(rMin/fabsf(zMax)): M_PI/2.; eta[1] = (zMax>0.)? -log(tan(theta/2.)) : log(tan(theta/2.)); if(doEmulateMuFast) eta[1] = eta[0]; - theta = (fabs(zMax)>0.1)? atan(rMax/fabsf(zMax)): CLHEP::pi/2.; - eta[2] = (zMax>0.)? -log(tan(theta/2.)) : log(tan(theta/2.)); + theta = (fabs(zMax)>0.1)? atan(rMax/fabsf(zMax)): M_PI/2.; + eta[2] = (zMax>0.)? -log(tan(theta/2.)) : log(tan(theta/2.)); - theta = (fabs(zMin)>0.1)? atan(rMax/fabsf(zMin)): CLHEP::pi/2.; - eta[3] = (zMin>0.)? -log(tan(theta/2.)) : log(tan(theta/2.)); + theta = (fabs(zMin)>0.1)? atan(rMax/fabsf(zMin)): M_PI/2.; + eta[3] = (zMin>0.)? -log(tan(theta/2.)) : log(tan(theta/2.)); if(doEmulateMuFast) eta[3] = eta[2]; etaMin = eta[0]; @@ -593,7 +560,7 @@ StatusCode TrigL2MuonSA::MdtRegionDefiner::prepareTgcPoints(const TrigL2MuonSA:: { w *= hit.r * hit.r; double phi = hit.phi; - if( phi < 0 && ( (CLHEP::pi+phi)<PHI_BOUNDARY) ) phi += CLHEP::pi*2; + if( phi < 0 && ( (M_PI+phi)<PHI_BOUNDARY) ) phi += M_PI*2; if ( hit.sta < 3 ) { m_tgcStripMidPoints.push_back(TgcFit::Point(iHit + 1, hit.sta, hit.z, phi, w)); } else if ( hit.sta ==3 ) { m_tgcStripInnPoints.push_back(TgcFit::Point(iHit + 1, hit.sta, hit.z, phi, w)); } } @@ -616,8 +583,8 @@ StatusCode TrigL2MuonSA::MdtRegionDefiner::computePhi(const LVL1::RecMuonRoI* p_ const TrigL2MuonSA::MdtRegion& mdtRegion, TrigL2MuonSA::MuonRoad& muonRoad) { - int barrel_inner = xAOD::L2MuonParameters::Chamber::BarrelInner; - int barrel_middle = xAOD::L2MuonParameters::Chamber::BarrelMiddle; + int barrel_inner = xAOD::L2MuonParameters::Chamber::BarrelInner; + int barrel_middle = xAOD::L2MuonParameters::Chamber::BarrelMiddle; int barrel_outer = xAOD::L2MuonParameters::Chamber::BarrelOuter; for(int i_station=0; i_station<3; i_station++) { @@ -664,11 +631,11 @@ StatusCode TrigL2MuonSA::MdtRegionDefiner::computePhi(const LVL1::RecMuonRoI* p_ muonRoad.phi[chamber][i_sector] = (dz)* rpcFitResult.dPhidZ + rpcFitResult.phi; - while (muonRoad.phi[chamber][i_sector] > CLHEP::pi) - muonRoad.phi[chamber][i_sector] -= 2*CLHEP::pi; + while (muonRoad.phi[chamber][i_sector] > M_PI) + muonRoad.phi[chamber][i_sector] -= 2*M_PI; - while (muonRoad.phi[chamber][i_sector] <-CLHEP::pi) - muonRoad.phi[chamber][i_sector] += 2*CLHEP::pi; + while (muonRoad.phi[chamber][i_sector] <-M_PI) + muonRoad.phi[chamber][i_sector] += 2*M_PI; } else { // RPC data is not read -> use RoI @@ -687,10 +654,10 @@ StatusCode TrigL2MuonSA::MdtRegionDefiner::computePhi(const LVL1::RecMuonRoI* p_ const TrigL2MuonSA::MdtRegion& mdtRegion, TrigL2MuonSA::MuonRoad& muonRoad) { - int endcap_inner = xAOD::L2MuonParameters::Chamber::EndcapInner; - int endcap_middle = xAOD::L2MuonParameters::Chamber::EndcapMiddle; + int endcap_inner = xAOD::L2MuonParameters::Chamber::EndcapInner; + int endcap_middle = xAOD::L2MuonParameters::Chamber::EndcapMiddle; int endcap_outer = xAOD::L2MuonParameters::Chamber::EndcapOuter; - int barrel_inner = xAOD::L2MuonParameters::Chamber::BarrelInner; + int barrel_inner = xAOD::L2MuonParameters::Chamber::BarrelInner; for(int i_station=0; i_station<5; i_station++) { int chamber = 0; @@ -738,8 +705,8 @@ StatusCode TrigL2MuonSA::MdtRegionDefiner::computePhi(const LVL1::RecMuonRoI* p_ } muonRoad.phi[chamber][i_sector] = (dz)* tgcFitResult.dPhidZ + tgcFitResult.phi; - while (muonRoad.phi[chamber][i_sector] > CLHEP::pi) muonRoad.phi[chamber][i_sector] -= 2*CLHEP::pi; - while (muonRoad.phi[chamber][i_sector] <-CLHEP::pi) muonRoad.phi[chamber][i_sector] += 2*CLHEP::pi; + while (muonRoad.phi[chamber][i_sector] > M_PI) muonRoad.phi[chamber][i_sector] -= 2*M_PI; + while (muonRoad.phi[chamber][i_sector] <-M_PI) muonRoad.phi[chamber][i_sector] += 2*M_PI; } else { // TGC data is not read -> use RoI diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuCalStreamerTool.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuCalStreamerTool.cxx index a0d063d7be893409686a5671d3a635be10e3fbff..eacc301989c2215a6d6276e7e8df9f06abf8ecf9 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuCalStreamerTool.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuCalStreamerTool.cxx @@ -482,8 +482,6 @@ StatusCode TrigL2MuonSA::MuCalStreamerTool::createRpcFragment(const LVL1::RecMuo unsigned int sector = (sectorAddress & 0x0000003e) >> 1; unsigned int roiNumber = sectorRoIOvl & 0x0000001F; - Identifier padId; - // retrieve the pad container const RpcPadContainer* rpcPadContainer=nullptr; ATH_CHECK(evtStore()->retrieve(rpcPadContainer,"RPCPAD")); diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/RpcRoadDefiner.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/RpcRoadDefiner.cxx index 8946711e88d6e782df6c554adf5a036e7b8e6ef1..7f753f214dc4c2dbd53990616fc82e2cc49d7715 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/RpcRoadDefiner.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/RpcRoadDefiner.cxx @@ -2,18 +2,12 @@ Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ -#include "TrigL2MuonSA/RpcRoadDefiner.h" -#include "CLHEP/Units/PhysicalConstants.h" +#include <cmath> +#include "TrigL2MuonSA/RpcRoadDefiner.h" #include "TrigSteeringEvent/TrigRoiDescriptor.h" - #include "AthenaBaseComps/AthMsgStreamMacros.h" -// -------------------------------------------------------------------------------- // -------------------------------------------------------------------------------- -static const InterfaceID IID_RpcRoadDefiner("IID_RpcRoadDefiner", 1, 0); - -const InterfaceID& TrigL2MuonSA::RpcRoadDefiner::interfaceID() { return IID_RpcRoadDefiner; } - // -------------------------------------------------------------------------------- // -------------------------------------------------------------------------------- @@ -21,20 +15,15 @@ TrigL2MuonSA::RpcRoadDefiner::RpcRoadDefiner(const std::string& type, const std::string& name, const IInterface* parent): AthAlgTool(type, name, parent), - m_roadData(0), - m_rWidth_RPC_Failed(0), m_use_rpc(true), m_regionSelector( "RegSelSvc", name ) { - declareInterface<TrigL2MuonSA::RpcRoadDefiner>(this); } -// -------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------- // -------------------------------------------------------------------------------- StatusCode TrigL2MuonSA::RpcRoadDefiner::initialize() { - ATH_MSG_DEBUG("Initializing RpcRoadDefiner - package version " << PACKAGE_VERSION) ; - ATH_CHECK(AthAlgTool::initialize()); ATH_CHECK(m_idHelperSvc.retrieve()); return StatusCode::SUCCESS; } @@ -42,32 +31,6 @@ StatusCode TrigL2MuonSA::RpcRoadDefiner::initialize() // -------------------------------------------------------------------------------- // -------------------------------------------------------------------------------- -void TrigL2MuonSA::RpcRoadDefiner::setRoadWidthForFailure(double rWidth_RPC_Failed) -{ - m_rWidth_RPC_Failed = rWidth_RPC_Failed; - return; -} - -// -------------------------------------------------------------------------------- -// -------------------------------------------------------------------------------- - -void TrigL2MuonSA::RpcRoadDefiner::setRpcGeometry(bool use_rpc) -{ - m_use_rpc = use_rpc; - return; -} - -// -------------------------------------------------------------------------------- -// -------------------------------------------------------------------------------- - -void TrigL2MuonSA::RpcRoadDefiner::setMdtGeometry(const ServiceHandle<IRegSelSvc>& regionSelector) -{ - m_regionSelector = regionSelector; -} - -// -------------------------------------------------------------------------------- -// -------------------------------------------------------------------------------- - StatusCode TrigL2MuonSA::RpcRoadDefiner::defineRoad(const LVL1::RecMuonRoI* p_roi, TrigL2MuonSA::MuonRoad& muonRoad, TrigL2MuonSA::RpcHits& /*rpcHits*/, @@ -79,8 +42,6 @@ StatusCode TrigL2MuonSA::RpcRoadDefiner::defineRoad(const LVL1::RecMuonRoI* double roiEtaMaxHigh) { - if (!m_roadData) m_roadData = new BarrelRoadData(); - const double ZERO_LIMIT = 1e-5; const int N_LAYER = 5; // 0: inner, 1: middle, 2: outer 4: BME 5: BMG @@ -126,7 +87,7 @@ StatusCode TrigL2MuonSA::RpcRoadDefiner::defineRoad(const LVL1::RecMuonRoI* muonRoad.side = (p_roi->phi()<0.)? 0 : 1; muonRoad.LargeSmall = ((p_roi->sectorID() + 1)/2 )%2; - int PhysicsSector = ((p_roi->sectorID() + 1)/4 )%8 + 1; + const int PhysicsSector = ((p_roi->sectorID() + 1)/4 )%8 + 1; int special = 0; if (muonRoad.LargeSmall == 0 && (PhysicsSector == 6 || PhysicsSector == 8 )) @@ -170,8 +131,8 @@ StatusCode TrigL2MuonSA::RpcRoadDefiner::defineRoad(const LVL1::RecMuonRoI* double etaMax = p_roi->eta()+.02; double phiMin = muonRoad.phiMiddle-.01; double phiMax = muonRoad.phiMiddle+.01; - if(phiMax > CLHEP::pi) phiMax -= CLHEP::pi*2.; - if(phiMin < CLHEP::pi*-1) phiMin += CLHEP::pi*2.; + if(phiMax > M_PI) phiMax -= M_PI*2.; + if(phiMin < M_PI*-1) phiMin += M_PI*2.; TrigRoiDescriptor* roi = new TrigRoiDescriptor( p_roi->eta(), etaMin, etaMax, p_roi->phi(), phiMin, phiMax ); @@ -182,15 +143,15 @@ StatusCode TrigL2MuonSA::RpcRoadDefiner::defineRoad(const LVL1::RecMuonRoI* if(roi) delete roi; - for(int i_hash=0; i_hash < (int)mdtHashList.size(); i_hash++){ + for( const IdentifierHash& hash : mdtHashList){ Identifier id; - int convert = m_idHelperSvc->mdtIdHelper().get_id(mdtHashList[i_hash], id, &context); + const int convert = m_idHelperSvc->mdtIdHelper().get_id(hash, id, &context); if(convert!=0) ATH_MSG_ERROR("problem converting hash list to id"); muonRoad.stationList.push_back(id); - int stationPhi = m_idHelperSvc->mdtIdHelper().stationPhi(id); + const int stationPhi = m_idHelperSvc->mdtIdHelper().stationPhi(id); std::string name = m_idHelperSvc->mdtIdHelper().stationNameString(m_idHelperSvc->mdtIdHelper().stationName(id)); if ( name[1]=='M' && name[2]=='E' ) continue;//exclude BME @@ -198,14 +159,14 @@ StatusCode TrigL2MuonSA::RpcRoadDefiner::defineRoad(const LVL1::RecMuonRoI* int LargeSmall = 0; if(name[2]=='S' || name[2]=='F' || name[2]=='G' ) LargeSmall = 1; - int sector = (stationPhi-1)*2 + LargeSmall; + const int sector = (stationPhi-1)*2 + LargeSmall; if(sector_trigger == 99) sector_trigger = sector; else if(sector_trigger != sector) sector_overlap = sector; } - int MDT_tr = (PhysicsSector - 1)*2 + muonRoad.LargeSmall; + const int MDT_tr = (PhysicsSector - 1)*2 + muonRoad.LargeSmall; if (MDT_tr == sector_overlap) { sector_overlap = sector_trigger; sector_trigger = MDT_tr; @@ -231,12 +192,12 @@ StatusCode TrigL2MuonSA::RpcRoadDefiner::defineRoad(const LVL1::RecMuonRoI* } } else { - double roiEtaLow = (roiEtaMinLow + roiEtaMaxLow) * 0.5; - double roiEtaHigh = (roiEtaMinHigh + roiEtaMaxHigh) * 0.5; - double thetaLow = atan(exp(-fabs(roiEtaLow)))*2.; - double thetaHigh = atan(exp(-fabs(roiEtaHigh)))*2.; - double awLow = (fabs(roiEtaLow) > ZERO_LIMIT)? tan(thetaLow)*(fabs(roiEtaLow)/roiEtaLow): 0.; - double awHigh = (fabs(roiEtaHigh) > ZERO_LIMIT)? tan(thetaHigh)*(fabs(roiEtaHigh)/roiEtaHigh): 0.; + const double roiEtaLow = (roiEtaMinLow + roiEtaMaxLow) * 0.5; + const double roiEtaHigh = (roiEtaMinHigh + roiEtaMaxHigh) * 0.5; + const double thetaLow = atan(exp(-fabs(roiEtaLow)))*2.; + const double thetaHigh = atan(exp(-fabs(roiEtaHigh)))*2.; + const double awLow = (fabs(roiEtaLow) > ZERO_LIMIT)? tan(thetaLow)*(fabs(roiEtaLow)/roiEtaLow): 0.; + const double awHigh = (fabs(roiEtaHigh) > ZERO_LIMIT)? tan(thetaHigh)*(fabs(roiEtaHigh)/roiEtaHigh): 0.; for (int i_station=0; i_station<N_LAYER; i_station++) { for (int i_sector=0; i_sector<N_SECTOR; i_sector++) { @@ -253,17 +214,5 @@ StatusCode TrigL2MuonSA::RpcRoadDefiner::defineRoad(const LVL1::RecMuonRoI* return StatusCode::SUCCESS; } -// -------------------------------------------------------------------------------- -// -------------------------------------------------------------------------------- - -StatusCode TrigL2MuonSA::RpcRoadDefiner::finalize() -{ - ATH_MSG_DEBUG("Finalizing RpcRoadDefiner - package version " << PACKAGE_VERSION); - - if (m_roadData) delete m_roadData; - - return AthAlgTool::finalize(); -} - -// -------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------- // -------------------------------------------------------------------------------- diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/SagittaRadiusEstimate.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/SagittaRadiusEstimate.cxx index 973db86ee3ae1ec7bc3f0d80e292998b6d248508..30dc9b737ad231b8116866c5bcf27d0bcd731858 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/SagittaRadiusEstimate.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/SagittaRadiusEstimate.cxx @@ -1,59 +1,24 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ +#include <cmath> + #include "TrigL2MuonSA/SagittaRadiusEstimate.h" #include "xAODTrigMuon/TrigMuonDefs.h" -#include "CLHEP/Units/PhysicalConstants.h" - #include "AthenaBaseComps/AthMsgStreamMacros.h" -// -------------------------------------------------------------------------------- -// -------------------------------------------------------------------------------- - -static const InterfaceID IID_SagittaRadiusEstimate("IID_SagittaRadiusEstimate", 1, 0); - -const InterfaceID& TrigL2MuonSA::SagittaRadiusEstimate::interfaceID() { return IID_SagittaRadiusEstimate; } - // -------------------------------------------------------------------------------- // -------------------------------------------------------------------------------- TrigL2MuonSA::SagittaRadiusEstimate::SagittaRadiusEstimate(const std::string& type, const std::string& name, const IInterface* parent): - AthAlgTool(type, name, parent), - m_use_mcLUT(0), - m_alignmentBarrelLUT(0) -{ - declareInterface<TrigL2MuonSA::SagittaRadiusEstimate>(this); -} - -// -------------------------------------------------------------------------------- -// -------------------------------------------------------------------------------- - -TrigL2MuonSA::SagittaRadiusEstimate::~SagittaRadiusEstimate() -{ -} - -// -------------------------------------------------------------------------------- -// -------------------------------------------------------------------------------- - -StatusCode TrigL2MuonSA::SagittaRadiusEstimate::initialize() + AthAlgTool(type, name, parent) { - ATH_MSG_DEBUG("Initializing SagittaRadiusEstimate - package version " << PACKAGE_VERSION) ; - - StatusCode sc; - sc = AthAlgTool::initialize(); - if (!sc.isSuccess()) { - ATH_MSG_ERROR("Could not initialize the AthAlgTool base class."); - return sc; - } - - // - return StatusCode::SUCCESS; } // -------------------------------------------------------------------------------- @@ -64,14 +29,6 @@ void TrigL2MuonSA::SagittaRadiusEstimate::setMCFlag(BooleanProperty use_mcLUT, { m_use_mcLUT = use_mcLUT; if ( alignmentBarrelLUTSvc ) m_alignmentBarrelLUT = alignmentBarrelLUTSvc->alignmentBarrelLUT(); - - return; -} - -void TrigL2MuonSA::SagittaRadiusEstimate::setUseEndcapInner( BooleanProperty use_endcapInner ) -{ - m_use_endcapInner = use_endcapInner; - return; } // -------------------------------------------------------------------------------- @@ -84,7 +41,8 @@ StatusCode TrigL2MuonSA::SagittaRadiusEstimate::setSagittaRadius(const LVL1::Rec const int MAX_STATION = 4; const float ZERO_LIMIT = 1e-5; - int nit,nitmx=10; + int nit; + const int nitmx=10; int count=0; double a3,theta,rad,phi,one,phim=0,signZ; @@ -94,7 +52,7 @@ StatusCode TrigL2MuonSA::SagittaRadiusEstimate::setSagittaRadius(const LVL1::Rec double x0 = 0., y0 = 0., x1 = 0., y1 = 0., x2 = 0., y2 = 0., x3 = 0., y3 = 0.; double tm = 0.; double xn = 0.; - double eps = 0.005; + const double eps = 0.005; TrigL2MuonSA::SuperPoint* superPoints[4]; @@ -177,7 +135,7 @@ StatusCode TrigL2MuonSA::SagittaRadiusEstimate::setSagittaRadius(const LVL1::Rec } phi = atan2(trackPattern.phiMSDir*one,one); - if(phim>=CLHEP::pi+0.1) phim = phim - 2*CLHEP::pi; + if(phim>=M_PI+0.1) phim = phim - 2*M_PI; if(phim>=0) trackPattern.phiMap = (phi>=0.)? phi - phim : phim -fabs(phi); else trackPattern.phiMap = phi - phim; @@ -217,7 +175,7 @@ StatusCode TrigL2MuonSA::SagittaRadiusEstimate::setSagittaRadius(const LVL1::Rec one = (cos(p_roi->phi())>0)? 1: -1; } phi = atan2(trackPattern.phiMSDir*one,one); - if(phim>=CLHEP::pi+0.1) phim = phim - 2*CLHEP::pi; + if(phim>=M_PI+0.1) phim = phim - 2*M_PI; if(phim>=0) trackPattern.phiMap = (phi>=0.)? phi - phim : phim -fabs(phi); else trackPattern.phiMap = phi - phim; @@ -328,7 +286,7 @@ StatusCode TrigL2MuonSA::SagittaRadiusEstimate::setSagittaRadius(const LVL1::Rec } phi = atan2(trackPattern.phiMSDir*one,one); - if(phim>=CLHEP::pi+0.1) phim = phim - 2*CLHEP::pi; + if(phim>=M_PI+0.1) phim = phim - 2*M_PI; if(phim>=0) trackPattern.phiMap = (phi>=0.)? phi - phim : phim -fabs(phi); else trackPattern.phiMap = phi - phim; @@ -366,14 +324,3 @@ StatusCode TrigL2MuonSA::SagittaRadiusEstimate::setSagittaRadius(const LVL1::Rec // -------------------------------------------------------------------------------- // -------------------------------------------------------------------------------- -StatusCode TrigL2MuonSA::SagittaRadiusEstimate::finalize() -{ - ATH_MSG_DEBUG("Finalizing SagittaRadiusEstimate - package version " << PACKAGE_VERSION); - - StatusCode sc = AthAlgTool::finalize(); - return sc; -} - -// -------------------------------------------------------------------------------- -// -------------------------------------------------------------------------------- - diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcDataPreparator.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcDataPreparator.cxx index 97403ea9ae044d9c057e9d881aafbd2555f716a5..b4a5f877bebd2fd900405674059871ca155f4add 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcDataPreparator.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcDataPreparator.cxx @@ -2,9 +2,9 @@ Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ -#include "TrigL2MuonSA/TgcDataPreparator.h" +#include <cmath> -#include "CLHEP/Units/PhysicalConstants.h" +#include "TrigL2MuonSA/TgcDataPreparator.h" #include "TrigL2MuonSA/TgcData.h" #include "TrigL2MuonSA/RecMuonRoIUtils.h" #include "MuonReadoutGeometry/MuonDetectorManager.h" @@ -13,15 +13,6 @@ #include "MuonCnvToolInterfaces/IMuonRawDataProviderTool.h" #include "AthenaBaseComps/AthMsgStreamMacros.h" -using namespace MuonGM; - -// -------------------------------------------------------------------------------- -// -------------------------------------------------------------------------------- - -static const InterfaceID IID_TgcDataPreparator("IID_TgcDataPreparator", 1, 0); - -const InterfaceID& TrigL2MuonSA::TgcDataPreparator::interfaceID() { return IID_TgcDataPreparator; } - // -------------------------------------------------------------------------------- // -------------------------------------------------------------------------------- @@ -29,16 +20,9 @@ TrigL2MuonSA::TgcDataPreparator::TgcDataPreparator(const std::string& type, const std::string& name, const IInterface* parent): AthAlgTool(type,name,parent), - m_activeStore( "ActiveStoreSvc", name ), - m_rawDataProviderTool("Muon::TGC_RawDataProviderTool/TGC_RawDataProviderTool"), - m_tgcPrepDataProvider("Muon::TgcRdoToPrepDataTool/TgcPrepDataProviderTool"), m_regionSelector( "RegSelSvc", name ), - m_robDataProvider( "ROBDataProviderSvc", name ), - m_options(), m_recMuonRoIUtils() + m_robDataProvider( "ROBDataProviderSvc", name ) { - declareInterface<TrigL2MuonSA::TgcDataPreparator>(this); - declareProperty("TgcRawDataProvider", m_rawDataProviderTool); - declareProperty("TgcPrepDataProvider", m_tgcPrepDataProvider); } // -------------------------------------------------------------------------------- @@ -55,18 +39,12 @@ StatusCode TrigL2MuonSA::TgcDataPreparator::initialize() ATH_CHECK(m_idHelperSvc.retrieve()); - ATH_CHECK( m_activeStore.retrieve() ); - ATH_MSG_DEBUG("Retrieved ActiveStoreSvc." ); - // Retreive TGC raw data provider tool ATH_MSG_DEBUG(m_decodeBS); ATH_MSG_DEBUG(m_doDecoding); // disable TGC Raw data provider if we either don't decode BS or don't decode TGCs - if (m_rawDataProviderTool.retrieve(DisableTool{ !m_decodeBS || !m_doDecoding}).isFailure()) { - msg (MSG::FATAL) << "Failed to retrieve " << m_rawDataProviderTool << endmsg; - return StatusCode::FAILURE; - } else - msg (MSG::INFO) << "Retrieved Tool " << m_rawDataProviderTool << endmsg; + ATH_CHECK( m_rawDataProviderTool.retrieve(DisableTool{ !m_decodeBS || !m_doDecoding}) ); + ATH_MSG_DEBUG("Retrieved Tool " << m_rawDataProviderTool); // Disable PRD converter if we don't do the data decoding ATH_CHECK( m_tgcPrepDataProvider.retrieve(DisableTool{!m_doDecoding}) ); @@ -84,30 +62,21 @@ StatusCode TrigL2MuonSA::TgcDataPreparator::initialize() // -------------------------------------------------------------------------------- // -------------------------------------------------------------------------------- -void TrigL2MuonSA::TgcDataPreparator::setRoIBasedDataAccess(bool use_RoIBasedDataAccess) -{ - m_use_RoIBasedDataAccess = use_RoIBasedDataAccess; - return; -} - -// -------------------------------------------------------------------------------- -// -------------------------------------------------------------------------------- - StatusCode TrigL2MuonSA::TgcDataPreparator::prepareData(const LVL1::RecMuonRoI* p_roi, TrigL2MuonSA::TgcHits& tgcHits) { float roi_eta = p_roi->eta(); float roi_phi = p_roi->phi(); - if (roi_phi < 0) roi_phi += 2.0 * CLHEP::pi; + if (roi_phi < 0) roi_phi += 2.0 * M_PI; double etaMin = p_roi->eta() - 0.2; double etaMax = p_roi->eta() + 0.2; double phiMin = p_roi->phi() - 0.1; double phiMax = p_roi->phi() + 0.1; - if( phiMin < 0 ) phiMin += 2*CLHEP::pi; - if( phiMax < 0 ) phiMax += 2*CLHEP::pi; - if( phiMin > 2*CLHEP::pi ) phiMin -= 2*CLHEP::pi; - if( phiMax > 2*CLHEP::pi ) phiMax -= 2*CLHEP::pi; + if( phiMin < 0 ) phiMin += 2*M_PI; + if( phiMax < 0 ) phiMax += 2*M_PI; + if( phiMin > 2*M_PI ) phiMin -= 2*M_PI; + if( phiMax > 2*M_PI ) phiMax -= 2*M_PI; TrigRoiDescriptor* roi = new TrigRoiDescriptor( p_roi->eta(), etaMin, etaMax, p_roi->phi(), phiMin, phiMax ); const IRoiDescriptor* iroi = (IRoiDescriptor*) roi; @@ -117,15 +86,15 @@ StatusCode TrigL2MuonSA::TgcDataPreparator::prepareData(const LVL1::RecMuonRoI* int gasGap; int channel; - bool isLowPt = m_recMuonRoIUtils.isLowPt(p_roi); + const bool isLowPt = m_recMuonRoIUtils.isLowPt(p_roi); // Select the eta cut based on ROI Pt. - double mid_eta_test = (isLowPt) ? m_options.roadParameters().deltaEtaAtMiddleForLowPt() + const double mid_eta_test = (isLowPt) ? m_options.roadParameters().deltaEtaAtMiddleForLowPt() : m_options.roadParameters().deltaEtaAtMiddleForHighPt(); - double inn_eta_test = (isLowPt) ? m_options.roadParameters().deltaEtaAtInnerForLowPt() + const double inn_eta_test = (isLowPt) ? m_options.roadParameters().deltaEtaAtInnerForLowPt() : m_options.roadParameters().deltaEtaAtInnerForHighPt(); - double mid_phi_test = m_options.roadParameters().deltaPhiAtMiddle(); - double inn_phi_test = m_options.roadParameters().deltaPhiAtInner(); + const double mid_phi_test = m_options.roadParameters().deltaPhiAtMiddle(); + const double inn_phi_test = m_options.roadParameters().deltaPhiAtInner(); if(m_doDecoding) { std::vector<IdentifierHash> tgcHashList; @@ -149,40 +118,30 @@ StatusCode TrigL2MuonSA::TgcDataPreparator::prepareData(const LVL1::RecMuonRoI* } }//doDecoding - if ( m_activeStore ) { - auto tgcContainerHandle = SG::makeHandle(m_tgcContainerKey); - tgcPrepContainer = tgcContainerHandle.cptr(); - if (!tgcContainerHandle.isValid()) { - ATH_MSG_ERROR("Could not retrieve PrepDataContainer key:" << m_tgcContainerKey.key()); - return StatusCode::FAILURE; - } else { - ATH_MSG_DEBUG("Retrieved PrepDataContainer: " << tgcPrepContainer->numberOfCollections()); - } - } else { - ATH_MSG_ERROR("Null pointer to ActiveStore"); + auto tgcContainerHandle = SG::makeHandle(m_tgcContainerKey); + tgcPrepContainer = tgcContainerHandle.cptr(); + if (!tgcContainerHandle.isValid()) { + ATH_MSG_ERROR("Could not retrieve PrepDataContainer key:" << m_tgcContainerKey.key()); return StatusCode::FAILURE; - } + } else { + ATH_MSG_DEBUG("Retrieved PrepDataContainer: " << tgcPrepContainer->numberOfCollections()); + } //Find closest wires in Middle - Muon::TgcPrepDataContainer::const_iterator wi = tgcPrepContainer->begin(); - Muon::TgcPrepDataContainer::const_iterator wi_end = tgcPrepContainer->end(); float min_dphi_wire=1000.; float second_dphi_wire=1000.; std::vector<float> ov_dphi; ov_dphi.clear(); - for( ; wi!=wi_end; ++wi ) { // loop over collections - const Muon::TgcPrepDataCollection* colwi = *wi; - if( !colwi ) continue; - Muon::TgcPrepDataCollection::const_iterator cwi = colwi->begin(); - Muon::TgcPrepDataCollection::const_iterator cwi_end = colwi->end(); - for( ;cwi!=cwi_end;++cwi ){ // loop over data in the collection - if( !*cwi ) continue; - const Muon::TgcPrepData& prepDataWi = **cwi; + for( const Muon::TgcPrepDataCollection* wi : *tgcPrepContainer ) { // loop over collections + if( !wi ) continue; + for( const Muon::TgcPrepData* cwi : *wi ){ // loop over data in the collection + if( !cwi ) continue; + const Muon::TgcPrepData& prepDataWi = *cwi; if (!m_idHelperSvc->tgcIdHelper().isStrip(prepDataWi.identify())) {//wire int stationNumWi = m_idHelperSvc->tgcIdHelper().stationRegion(prepDataWi.identify())-1; if (stationNumWi==-1) stationNumWi=3; if (stationNumWi<3 && fabs(prepDataWi.globalPosition().eta() - roi_eta) < mid_eta_test ) { - float dphi = acos(cos(prepDataWi.globalPosition().phi()-roi_phi)); + const float dphi = acos(cos(prepDataWi.globalPosition().phi()-roi_phi)); bool overlap=false; for (unsigned int ov=0;ov<ov_dphi.size();ov++) if (fabs(dphi-ov_dphi[ov])<1e-5) overlap=true; @@ -201,23 +160,18 @@ StatusCode TrigL2MuonSA::TgcDataPreparator::prepareData(const LVL1::RecMuonRoI* } //Check if there are enough number of hits - Muon::TgcPrepDataContainer::const_iterator hit = tgcPrepContainer->begin(); - Muon::TgcPrepDataContainer::const_iterator hit_end = tgcPrepContainer->end(); int num_min_hits=0; int num_second_hits=0; - for( ; hit!=hit_end; ++hit ) { // loop over collections - const Muon::TgcPrepDataCollection* colhit = *hit; - if( !colhit ) continue; - Muon::TgcPrepDataCollection::const_iterator chit = colhit->begin(); - Muon::TgcPrepDataCollection::const_iterator chit_end = colhit->end(); - for( ;chit!=chit_end;++chit ){ // loop over data in the collection - if( !*chit ) continue; - const Muon::TgcPrepData& prepDataHit = **chit; + for( const Muon::TgcPrepDataCollection* hit : *tgcPrepContainer ) { // loop over collections + if( !hit ) continue; + for( const Muon::TgcPrepData* chit : *hit ){ // loop over data in the collection + if( !chit ) continue; + const Muon::TgcPrepData& prepDataHit = *chit; if (!m_idHelperSvc->tgcIdHelper().isStrip(prepDataHit.identify())) {//strip int stationNumHit = m_idHelperSvc->tgcIdHelper().stationRegion(prepDataHit.identify())-1; if (stationNumHit==-1) stationNumHit=3; if (stationNumHit<3 && fabs(prepDataHit.globalPosition().eta() - roi_eta) < mid_eta_test ) { - float dphi = acos(cos(prepDataHit.globalPosition().phi()-roi_phi)); + const float dphi = acos(cos(prepDataHit.globalPosition().phi()-roi_phi)); if (fabs(dphi-min_dphi_wire)<1e-5) num_min_hits++; if (fabs(dphi-second_dphi_wire)<1e-5) num_second_hits++; } @@ -232,32 +186,26 @@ StatusCode TrigL2MuonSA::TgcDataPreparator::prepareData(const LVL1::RecMuonRoI* else useDefault=true; } - Muon::TgcPrepDataContainer::const_iterator it = tgcPrepContainer->begin(); - Muon::TgcPrepDataContainer::const_iterator it_end = tgcPrepContainer->end(); - for( ; it!=it_end; ++it ) { // loop over collections - const Muon::TgcPrepDataCollection* col = *it; + for( const Muon::TgcPrepDataCollection* col : *tgcPrepContainer ) { // loop over collections if( !col ) continue; - Muon::TgcPrepDataCollection::const_iterator cit = col->begin(); - Muon::TgcPrepDataCollection::const_iterator cit_end = col->end(); - for( ;cit!=cit_end;++cit ){ // loop over data in the collection - if( !*cit ) continue; - - const Muon::TgcPrepData& prepData = **cit; + for( const Muon::TgcPrepData* cit : *col ){ // loop over data in the collection + if( !cit ) continue; + const Muon::TgcPrepData& prepData = *cit; bool isInRoad = false; int stationNum = m_idHelperSvc->tgcIdHelper().stationRegion(prepData.identify())-1; if (stationNum==-1) stationNum=3; if (m_idHelperSvc->tgcIdHelper().isStrip(prepData.identify())) { double dphi = fabs(prepData.globalPosition().phi() - roi_phi); - if( dphi > CLHEP::pi*2 ) dphi = dphi - CLHEP::pi*2; - if( dphi > CLHEP::pi ) dphi = CLHEP::pi*2 - dphi; + if( dphi > M_PI*2 ) dphi = dphi - M_PI*2; + if( dphi > M_PI ) dphi = M_PI*2 - dphi; // For strips, apply phi cut if ( stationNum < 3 && dphi < mid_phi_test ) { isInRoad = true; } else if( stationNum == 3 && dphi < inn_phi_test ) { isInRoad = true; } } else { // For wires, apply eta cut. - float dphi = acos(cos(prepData.globalPosition().phi()-roi_phi)); + const float dphi = acos(cos(prepData.globalPosition().phi()-roi_phi)); if ( stationNum < 3 && fabs(prepData.globalPosition().eta() - roi_eta) < mid_eta_test ) { if (useDefault) isInRoad = true;//default else if (fabs(dphi-dphi_wire)<1e-5) isInRoad = true;//for close-by muon diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcFit.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcFit.cxx index 6e574018cb3fe500feeb7883b85e4c4eee4f7cc2..2fdf1347c336fe0e26d47a47278ee9d7df9462e7 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcFit.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcFit.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "TrigL2MuonSA/TgcFit.h" @@ -7,58 +7,20 @@ #include "gsl/gsl_fit.h" #include <float.h> #include <iostream> -#include <math.h> +#include <cmath> #include <sstream> #include <set> -#include "CLHEP/Units/PhysicalConstants.h" - #include "AthenaBaseComps/AthMsgStreamMacros.h" // -------------------------------------------------------------------------------- // -------------------------------------------------------------------------------- -static const InterfaceID IID_TgcFit("IID_TgcFit", 1, 0); - -const InterfaceID& TrigL2MuonSA::TgcFit::interfaceID() { return IID_TgcFit; } - -// -------------------------------------------------------------------------------- -// -------------------------------------------------------------------------------- - TrigL2MuonSA::TgcFit::TgcFit(const std::string& type, const std::string& name, const IInterface* parent): - AthAlgTool(type, name, parent), - m_CHI2_TEST(10.0), - m_MIN_WIRE_POINTS(4), - m_MIN_STRIP_POINTS(3) -{ - declareInterface<TrigL2MuonSA::TgcFit>(this); -} - -// -------------------------------------------------------------------------------- -// -------------------------------------------------------------------------------- - -TrigL2MuonSA::TgcFit::~TgcFit(void) -{ -} - -// -------------------------------------------------------------------------------- -// -------------------------------------------------------------------------------- - -StatusCode TrigL2MuonSA::TgcFit::initialize() + AthAlgTool(type, name, parent) { - ATH_MSG_DEBUG("Initializing TgcFit - package version " << PACKAGE_VERSION) ; - - StatusCode sc; - sc = AthAlgTool::initialize(); - if (!sc.isSuccess()) { - ATH_MSG_ERROR("Could not initialize the AthAlgTool base class."); - return sc; - } - - // - return StatusCode::SUCCESS; } // -------------------------------------------------------------------------------- @@ -71,18 +33,6 @@ void TrigL2MuonSA::TgcFit::setFitParameters(double CHI2_TEST, m_CHI2_TEST = CHI2_TEST; m_MIN_WIRE_POINTS = MIN_WIRE_POINTS; m_MIN_STRIP_POINTS = MIN_STRIP_POINTS; - - return; -} - -// -------------------------------------------------------------------------------- -// -------------------------------------------------------------------------------- - -void TrigL2MuonSA::TgcFit::printDebug(const std::string& str) -{ - ATH_MSG_DEBUG(str); - - return; } // -------------------------------------------------------------------------------- @@ -90,9 +40,9 @@ void TrigL2MuonSA::TgcFit::printDebug(const std::string& str) double TrigL2MuonSA::TgcFit::LinStats::eval(double fX) const { - double fY, fYerr; - gsl_fit_linear_est(fX, fIntercept, fSlope, fCov00, fCov01, fCov11, &fY, &fYerr); - return fY; + double fY, fYerr; + gsl_fit_linear_est(fX, fIntercept, fSlope, fCov00, fCov01, fCov11, &fY, &fYerr); + return fY; } // -------------------------------------------------------------------------------- @@ -100,55 +50,55 @@ double TrigL2MuonSA::TgcFit::LinStats::eval(double fX) const void TrigL2MuonSA::TgcFit::SimpleStatistics(TrigL2MuonSA::TgcFit::PointArray& points, TrigL2MuonSA::TgcFit::SimpleStats& stats) { - double *y = new double[points.size()]; - double *w = new double[points.size()]; - for (;;) - { - stats.clear(); - for (unsigned iPt = 0; iPt < points.size(); iPt++) + double *y = new double[points.size()]; + double *w = new double[points.size()]; + for (;;) + { + stats.clear(); + for (const TrigL2MuonSA::TgcFit::Point& Pt : points) + { + // Exclude outliers. + if (!Pt.bOutlier) { - // Exclude outliers. - if (!points[iPt].bOutlier) - { - y[stats.n] = points[iPt].fY; - w[stats.n] = points[iPt].fW; - stats.n++; - } + y[stats.n] = Pt.fY; + w[stats.n] = Pt.fW; + stats.n++; } - if (stats.n == 0) - break; - // Calculate mean and standard deviation. - stats.fMean = gsl_stats_wmean(w, 1, y, 1, stats.n); - if (stats.n == 1) - break; - stats.fStd = gsl_stats_wsd (w, 1, y, 1, stats.n); - double fMaxChi2 = 0.0; - int iPtMax = -1; - for (unsigned iPt = 0; iPt < points.size(); iPt++) + } + if (stats.n == 0) + break; + // Calculate mean and standard deviation. + stats.fMean = gsl_stats_wmean(w, 1, y, 1, stats.n); + if (stats.n == 1) + break; + stats.fStd = gsl_stats_wsd (w, 1, y, 1, stats.n); + double fMaxChi2 = 0.0; + int iPtMax = -1; + for (unsigned iPt = 0; iPt < points.size(); iPt++) + { + if (!points[iPt].bOutlier) { - if (!points[iPt].bOutlier) - { - double fDiff = points[iPt].fY - stats.fMean; - points[iPt].fChi2 = points[iPt].fW * fDiff * fDiff; - stats.fChi2 += points[iPt].fChi2; - if (fMaxChi2 < points[iPt].fChi2) - { - fMaxChi2 = points[iPt].fChi2; - iPtMax = iPt; - } - } + double fDiff = points[iPt].fY - stats.fMean; + points[iPt].fChi2 = points[iPt].fW * fDiff * fDiff; + stats.fChi2 += points[iPt].fChi2; + if (fMaxChi2 < points[iPt].fChi2) + { + fMaxChi2 = points[iPt].fChi2; + iPtMax = iPt; + } } - // Print results. - ATH_MSG_DEBUG( "SimpleStatistics:" - << " n=" << stats.n << " Mean=" << stats.fMean - << " Std=" << stats.fStd << " Chi2=" << stats.fChi2); - - if (iPtMax == -1 || fMaxChi2 < m_CHI2_TEST) - break; - points[iPtMax].bOutlier = true; - } - delete [] y; - delete [] w; + } + // Print results. + ATH_MSG_DEBUG( "SimpleStatistics:" + << " n=" << stats.n << " Mean=" << stats.fMean + << " Std=" << stats.fStd << " Chi2=" << stats.fChi2); + + if (iPtMax == -1 || fMaxChi2 < m_CHI2_TEST) + break; + points[iPtMax].bOutlier = true; + } + delete [] y; + delete [] w; } // -------------------------------------------------------------------------------- @@ -156,256 +106,244 @@ void TrigL2MuonSA::TgcFit::SimpleStatistics(TrigL2MuonSA::TgcFit::PointArray& po void TrigL2MuonSA::TgcFit::linReg(TrigL2MuonSA::TgcFit::PointArray& points, TrigL2MuonSA::TgcFit::LinStats& stats) { - double *x = new double[points.size()]; - double *y = new double[points.size()]; - double *w = new double[points.size()]; - for (;;) - { - stats.clear(); - for (unsigned iPt = 0; iPt < points.size(); iPt++) + double *x = new double[points.size()]; + double *y = new double[points.size()]; + double *w = new double[points.size()]; + for (;;) + { + stats.clear(); + for (const TrigL2MuonSA::TgcFit::Point& Pt : points) + { + if (!Pt.bOutlier) { - if (!points[iPt].bOutlier) - { - x[stats.n] = points[iPt].fX; - y[stats.n] = points[iPt].fY; - w[stats.n] = points[iPt].fW; - stats.n++; - } + x[stats.n] = Pt.fX; + y[stats.n] = Pt.fY; + w[stats.n] = Pt.fW; + stats.n++; } - if (stats.n < 2) - break; - - gsl_fit_wlinear(x, 1, - w, 1, - y, 1, - stats.n, - &stats.fIntercept, &stats.fSlope, - &stats.fCov00, &stats.fCov01, &stats.fCov11, - &stats.fChi2); - ATH_MSG_DEBUG("Y=" << stats.fIntercept << "+X*" << stats.fSlope - << ", N=" << stats.n << ", Chi2=" << stats.fChi2); - - double fMaxChi2 = 0.0; - int iPtMax = -1; - for (unsigned iPt = 0; iPt < points.size(); iPt++) + } + if (stats.n < 2) + break; + + gsl_fit_wlinear(x, 1, + w, 1, + y, 1, + stats.n, + &stats.fIntercept, &stats.fSlope, + &stats.fCov00, &stats.fCov01, &stats.fCov11, + &stats.fChi2); + ATH_MSG_DEBUG("Y=" << stats.fIntercept << "+X*" << stats.fSlope + << ", N=" << stats.n << ", Chi2=" << stats.fChi2); + + double fMaxChi2 = 0.0; + int iPtMax = -1; + for (unsigned iPt = 0; iPt < points.size(); iPt++) + { + if (!points[iPt].bOutlier) { - if (!points[iPt].bOutlier) - { - double fDiff = points[iPt].fY - stats.eval(points[iPt].fX); - points[iPt].fChi2 = points[iPt].fW * fDiff * fDiff; - if (fMaxChi2 < points[iPt].fChi2) - { - fMaxChi2 = points[iPt].fChi2; - iPtMax = iPt; - } - } + double fDiff = points[iPt].fY - stats.eval(points[iPt].fX); + points[iPt].fChi2 = points[iPt].fW * fDiff * fDiff; + if (fMaxChi2 < points[iPt].fChi2) + { + fMaxChi2 = points[iPt].fChi2; + iPtMax = iPt; + } } - if (iPtMax == -1 || fMaxChi2 < m_CHI2_TEST || stats.n <= 2) - break; - points[iPtMax].bOutlier = true; - } - - delete [] x; - delete [] y; - delete [] w; - - // Print results - for (unsigned iPt = 0; iPt < points.size(); iPt++) - { - if (!points[iPt].bOutlier) - { - ATH_MSG_DEBUG("Idx=" << points[iPt].nIdx - << ", x=" << points[iPt].fX - << ", y=" << points[iPt].fY - << ", w=" << points[iPt].fW - << ", Y=" << stats.eval(points[iPt].fX) - << ", chi2=" << points[iPt].fChi2); - } - } + } + if (iPtMax == -1 || fMaxChi2 < m_CHI2_TEST || stats.n <= 2) + break; + points[iPtMax].bOutlier = true; + } + + delete [] x; + delete [] y; + delete [] w; + + // Print results + for (const TrigL2MuonSA::TgcFit::Point& Pt : points) + { + if (!Pt.bOutlier) + { + ATH_MSG_DEBUG("Idx=" << Pt.nIdx + << ", x=" << Pt.fX + << ", y=" << Pt.fY + << ", w=" << Pt.fW + << ", Y=" << stats.eval(Pt.fX) + << ", chi2=" << Pt.fChi2); + } + } } // -------------------------------------------------------------------------------- // -------------------------------------------------------------------------------- TrigL2MuonSA::TgcFit::Status TrigL2MuonSA::TgcFit::runTgcMiddle(TrigL2MuonSA::TgcFit::PointArray& stripPoints, - TrigL2MuonSA::TgcFit::PointArray& wirePoints, - TrigL2MuonSA::TgcFitResult& tgcFitResult) + TrigL2MuonSA::TgcFit::PointArray& wirePoints, + TrigL2MuonSA::TgcFitResult& tgcFitResult) { ATH_MSG_DEBUG("TrigL2MuonSA::TgcFit::runTgcMiddle stripPoints=" << stripPoints.size() - << " wirePoints=" << wirePoints.size()); - - tgcFitResult.tgcMidRhoNin = wirePoints.size(); - tgcFitResult.tgcMidPhiNin = stripPoints.size(); - - if (stripPoints.empty() || wirePoints.empty()) - return FIT_NONE; - - unsigned iPt; - Status status = FIT_NONE; - LinStats stripStats; - LinStats wireStats; - std::set<int> wireStations, stripStations; - - for (iPt = 0; iPt < wirePoints.size(); iPt++) - { - wireStations.insert(wirePoints[iPt].nStation); - } - for (iPt = 0; iPt < stripPoints.size(); iPt++) - { - stripStations.insert(stripPoints[iPt].nStation); - } - - if (wireStations.size() == 1 || wirePoints.size() < m_MIN_WIRE_POINTS) - { - status = FIT_POINT; - printDebug("runTgcMiddle: Wires fit point"); - SimpleStats stats; - SimpleStatistics(wirePoints, stats); - wireStats.fIntercept = stats.fMean; - wireStats.n = stats.n; - wireStats.fChi2 = stats.fChi2; + << " wirePoints=" << wirePoints.size()); + + tgcFitResult.tgcMidRhoNin = wirePoints.size(); + tgcFitResult.tgcMidPhiNin = stripPoints.size(); + + if (stripPoints.empty() || wirePoints.empty()) + return FIT_NONE; + Status status = FIT_NONE; + LinStats stripStats; + LinStats wireStats; + std::set<int> wireStations, stripStations; + + for (const TrigL2MuonSA::TgcFit::Point& wirePt : wirePoints) + { + wireStations.insert(wirePt.nStation); + } + for (const TrigL2MuonSA::TgcFit::Point& stripPt : stripPoints) + { + stripStations.insert(stripPt.nStation); + } + + if (wireStations.size() == 1 || wirePoints.size() < m_MIN_WIRE_POINTS) + { + status = FIT_POINT; + printDebug("runTgcMiddle: Wires fit point"); + SimpleStats stats; + SimpleStatistics(wirePoints, stats); + wireStats.fIntercept = stats.fMean; + wireStats.n = stats.n; + wireStats.fChi2 = stats.fChi2; + + printDebug("runTgcMiddle: Strips fit point"); + SimpleStatistics(stripPoints, stats); + stripStats.fIntercept = stats.fMean; + stripStats.n = stats.n; + stripStats.fChi2 = stats.fChi2; + } + else + { + status = FIT_LINE; + printDebug("runTgcMiddle: Wires fit line"); + linReg(wirePoints, wireStats); + if (stripStations.size() == 1 || stripPoints.size() < m_MIN_STRIP_POINTS) + { printDebug("runTgcMiddle: Strips fit point"); + SimpleStats stats; SimpleStatistics(stripPoints, stats); stripStats.fIntercept = stats.fMean; stripStats.n = stats.n; stripStats.fChi2 = stats.fChi2; - } - else - { - status = FIT_LINE; - printDebug("runTgcMiddle: Wires fit line"); - linReg(wirePoints, wireStats); - if (stripStations.size() == 1 || stripPoints.size() < m_MIN_STRIP_POINTS) - { - printDebug("runTgcMiddle: Strips fit point"); - SimpleStats stats; - SimpleStatistics(stripPoints, stats); - stripStats.fIntercept = stats.fMean; - stripStats.n = stats.n; - stripStats.fChi2 = stats.fChi2; - } - else + } + else + { + printDebug("runTgcMiddle: Strips fit line"); + linReg(stripPoints, stripStats); + } + } + + tgcFitResult.intercept = wireStats.fIntercept; + tgcFitResult.slope = wireStats.fSlope; + + // Create low and high points + double lowZ = 30000.0, highZ = 0.0; + int iLow = -1, iHigh = -1; + for (unsigned iPt = 0; iPt < wirePoints.size(); iPt++) + { + if (!wirePoints[iPt].bOutlier) + { + if (lowZ > fabs(wirePoints[iPt].fX)) { - printDebug("runTgcMiddle: Strips fit line"); - linReg(stripPoints, stripStats); + lowZ = fabs(wirePoints[iPt].fX); + iLow = iPt; } - } - - tgcFitResult.intercept = wireStats.fIntercept; - tgcFitResult.slope = wireStats.fSlope; - - // Create low and high points - double lowZ = 30000.0, highZ = 0.0; - int iLow = -1, iHigh = -1; - for (iPt = 0; iPt < wirePoints.size(); iPt++) - { - if (!wirePoints[iPt].bOutlier) + if (highZ < fabs(wirePoints[iPt].fX)) { - if (lowZ > fabs(wirePoints[iPt].fX)) - { - lowZ = fabs(wirePoints[iPt].fX); - iLow = iPt; - } - if (highZ < fabs(wirePoints[iPt].fX)) - { - highZ = fabs(wirePoints[iPt].fX); - iHigh = iPt; - } + highZ = fabs(wirePoints[iPt].fX); + iHigh = iPt; } - } - if (iLow > -1 && iLow < (int)wirePoints.size()) lowZ = wirePoints[iLow].fX; - if (iHigh > -1 && iHigh < (int)wirePoints.size()) highZ = wirePoints[iHigh].fX; - Amg::Vector3D p1(wireStats.eval(lowZ), 0.0, lowZ); - double phi = stripStats.eval(lowZ); - if( phi > CLHEP::pi ) phi -= CLHEP::pi*2; - if( phi < -CLHEP::pi ) phi += CLHEP::pi*2; - Amg::setPhi(p1, phi); - Amg::Vector3D p2(wireStats.eval(highZ), 0.0, highZ); - phi = stripStats.eval(highZ); - if( phi > CLHEP::pi ) phi -= CLHEP::pi*2; - if( phi < -CLHEP::pi ) phi += CLHEP::pi*2; - Amg::setPhi(p2, phi); - { - ATH_MSG_DEBUG("runTgcMiddle: Point1 eta=" << p1.eta() - << ",phi=" << p1.phi() << ",perp=" << p1.perp() << ",z=" << p1.z()); - } - { - ATH_MSG_DEBUG("runTgcMiddle: Point2 eta=" << p2.eta() - << ",phi=" << p2.phi() << ",perp=" << p2.perp() << ",z=" << p2.z()); - } - tgcFitResult.tgcMid1[0] = p1.eta(); - tgcFitResult.tgcMid1[1] = p1.phi(); - tgcFitResult.tgcMid1[2] = p1.perp(); - tgcFitResult.tgcMid1[3] = p1.z(); - tgcFitResult.tgcMid2[0] = p2.eta(); - tgcFitResult.tgcMid2[1] = p2.phi(); - tgcFitResult.tgcMid2[2] = p2.perp(); - tgcFitResult.tgcMid2[3] = p2.z(); - tgcFitResult.tgcMidRhoChi2 = wireStats.fChi2; - tgcFitResult.tgcMidRhoN = wireStats.n; - tgcFitResult.tgcMidPhiChi2 = stripStats.fChi2; - tgcFitResult.tgcMidPhiN = stripStats.n; - - return status; + } + } + if (iLow > -1 && iLow < (int)wirePoints.size()) lowZ = wirePoints[iLow].fX; + if (iHigh > -1 && iHigh < (int)wirePoints.size()) highZ = wirePoints[iHigh].fX; + Amg::Vector3D p1(wireStats.eval(lowZ), 0.0, lowZ); + double phi = stripStats.eval(lowZ); + if( phi > M_PI ) phi -= M_PI*2; + if( phi < -M_PI ) phi += M_PI*2; + Amg::setPhi(p1, phi); + Amg::Vector3D p2(wireStats.eval(highZ), 0.0, highZ); + phi = stripStats.eval(highZ); + if( phi > M_PI ) phi -= M_PI*2; + if( phi < -M_PI ) phi += M_PI*2; + Amg::setPhi(p2, phi); + { + ATH_MSG_DEBUG("runTgcMiddle: Point1 eta=" << p1.eta() + << ",phi=" << p1.phi() << ",perp=" << p1.perp() << ",z=" << p1.z()); + } + { + ATH_MSG_DEBUG("runTgcMiddle: Point2 eta=" << p2.eta() + << ",phi=" << p2.phi() << ",perp=" << p2.perp() << ",z=" << p2.z()); + } + tgcFitResult.tgcMid1[0] = p1.eta(); + tgcFitResult.tgcMid1[1] = p1.phi(); + tgcFitResult.tgcMid1[2] = p1.perp(); + tgcFitResult.tgcMid1[3] = p1.z(); + tgcFitResult.tgcMid2[0] = p2.eta(); + tgcFitResult.tgcMid2[1] = p2.phi(); + tgcFitResult.tgcMid2[2] = p2.perp(); + tgcFitResult.tgcMid2[3] = p2.z(); + tgcFitResult.tgcMidRhoChi2 = wireStats.fChi2; + tgcFitResult.tgcMidRhoN = wireStats.n; + tgcFitResult.tgcMidPhiChi2 = stripStats.fChi2; + tgcFitResult.tgcMidPhiN = stripStats.n; + + return status; } // -------------------------------------------------------------------------------- // -------------------------------------------------------------------------------- TrigL2MuonSA::TgcFit::Status TrigL2MuonSA::TgcFit::runTgcInner(TrigL2MuonSA::TgcFit::PointArray& stripPoints, - TrigL2MuonSA::TgcFit::PointArray& wirePoints, - TrigL2MuonSA::TgcFitResult& tgcFitResult) + TrigL2MuonSA::TgcFit::PointArray& wirePoints, + TrigL2MuonSA::TgcFitResult& tgcFitResult) { - Status status = FIT_NONE; - SimpleStats stripStats; - SimpleStats wireStats; - - tgcFitResult.tgcInnRhoNin = wirePoints.size(); - tgcFitResult.tgcInnPhiNin = stripPoints.size(); - - ATH_MSG_DEBUG("runTgcInner: stripPoints.size()=" << stripPoints.size() - << ", wirePoints.size()=" << wirePoints.size()); - - if (stripPoints.size() > 1 && wirePoints.size() > 1) - { - status = FIT_POINT; - printDebug("runTgcInner: Wires fit point"); - SimpleStatistics(wirePoints, wireStats); - - printDebug("runTgcInner: Strips fit point"); - SimpleStatistics(stripPoints, stripStats); - - Amg::Vector3D p(wireStats.fMean, 0.0, wirePoints[0].fX); - double phi = stripStats.fMean; - if( phi > CLHEP::pi ) phi -= CLHEP::pi*2; - if( phi < -CLHEP::pi ) phi += CLHEP::pi*2; - Amg::setPhi(p, phi); - - ATH_MSG_DEBUG("runTgcInner: Point eta=" << p.eta() - << ",phi=" << p.phi() << ",perp=" << p.perp() << ",z=" << p.z()); - - tgcFitResult.tgcInn[0] = p.eta(); - tgcFitResult.tgcInn[1] = p.phi(); - tgcFitResult.tgcInn[2] = p.perp(); - tgcFitResult.tgcInn[3] = p.z(); - tgcFitResult.tgcInnRhoStd = wireStats.fStd; - tgcFitResult.tgcInnRhoN = wireStats.n; - tgcFitResult.tgcInnPhiStd = stripStats.fStd; - tgcFitResult.tgcInnPhiN = stripStats.n; - } - return status; -} - -// -------------------------------------------------------------------------------- -// -------------------------------------------------------------------------------- - -StatusCode TrigL2MuonSA::TgcFit::finalize() -{ - ATH_MSG_DEBUG("Finalizing TgcFit - package version " << PACKAGE_VERSION); - - StatusCode sc = AthAlgTool::finalize(); - return sc; + Status status = FIT_NONE; + SimpleStats stripStats; + SimpleStats wireStats; + + tgcFitResult.tgcInnRhoNin = wirePoints.size(); + tgcFitResult.tgcInnPhiNin = stripPoints.size(); + + ATH_MSG_DEBUG("runTgcInner: stripPoints.size()=" << stripPoints.size() + << ", wirePoints.size()=" << wirePoints.size()); + + if (stripPoints.size() > 1 && wirePoints.size() > 1) + { + status = FIT_POINT; + printDebug("runTgcInner: Wires fit point"); + SimpleStatistics(wirePoints, wireStats); + + printDebug("runTgcInner: Strips fit point"); + SimpleStatistics(stripPoints, stripStats); + + Amg::Vector3D p(wireStats.fMean, 0.0, wirePoints[0].fX); + double phi = stripStats.fMean; + if( phi > M_PI ) phi -= M_PI*2; + if( phi < -M_PI ) phi += M_PI*2; + Amg::setPhi(p, phi); + + ATH_MSG_DEBUG("runTgcInner: Point eta=" << p.eta() + << ",phi=" << p.phi() << ",perp=" << p.perp() << ",z=" << p.z()); + + tgcFitResult.tgcInn[0] = p.eta(); + tgcFitResult.tgcInn[1] = p.phi(); + tgcFitResult.tgcInn[2] = p.perp(); + tgcFitResult.tgcInn[3] = p.z(); + tgcFitResult.tgcInnRhoStd = wireStats.fStd; + tgcFitResult.tgcInnRhoN = wireStats.n; + tgcFitResult.tgcInnPhiStd = stripStats.fStd; + tgcFitResult.tgcInnPhiN = stripStats.n; + } + return status; } // -------------------------------------------------------------------------------- diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcRoadDefiner.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcRoadDefiner.cxx index bd5987d198fb60a78272abc0ed1315de5bf70510..1a769effe4b0ecafbf6e2bccd34175fb3d756aa4 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcRoadDefiner.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcRoadDefiner.cxx @@ -3,22 +3,15 @@ */ #include "TrigL2MuonSA/TgcRoadDefiner.h" +#include "TrigL2MuonSA/MdtRegion.h" #include "xAODTrigMuon/L2StandAloneMuonAuxContainer.h" #include "xAODTrigMuon/TrigMuonDefs.h" -#include "CLHEP/Units/PhysicalConstants.h" -#include "TrigL2MuonSA/MdtRegion.h" #include "TrigSteeringEvent/TrigRoiDescriptor.h" #include "AthenaBaseComps/AthMsgStreamMacros.h" - -// -------------------------------------------------------------------------------- -// -------------------------------------------------------------------------------- - -static const InterfaceID IID_TgcRoadDefiner("IID_TgcRoadDefiner", 1, 0); - -const InterfaceID& TrigL2MuonSA::TgcRoadDefiner::interfaceID() { return IID_TgcRoadDefiner; } +#include <cmath> // -------------------------------------------------------------------------------- // -------------------------------------------------------------------------------- @@ -26,14 +19,9 @@ const InterfaceID& TrigL2MuonSA::TgcRoadDefiner::interfaceID() { return IID_TgcR TrigL2MuonSA::TgcRoadDefiner::TgcRoadDefiner(const std::string& type, const std::string& name, const IInterface* parent): - AthAlgTool(type, name, parent), - m_backExtrapolatorTool(0), - m_ptEndcapLUT(0), - m_tgcFit("TrigL2MuonSA::TgcFit"), - m_rWidth_TGC_Failed(0), + AthAlgTool(type, name, parent), m_regionSelector( "RegSelSvc", name ) { - declareInterface<TrigL2MuonSA::TgcRoadDefiner>(this); } // -------------------------------------------------------------------------------- @@ -41,7 +29,6 @@ TrigL2MuonSA::TgcRoadDefiner::TgcRoadDefiner(const std::string& type, StatusCode TrigL2MuonSA::TgcRoadDefiner::initialize() { - ATH_MSG_DEBUG("Initializing TgcRoadDefiner - package version " << PACKAGE_VERSION) ; ATH_CHECK(AthAlgTool::initialize()); @@ -56,46 +43,13 @@ StatusCode TrigL2MuonSA::TgcRoadDefiner::initialize() // -------------------------------------------------------------------------------- // -------------------------------------------------------------------------------- -void TrigL2MuonSA::TgcRoadDefiner::setMdtGeometry(const ServiceHandle<IRegSelSvc>& regionSelector) -{ - m_regionSelector = regionSelector; -} - -// -------------------------------------------------------------------------------- -// -------------------------------------------------------------------------------- - -void TrigL2MuonSA::TgcRoadDefiner::setRoadWidthForFailure(double rWidth_TGC_Failed) -{ - m_rWidth_TGC_Failed = rWidth_TGC_Failed; - return; -} - -// -------------------------------------------------------------------------------- -// -------------------------------------------------------------------------------- - -void TrigL2MuonSA::TgcRoadDefiner::setExtrapolatorTool(ToolHandle<ITrigMuonBackExtrapolator>* backExtrapolator) -{ - m_backExtrapolatorTool = backExtrapolator; - return; -} - -// -------------------------------------------------------------------------------- -// -------------------------------------------------------------------------------- - -void TrigL2MuonSA::TgcRoadDefiner::setPtLUT(const TrigL2MuonSA::PtEndcapLUTSvc* ptEndcapLUTSvc) -{ - m_ptEndcapLUT = ptEndcapLUTSvc->ptEndcapLUT(); -} - -// -------------------------------------------------------------------------------- -// -------------------------------------------------------------------------------- - StatusCode TrigL2MuonSA::TgcRoadDefiner::defineRoad(const LVL1::RecMuonRoI* p_roi, const TrigL2MuonSA::TgcHits& tgcHits, TrigL2MuonSA::MuonRoad& muonRoad, TrigL2MuonSA::TgcFitResult& tgcFitResult) { const int N_STATION = 10; + const int N_LAYER = 8; bool isMiddleFailure = true; @@ -162,14 +116,14 @@ StatusCode TrigL2MuonSA::TgcRoadDefiner::defineRoad(const LVL1::RecMuonRoI* tgcFitResult.isSuccess = true; // PT calculation by using TGC fit result - const double PHI_RANGE = 12./(CLHEP::pi/8.); + const double PHI_RANGE = 12./(M_PI/8.); side = (tgcFitResult.tgcMid2[3]<=0) ? 0 : 1; double alpha = (*m_ptEndcapLUT)->alpha(tgcFitResult.tgcMid1[3], tgcFitResult.tgcMid1[2], tgcFitResult.tgcMid2[3], tgcFitResult.tgcMid2[2]); - int Octant = (int)(tgcFitResult.tgcMid1[1] / (CLHEP::pi/4.)); - double PhiInOctant = fabs(tgcFitResult.tgcMid1[1] - Octant * (CLHEP::pi/4.)); - if (PhiInOctant > (CLHEP::pi/8.)) PhiInOctant = (CLHEP::pi/4.) - PhiInOctant; + int Octant = (int)(tgcFitResult.tgcMid1[1] / (M_PI/4.)); + double PhiInOctant = fabs(tgcFitResult.tgcMid1[1] - Octant * (M_PI/4.)); + if (PhiInOctant > (M_PI/8.)) PhiInOctant = (M_PI/4.) - PhiInOctant; int phiBin = static_cast<int>(PhiInOctant * PHI_RANGE); int etaBin = static_cast<int>((fabs(tgcFitResult.tgcMid1[0]) - 1.)/0.05); @@ -191,20 +145,20 @@ StatusCode TrigL2MuonSA::TgcRoadDefiner::defineRoad(const LVL1::RecMuonRoI* tgcFitResult.isPhiDir = true; if( tgcFitResult.tgcMid1[1]*tgcFitResult.tgcMid2[1] < 0 - && fabsf(tgcFitResult.tgcMid1[1])>CLHEP::pi/2. ) { + && fabsf(tgcFitResult.tgcMid1[1])>M_PI/2. ) { double tmp1 = (tgcFitResult.tgcMid1[1]>0)? - tgcFitResult.tgcMid1[1] - CLHEP::pi : tgcFitResult.tgcMid1[1] + CLHEP::pi; + tgcFitResult.tgcMid1[1] - M_PI : tgcFitResult.tgcMid1[1] + M_PI; double tmp2 = (tgcFitResult.tgcMid2[1]>0)? - tgcFitResult.tgcMid2[1] - CLHEP::pi : tgcFitResult.tgcMid2[1] + CLHEP::pi; + tgcFitResult.tgcMid2[1] - M_PI : tgcFitResult.tgcMid2[1] + M_PI; double tmp = (tmp1+tmp2)/2.; tgcFitResult.dPhidZ = (fabs(tgcFitResult.tgcMid2[3]-tgcFitResult.tgcMid1[3]) > ZERO_LIMIT)? (tmp2-tmp1)/fabs(tgcFitResult.tgcMid2[3]-tgcFitResult.tgcMid1[3]): 0; - tgcFitResult.phi = (tmp>0.)? tmp - CLHEP::pi : tmp + CLHEP::pi; + tgcFitResult.phi = (tmp>0.)? tmp - M_PI : tmp + M_PI; } else { @@ -228,7 +182,7 @@ StatusCode TrigL2MuonSA::TgcRoadDefiner::defineRoad(const LVL1::RecMuonRoI* muonRoad.bw[endcap_extra][0] = tgcFitResult.intercept; muonRoad.aw[bee][0] = tgcFitResult.slope; muonRoad.bw[bee][0] = tgcFitResult.intercept; - for (int i_layer=0; i_layer<8; i_layer++) { + for (int i_layer=0; i_layer<N_LAYER; i_layer++) { muonRoad.rWidth[endcap_middle][i_layer] = R_WIDTH_DEFAULT; muonRoad.rWidth[endcap_outer][i_layer] = R_WIDTH_DEFAULT; muonRoad.rWidth[endcap_extra][i_layer] = R_WIDTH_DEFAULT; @@ -239,9 +193,9 @@ StatusCode TrigL2MuonSA::TgcRoadDefiner::defineRoad(const LVL1::RecMuonRoI* muonRoad.aw[endcap_inner][0] = tgcFitResult.tgcInn[2]/tgcFitResult.tgcInn[3]; muonRoad.aw[barrel_inner][0] = tgcFitResult.tgcInn[2]/tgcFitResult.tgcInn[3]; muonRoad.aw[csc][0] = tgcFitResult.tgcInn[2]/tgcFitResult.tgcInn[3]; - for (int i_layer=0; i_layer<8; i_layer++) muonRoad.rWidth[endcap_inner][i_layer] = R_WIDTH_DEFAULT; - for (int i_layer=0; i_layer<8; i_layer++) muonRoad.rWidth[barrel_inner][i_layer] = R_WIDTH_DEFAULT; - for (int i_layer=0; i_layer<8; i_layer++) muonRoad.rWidth[csc][i_layer] = R_WIDTH_DEFAULT; + for (int i_layer=0; i_layer<N_LAYER; i_layer++) muonRoad.rWidth[endcap_inner][i_layer] = R_WIDTH_DEFAULT; + for (int i_layer=0; i_layer<N_LAYER; i_layer++) muonRoad.rWidth[barrel_inner][i_layer] = R_WIDTH_DEFAULT; + for (int i_layer=0; i_layer<N_LAYER; i_layer++) muonRoad.rWidth[csc][i_layer] = R_WIDTH_DEFAULT; } else { // use the back extrapolator to retrieve the Etain the Innermost @@ -290,9 +244,9 @@ StatusCode TrigL2MuonSA::TgcRoadDefiner::defineRoad(const LVL1::RecMuonRoI* muonRoad.aw[csc][0] = 0; } - for (int i_layer=0; i_layer<8; i_layer++) muonRoad.rWidth[endcap_inner][i_layer] = R_WIDTH_INNER_NO_HIT; - for (int i_layer=0; i_layer<8; i_layer++) muonRoad.rWidth[barrel_inner][i_layer] = R_WIDTH_INNER_NO_HIT; - for (int i_layer=0; i_layer<8; i_layer++) muonRoad.rWidth[csc][i_layer] = R_WIDTH_INNER_NO_HIT; + for (int i_layer=0; i_layer<N_LAYER; i_layer++) muonRoad.rWidth[endcap_inner][i_layer] = R_WIDTH_INNER_NO_HIT; + for (int i_layer=0; i_layer<N_LAYER; i_layer++) muonRoad.rWidth[barrel_inner][i_layer] = R_WIDTH_INNER_NO_HIT; + for (int i_layer=0; i_layer<N_LAYER; i_layer++) muonRoad.rWidth[csc][i_layer] = R_WIDTH_INNER_NO_HIT; } @@ -321,7 +275,7 @@ StatusCode TrigL2MuonSA::TgcRoadDefiner::defineRoad(const LVL1::RecMuonRoI* muonRoad.bw[bee][0] = 0; muonRoad.aw[csc][0] = aw; muonRoad.bw[csc][0] = 0; - for (int i_layer=0; i_layer<8; i_layer++) { + for (int i_layer=0; i_layer<N_LAYER; i_layer++) { muonRoad.rWidth[endcap_inner][i_layer] = m_rWidth_TGC_Failed; muonRoad.rWidth[endcap_middle][i_layer] = m_rWidth_TGC_Failed; muonRoad.rWidth[endcap_outer][i_layer] = m_rWidth_TGC_Failed; @@ -366,17 +320,17 @@ StatusCode TrigL2MuonSA::TgcRoadDefiner::defineRoad(const LVL1::RecMuonRoI* double etaMax = p_roi->eta()+.02; double phiMin = muonRoad.phiMiddle-.01; double phiMax = muonRoad.phiMiddle+.01; - if(phiMax > CLHEP::pi) phiMax -= CLHEP::pi*2.; - if(phiMin < CLHEP::pi*-1) phiMin += CLHEP::pi*2.; + if(phiMax > M_PI) phiMax -= M_PI*2.; + if(phiMin < M_PI*-1) phiMin += M_PI*2.; TrigRoiDescriptor* roi = new TrigRoiDescriptor( p_roi->eta(), etaMin, etaMax, p_roi->phi(), phiMin, phiMax ); const IRoiDescriptor* iroi = (IRoiDescriptor*) roi; if (iroi) m_regionSelector->DetHashIDList(MDT, *iroi, mdtHashList); else m_regionSelector->DetHashIDList(MDT, mdtHashList); if(roi) delete roi; - for(int i_hash=0; i_hash<(int)mdtHashList.size(); i_hash++){ + for(const IdentifierHash& i_hash : mdtHashList ){ Identifier id; - int convert = m_idHelperSvc->mdtIdHelper().get_id(mdtHashList[i_hash], id, &context); + int convert = m_idHelperSvc->mdtIdHelper().get_id(i_hash, id, &context); if(convert!=0) ATH_MSG_ERROR("problem converting hash list to id"); @@ -385,11 +339,11 @@ StatusCode TrigL2MuonSA::TgcRoadDefiner::defineRoad(const LVL1::RecMuonRoI* if ( name.substr(0, 1) == 'B' ) continue; if ( name.substr(1, 1) != 'M' ) continue; int stationPhi = m_idHelperSvc->mdtIdHelper().stationPhi(id); - float floatPhi = (stationPhi-1)*CLHEP::pi/4; - if (name[2]=='S' || name[2]=='E') floatPhi = floatPhi + CLHEP::pi/8; + float floatPhi = (stationPhi-1)*M_PI/4; + if (name[2]=='S' || name[2]=='E') floatPhi = floatPhi + M_PI/8; tempDeltaPhi = fabs(floatPhi-muonRoad.phiMiddle); - if (phiMiddle<0) tempDeltaPhi = fabs(floatPhi-muonRoad.phiMiddle-2*CLHEP::pi); - if(tempDeltaPhi > CLHEP::pi) tempDeltaPhi = fabs(tempDeltaPhi - 2*CLHEP::pi); + if (phiMiddle<0) tempDeltaPhi = fabs(floatPhi-muonRoad.phiMiddle-2*M_PI); + if(tempDeltaPhi > M_PI) tempDeltaPhi = fabs(tempDeltaPhi - 2*M_PI); int LargeSmall = 0; if(name[2]=='S' || name[2]=='E') LargeSmall = 1; @@ -451,7 +405,7 @@ bool TrigL2MuonSA::TgcRoadDefiner::prepareTgcPoints(const TrigL2MuonSA::TgcHits& { w *= hit.r * hit.r; double phi = hit.phi; - if( phi < 0 && ( (CLHEP::pi+phi)<PHI_BOUNDARY) ) phi += CLHEP::pi*2; + if( phi < 0 && ( (M_PI+phi)<PHI_BOUNDARY) ) phi += M_PI*2; if ( hit.sta < 3 ) { m_tgcStripMidPoints.push_back(TgcFit::Point(iHit + 1, hit.sta, hit.z, phi, w)); } else if ( hit.sta ==3 ) { m_tgcStripInnPoints.push_back(TgcFit::Point(iHit + 1, hit.sta, hit.z, phi, w)); } } diff --git a/Trigger/TrigAlgorithms/TrigTileMuId/src/TrigTileLookForMuAlg.cxx b/Trigger/TrigAlgorithms/TrigTileMuId/src/TrigTileLookForMuAlg.cxx index 1a045197a01dbb6882cf7381b0c037fa797caf7e..f986cecb066cb0d44ea92309253989f97fd877ac 100755 --- a/Trigger/TrigAlgorithms/TrigTileMuId/src/TrigTileLookForMuAlg.cxx +++ b/Trigger/TrigAlgorithms/TrigTileMuId/src/TrigTileLookForMuAlg.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ //--------------------------------------------------------------------------- @@ -472,7 +472,7 @@ HLT::ErrorCode TrigTileLookForMuAlg::hltExecute(std::vector<std::vector<HLT::Tri OK_HighThr = true; if (!m_LooseSelection && (m0[k1][j1]>=m_thres0[k1]) ) OK_HighThr=false; - if ( ( ( (k1!=4 || k1!=25) && m0[k1][j1]>m_th0d ) || ( (k1==4 || k1==25) && m0[k1][j1]>m_thitcd ) ) && OK_HighThr ) { + if ( ( ( (k1!=4 && k1!=25) && m0[k1][j1]>m_th0d ) || ( (k1==4 || k1==25) && m0[k1][j1]>m_thitcd ) ) && OK_HighThr ) { enedp1[ci3] = m0[k1][j1]; aquality[ci3]=(m0[k1][j1] < m_thres0[k1] ? 0:1); diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/ConfAnalysis.cxx b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/ConfAnalysis.cxx index 7b6f0e3d423e411d3c751c2878344c6c262d9375..bc6f9459e8377386fcb329b5a736e77ec4e3b04d 100644 --- a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/ConfAnalysis.cxx +++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/ConfAnalysis.cxx @@ -1108,7 +1108,7 @@ void ConfAnalysis::finalise() { eff_vs_lb->finalise(); - z_vs_lb->Finalise(); z_vs_lb->Write(); + z_vs_lb->Finalise(Resplot::FitNull95); z_vs_lb->Write(); delete z_vs_lb; // TH1F* hefflb = eff_vs_lb->Hist(); diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/comparitor.cxx b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/comparitor.cxx index 93bd37dba24e51135de85c98177aa875f6a64720..5961fd9bac31bc1a1e6de07c378c7998848c131f 100644 --- a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/comparitor.cxx +++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/comparitor.cxx @@ -9,6 +9,7 @@ #include <cstdio> +#include <cmath> #include <cstdlib> #include <sys/time.h> #include <sys/stat.h> @@ -52,6 +53,89 @@ bool fulldbg = false; + +extern bool LINEF; +extern bool LINES; + + +TH1F* Rebin( TH1F* h, double f ) { + + if ( int(f) == f ) { + TH1F* n = (TH1F*)h->Clone("foeda"); n->SetDirectory(0); + n->Rebin(int(f)); + return n; + } + + int fi=int(f); + double fb=(f-fi); + + for ( int i=0 ; i<10 ; i++ ) { + fb *= 10; + if ( std::fabs(int(fb)-fb)<1e-6 ) break; + } + + std::vector<double> limits; + std::vector<double> contents; + + for ( int i=1 ; i<=h->GetNbinsX()+1 ; i++ ) { + limits.push_back( h->GetBinLowEdge(i) ); + contents.push_back( h->GetBinContent(i) ); + if ( i<fb ) { + for ( int ib=1 ; ib<fi ; ib++ ) contents.back() += h->GetBinContent(++i); + } + } + + TH1F* n = new TH1F( "foeda", h->GetTitle(), limits.size()-1, &limits[0] ); n->SetDirectory(0); + + for ( size_t i=0 ; i<contents.size() ; i++ ) n->SetBinContent( i+1, contents[i] ); + + return n; +} + + + + +TH1F* rebin_log( TH1F* h, bool low=false ) { + + double limits[40] = { + 0.5, 1.5, 2.5, 3.5, 4.5, + 5.5, 6.5, 7.5, 8.5, 9.5, + 10.5, 11.5, 12.5, 13.5, 14.5, + 15.5, 16.5, 17.5, 18.5, 19.5, + 20.5, 21.5, 22.5, 23.5, 24.5, + 25.5, 26.5, 28.5, 30.5, 32.5, + 35.5, 38.5, 42.5, 46.5, 50.5, + 55.5, 60.5, 66.5, 72.5, 78.5 + }; + + double lowlimits[24] = { + 0.5, 1.5, 2.5, 3.5, 4.5, + 5.5, 6.5, 7.5, 8.5, 9.5, + 10.5, 11.5, 12.5, 14.5, 17.5, + 20.5, 24.5, 29.5, 35.5, 42.5, + 50.5, 60.5, 72.5, 86.5, + }; + + TH1F* n; + + if ( low ) n = new TH1F( "foeda", h->GetTitle(), 39, limits ); + else n = new TH1F( "foeda", h->GetTitle(), 23, lowlimits ); + + n->SetDirectory(0); + + for ( int i=1 ; i<=h->GetNbinsX() ; i++ ) { + n->Fill( h->GetBinCenter(i), h->GetBinContent(i) ); + } + + + for ( int i=1 ; i<=n->GetNbinsX() ; i++ ) { + n->SetBinError(i, std::sqrt( n->GetBinContent(i) ) ); + } + + return n; +} + + /// global typedef here is ok, since this is a standalone /// executable, including a main(). As such it does not need /// to be in a namespace at this point as it won't in any @@ -61,11 +145,11 @@ typedef std::map<std::string,std::string> chainmap_t; /// get a histogram given a path, and an optional initial directory -/// if histogram is not found, then check for dir/name, +/// if histogram is not found, then check for dir/name, /// allows optional remapping of the reference chain information template<typename T=TH1F> -T* Get( TFile& f, const std::string& n, const std::string& dir="", +T* Get( TFile& f, const std::string& n, const std::string& dir="", const chainmap_t* chainmap=0, std::vector<std::string>* saved=0 ) { std::string name; @@ -80,26 +164,25 @@ T* Get( TFile& f, const std::string& n, const std::string& dir="", } else { name = dir+"/"+name; - h = (T*)f.Get( name.c_str() ); + h = (T*)f.Get( name.c_str() ); std::cout << "Get() name 1 " << name << " :: " << h << std::endl; } - if ( h == 0 ) { if ( chainmap && chainmap->size()!=0 ) { for ( chainmap_t::const_iterator itr=chainmap->begin() ; itr!=chainmap->end() ; itr++ ) { - if ( contains( name, itr->first ) ) { + if ( contains( name, itr->first ) ) { std::cout << "\tmatch: " << itr->first << " -> " << itr->second << std::endl; name.replace( name.find(itr->first), itr->first.size(), itr->second ); - h = (T*)f.Get( name.c_str() ); + h = (T*)f.Get( name.c_str() ); break; } } } } - + if ( saved ) saved->push_back( name ); - + if ( h ) h->SetDirectory(0); return h; @@ -107,14 +190,64 @@ T* Get( TFile& f, const std::string& n, const std::string& dir="", +class bands { + +public: + + bands() { } + + bands( const bands& b ) : m_limits(b.m_limits), m_labels(b.m_labels) { } + + bands( std::vector<double> limits, std::vector<std::string> labels ) + : m_limits(limits), m_labels(labels) + { } + + void range( const std::string& chain, TH1F* h ) { + for ( size_t i=0 ; i<m_labels.size() ; i++ ) { + if ( chain.find(m_labels[i])!=std::string::npos ) return range( i, h ); + } + return range( m_labels.size(), h ); + } + + + void range( size_t i, TH1F* h ) { + + double minx = h->GetBinLowEdge(1); + double maxx = h->GetBinLowEdge(h->GetNbinsX()+1); + + if ( i>=m_limits.size() ) { maxx+=1; minx=maxx; } + else if ( (i+1)==m_limits.size() ) minx=m_limits[i]; + else { + minx = m_limits[i]; + maxx = m_limits[i+1]; + } + + + for ( int j=1 ; j<=h->GetNbinsX() ; j++ ) { + + std::cout << "range: " << j << "\tminx: " << minx << "\t" << maxx << std::endl; + if ( ! ( h->GetBinCenter(j)>=minx && h->GetBinCenter(j)<maxx ) ) { + h->SetBinContent(j,0); + h->SetBinError(j,0); + } + } + } + + +private: + + std::vector<double> m_limits; + std::vector<std::string> m_labels; + +}; + + int usage(const std::string& name, int status, const std::string& err_msg="" ) { if ( err_msg != "" ) std::cerr << err_msg << "\n" << std::endl; std::ostream& s = std::cout; s << "Usage: " << name << "\t [OPTIONS] test.root reference.root chain1 chain2 chain2 ...\n\n"; s << "\t" << " plots comparison histograms"; s << " - compiled on " << __DATE__ << " at " << __TIME__ << "\n\n"; - // s << "Configuration: \n"; - // s << " -o filename \tname of output grid (filename required)\n\n"; s << "Options: \n"; s << " -c, --config value \t configure which histograms to plot from config file,\n\n"; s << " -t, --tag value \t appends tag 'value' to the end of output plot names, \n"; @@ -139,14 +272,13 @@ int usage(const std::string& name, int status, const std::string& err_msg="" ) { s << " -ac, --addchains \t if possible, add chain names histogram labels \n\n"; s << " -m, --mapfile \t remap file for reference histograms \n\n"; - + s << " -rc, --refchains values ..\t allow different reference chains for comparison\n"; s << " -s, --swap pattern regex \t swap \"pattern\" in the reference chains name by \"regex\"\n"; s << " -nr, --noref \t do not plot reference histograms\n"; s << " --normref \t normalise the reference counting histograms to test histograms\n"; s << " -us, --usechainref \t use the histograms from chain definied in the \"Chain\" histogram as reference\n\n"; - s << " -ns, --nostats \t do not show stats for mean and rms\n"; s << " -nm, --nomeans \t do not show stats for the means\n"; s << " --chi2 \t show the chi2 with respect to the reference\n\n"; @@ -245,6 +377,9 @@ double chi2( TH1* h0, TH1* h1 ) { int main(int argc, char** argv) { + std::cout << "\n---------------------------------\n"; + std::cout << "\n comparitor is off ...\n"; + if ( argc<4 ) return usage(argv[0], -1, "too few arguments"); /// control stuff @@ -257,8 +392,8 @@ int main(int argc, char** argv) { std::string ftestname = ""; std::string frefname = ""; - TFile* _ftest = 0; - TFile* _fref = 0; + TFile* ftest_ = 0; + TFile* fref_ = 0; bool effset = false; double effmin = 90; @@ -297,6 +432,9 @@ int main(int argc, char** argv) { bool usechainref = false; bool quiet = false; + bool RANGEMAP = false; + bool ALLRANGEMAP = false; + double xerror = 0; std::string atlaslabel_tmp = "Internal"; @@ -322,12 +460,14 @@ int main(int argc, char** argv) { std::string mapfile = ""; + std::vector<std::string> chainfiles; int ncols = 2; for(int i=1; i<argc; i++){ std::string arg = argv[i]; + if ( arg.find("-")!=0 && addinglabels ) { std::string label = arg; replace( label, "#", " " ); @@ -343,7 +483,8 @@ int main(int argc, char** argv) { else addingrefchains = false; if ( arg.find("-")!=0 && addingtags ) { - taglabels.push_back( arg ); + taglabels.push_back( fullreplace( arg, "__", " " ) ); + std::cout << "\tadding tag label: " << taglabels.back() << std::endl; continue; } else addingtags = false; @@ -362,6 +503,9 @@ int main(int argc, char** argv) { else if ( arg=="-l" || arg=="--labels" ) { addinglabels = true; } + else if ( arg=="-el" ) { + LINES = true; + } else if ( arg=="-k" || arg=="--key" ) { if ( ++i<argc ) key=argv[i]; else return usage(argv[0], -1, "no key provided"); @@ -497,10 +641,22 @@ int main(int argc, char** argv) { if ( ftestname=="" ) ftestname = arg; else if ( frefname=="" ) frefname = arg; else { + std::string file = ""; + + if ( arg.find(":file:")!=std::string::npos ) { + file = arg.substr( 0, arg.find(":file:") ); + chainfiles.push_back( file ); + arg = arg.substr(arg.find(":file:")+6,arg.size()); + } + std::string chain = arg; + replace ( chain, ":", "_" ); replace ( chain, ";", "_" ); chains.push_back(chain); + + std::cout << "file: " << file << "\tchain: " << chain << std::endl; + } } } @@ -515,26 +671,49 @@ int main(int argc, char** argv) { return -1; } - _ftest = TFile::Open( ftestname.c_str() ); - + std::vector<TFile*> chainTFiles; + + + + if ( chainfiles.size()==0 ) ftest_ = TFile::Open( ftestname.c_str() ); + else { + noref=true; + chainTFiles.resize(chainfiles.size()); + for ( size_t i=0 ; i<chainfiles.size() ; i++ ) { + chainTFiles[i] = TFile::Open( chainfiles[i].c_str() ); + if ( chainTFiles[i] == 0 ) { + std::cerr << "\tfile: " << chainfiles[i] << " could not be opened" << std::endl; + return -1; + } + else std::cout << "\tchainfiles: " << chainfiles[i] << " " << chainTFiles[i] << std::endl; + } + } + + if ( noref==false ) { if ( frefname=="" ) { std::cerr << "main(): ref file not specified " << std::endl; return -1; } - if ( frefname==ftestname ) _fref = _ftest; - else if ( exists(frefname) ) _fref = TFile::Open( frefname.c_str() ); + if ( frefname==ftestname ) fref_ = ftest_; + else if ( exists(frefname) ) fref_ = TFile::Open( frefname.c_str() ); else { std::cerr << "main(): ref file " << frefname << " does not exist" << std::endl; - return -1; + // return -1; + Plotter::setplotref(false); + noref=true; } } - else _fref = _ftest; + else fref_ = ftest_; - if ( _ftest==0 || _fref==0 ) { - std::cerr << "could not open files " << std::endl; - return -1; + if ( chainfiles.size()==0 ) { + + if ( ftest_==0 || ( noref==false && fref_==0 ) ) { + std::cerr << "could not open files " << std::endl; + return -1; + } + } if ( scale_eff == -1 ) scale_eff = 100; @@ -592,7 +771,7 @@ int main(int argc, char** argv) { gStyle->SetErrorX(xerror); - gStyle->SetPadLeftMargin(0.14); + gStyle->SetPadLeftMargin(0.15); gStyle->SetPadBottomMargin(0.15); gStyle->SetPadRightMargin(0.01); @@ -612,7 +791,8 @@ int main(int argc, char** argv) { std::vector<std::string> release_data; if ( !nowatermark ) { - dataTree = (TTree*)_ftest->Get("dataTree"); + + dataTree = (TTree*)ftest_->Get("dataTree"); if ( dataTree ) { dataTree->SetBranchAddress( "ReleaseMetaData", &releaseData); @@ -644,9 +824,12 @@ int main(int argc, char** argv) { } } - + // Make output directory if (dir != "") { + + gDirectory->pwd(); + std::cout << "trying to make directory" << std::endl; dir += "/"; if ( !quiet && !noplots && !exists(dir) ) { @@ -655,15 +838,17 @@ int main(int argc, char** argv) { } } - TFile& ftest = *_ftest; - TFile& fref = *_fref; + if ( ftest_==0 && chainTFiles.size()>0 ) fref_ = ftest_ = chainTFiles[0]; + + TFile* ftest = ftest_; + TFile* fref = fref_; - std::string testrun = findrun( &ftest ); + std::string testrun = findrun( ftest ); std::string rawrefrun = ""; std::string refrun = ""; - if ( _fref ) refrun = rawrefrun = findrun( &fref ); + if ( fref_ ) refrun = rawrefrun = findrun( fref ); std::cout << "testrun: " << testrun << "\nrefrun: " << refrun << std::endl; @@ -721,8 +906,9 @@ int main(int argc, char** argv) { if ( !nowatermark ) { - TH1D* htestev = (TH1D*)ftest.Get("event") ; - TH1D* hrefev = (TH1D*)fref.Get("event") ; + + TH1D* htestev = (TH1D*)ftest->Get("event") ; + TH1D* hrefev = (TH1D*)fref->Get("event") ; std::cout << "htestev " << htestev << " " << hrefev << std::endl; @@ -753,13 +939,13 @@ int main(int argc, char** argv) { chainmap->insert( chainmap_t::value_type( chains[i], chains[i+1] ) ); } + std::cout << "\nusing chain map:" << std::endl; + for ( chainmap_t::iterator itr=chainmap->begin() ; itr!=chainmap->end() ; itr++ ) { std::cout << "\t" << itr->first << "\t" << itr->second << std::endl; } } } - - /// set up the correct reference chain names ... @@ -771,10 +957,14 @@ int main(int argc, char** argv) { /// the Chain histogram if present std::cout << "chain: " << chains[j] << "\taddchains: " << addchains << std::endl; - + if ( addchains && ( contains(chains[j],"Shifter") || ( !contains(chains[j],"HLT_") && !contains(chains[j], "Fullscan" ) ) ) ) { - - TH1F* hchain = Get( ftest, chains[j]+"/Chain", testrun ); + + TFile* fftest = ftest; + + if ( chainfiles.size()>0 && chainfiles.size()>j ) fftest = chainTFiles[j]; + + TH1F* hchain = Get( *fftest, chains[j]+"/Chain", testrun ); if ( hchain ) { @@ -813,6 +1003,8 @@ int main(int argc, char** argv) { } + std::cout << "chainref size: " << chainref.size() << " " << refchains.size() << std::endl; + for ( size_t j=0 ; j<chainref.size() ; j++ ) { std::cout << "chainref: " << chainref[j] << " :: " << refchains[j] << std::endl; if ( chainref[j]!="" ) refchain[j] = fullreplace( chainref[j], pattern, regex ); @@ -820,13 +1012,27 @@ int main(int argc, char** argv) { std::cout << "refchain: " << refchain[j] << std::endl; } - + std::cout << "done chains" << std::endl; + /// set up the plot panels std::vector<Panel> panels; /// read config in from a file if requested ... + bands bnd; + + + std::vector<int> ccolours; + std::vector<int> cstyles; + + std::vector<std::string> ctags; + std::vector<std::string> ctaglabels; + + + std::cout << "\n" << argv[0] << "\tconfigfile: " << configfile << std::endl; + + if ( configfile!="" ) { if ( exists(configfile) ) { @@ -851,13 +1057,12 @@ int main(int argc, char** argv) { } - std::cout << "searching for panels" << std::endl; /// read in the panel descriptions - if ( rc.isTagDefined( "panels" ) ) { - + if ( rc.isTagDefined( "panels" ) ) { + std::vector<std::string> panel_config = rc.GetStringVector( "panels" ); for ( size_t ipanel=panel_config.size() ; ipanel-- ; ) { @@ -874,7 +1079,34 @@ int main(int argc, char** argv) { } } + + if ( rc.isTagDefined( "Bands" ) && rc.isTagDefined( "Labels" ) ) { + bnd = bands( rc.GetVector( "Bands"), rc.GetStringVector( "Labels" ) ); + } + + + if ( rc.isTagDefined("Colours") ) ccolours = rc.GetIntVector("Colours"); + if ( rc.isTagDefined("Styles") ) cstyles = rc.GetIntVector("Styles"); + if ( rc.isTagDefined("Tags") ) ctags = rc.GetStringVector("Tags"); + if ( rc.isTagDefined("TagLabels") ) ctaglabels = rc.GetStringVector("TagLabels"); + if ( rc.isTagDefined("TagLabels") ) usrlabels = rc.GetStringVector("TagLabels"); + + + uselabels = true; + + + std::cout << argv[0] << "\tuserlabels :" << usrlabels << ":" << std::endl; + + + + if ( rc.isTagDefined("RANGEMAP") ) RANGEMAP = true; + if ( rc.isTagDefined("ALLRANGEMAP") ) ALLRANGEMAP = true; + + std::cout << "Extra: " << rc.isTagDefined("Extra") << std::endl; + if ( rc.isTagDefined("Extra") ) taglabels.push_back( fullreplace( rc.GetString("Extra"), "__", " " ) ); + + } else { std::cerr << argv[0] << ":\t config file not found: " << configfile << std::endl; @@ -916,6 +1148,12 @@ int main(int argc, char** argv) { } + + std::cout << "taglabels" << std::endl; + + for ( size_t it=0 ; it<taglabels.size() ; it++ ) std::cout << taglabels[it] << std::endl; + + std::cout << "\npanels: " << panels.size() << std::endl; if ( panels.size()==0 ) return usage(argv[0], -1, "no panels to plot"); @@ -1036,16 +1274,20 @@ int main(int argc, char** argv) { std::cout << "main() processing histo[" << i << "] " << (i<10 ? " " : "" ) << histo.name() << "\t" << histo.xaxis() << std::endl; - Plots plots_eff; + Plots plots_eff( "", yinfo.trim() ); plots_eff.clear(); - Plots plots; + Plots plots( "", yinfo.trim() ); plots.clear(); + + double xpos = 0.18; double ypos = 0.93; if ( contains(histo.name(),"eff") || contains(histo.name(),"Eff_") ) ypos = 0.15; + + if ( histo.name()=="pT" || histo.name()=="pT_rec" ) ypos = 0.15; if ( atlasstyle ) { xpos = 0.18; @@ -1056,16 +1298,42 @@ int main(int argc, char** argv) { if ( _ypos!=0 ) ypos = _ypos; double xpos_original = xpos; - + xpos += xoffset; + if ( xinfo.offset() != 0 ) { + + std::cout << "HA ! xinfo.offset: " << xinfo.offset() << std::endl; + + xpos = xinfo.offset(); + + } + + + if ( yinfo.offset() != 0 ) { + + std::cout << "HA ! yinfo.offset: " << yinfo.offset() << std::endl; + + ypos = yinfo.offset(); + + } + + + /// calculate all the postions for the items in the legend + + size_t Nrows = chains.size(); + + if ( ALLRANGEMAP || (RANGEMAP && xaxis.find("p_{T}")!=std::string::npos && ccolours.size() ) ) + Nrows = ( Nrows < ccolours.size() ? Nrows : ccolours.size() ); - int Nlines = chains.size() + taglabels.size(); + std::cout << "\n\n\tNrows " << Nrows << std::endl; + + int Nlines = Nrows + taglabels.size(); std::vector<double> ypositions; - double deltay = (chains.size()*0.06-0.005)/chains.size(); + double deltay = (Nrows*0.055-0.005)/Nrows; double ylo = ypos; double yhi = ypos; @@ -1077,20 +1345,12 @@ int main(int argc, char** argv) { ypositions.push_back( yhi - deltay*(ilines+0.5) ); } - - /// leave these comments as useful for debugging ... - - // bool residual = false; - - // if ( contains(histo.name(),"_res") || contains(histo.name(),"residual_") || contains(histo.name(),"1d") ) residual = true; - - // if ( residual ) xpos = xpos_original; - // specify different legends for efficiencies or residuals? /// legends .... - Legend legend( xpos, xpos+0.1, ylo, ylo+chains.size()*0.06-0.005 ); - Legend legend_eff( xpos, xpos+0.1, ylo, ylo+chains.size()*0.06-0.005 ); + + Legend legend( xpos, xpos+0.1, ylo, ylo+Nrows*0.06-0.005 ); + Legend legend_eff( xpos, xpos+0.1, ylo, ylo+Nrows*0.06-0.005 ); std::vector<std::string> Mean; @@ -1113,6 +1373,7 @@ int main(int argc, char** argv) { int rms_power = 0; bool power_set = false; + LINEF = true; /// leave these comments here for testing ... // bool uselogx = xinfo.log(); @@ -1120,6 +1381,11 @@ int main(int argc, char** argv) { for ( unsigned int j=0; j<chains.size(); j++) { + TFile* fftest = ftest; + TFile* ffref = fref; + + if ( chainfiles.size()>0 && chainfiles.size()>j ) ffref = fftest = chainTFiles[j]; + /// get the actual chain name and track collection from /// the Chain histogram if present @@ -1138,6 +1404,7 @@ int main(int argc, char** argv) { TGraphAsymmErrors* tgtest = 0; + std::cout << "refchain.size() " << refchain.size() << std::endl; std::cout << "refchain: " << refchain[j] << std::endl; @@ -1151,6 +1418,8 @@ int main(int argc, char** argv) { bool bmean = false; if ( contains(histo.name(),"/mean") ) bmean = true; + std::cout << "\trefitting: " << histo.name() << std::endl; + Resplot::setoldrms95(oldrms); Resplot::setscalerms95(true); @@ -1160,16 +1429,20 @@ int main(int argc, char** argv) { if ( bsigma ) base = chop( tmp_, "/sigma" ); if ( bmean ) base = chop( tmp_, "/mean" ); - TH2D* _htest2d = Get<TH2D>( ftest, chains[j]+"/"+base+"/2d", testrun, 0, &savedhistos ); - TH2D* _href2d = Get<TH2D>( ftest, refchain[j]+"/"+base+"/2d", testrun ); + TH2D* htest2d_ = Get<TH2D>( *fftest, chains[j]+"/"+base+"/2d", testrun, 0, &savedhistos ); + + std::cout << "ffref " << ffref << std::endl; + TH2D* href2d_ = 0; - if ( _htest2d==0 ) continue; - if ( !noreftmp && _href2d==0 ) noreftmp = true; + if ( ffref ) href2d_ = Get<TH2D>( *ffref, chains[j]+"/"+base+"/2d", testrun ); + + if ( htest2d_==0 ) continue; + if ( !noreftmp && href2d_==0 ) noreftmp = true; Plotter::setplotref(!noreftmp); /// get the test histogram - Resplot rtest("tmp", _htest2d); + Resplot rtest("tmp", htest2d_ ); if ( rtest.finalised() ) { if ( contains(histo.name(),"npix") || contains(histo.name(),"nsct") || contains(histo.name(),"nsi") || contains(histo.name(),"nbl") ) rtest.Refit(Resplot::FitNull); @@ -1181,32 +1454,23 @@ int main(int argc, char** argv) { } if ( bsigma ) { htest = (TH1F*)rtest.Sigma()->Clone("rtest_sigma"); htest->SetDirectory(0); } - if ( bmean ) { htest = (TH1F*)rtest.Mean()->Clone("rtest_mean"); htest->SetDirectory(0); } + if ( bmean ) { htest = (TH1F*)rtest.Mean()->Clone("rtest_mean"); htest->SetDirectory(0); } if ( htest==0 ) { - std::cerr << "missing histogram: " << (refchain[j]+" / "+histo.name()) << " " << htest << "(test)" << std::endl; + std::cerr << "missing test histogram: " << (refchain[j]+" / "+histo.name()) << " " << htest << "(test)" << std::endl; continue; } - /// Actually Do refit the references - if we are adding together many + /// Actually DO refit the references - if we are adding together many /// resplots, then the means etc may not even have been calculated - /// - /// NB: DON'T Refit the reference, since only the central values - /// are plotted - // std::cout << "ref " << _href2d << std::endl; - // Resplot rref("tmp", _href2d); - // rref.Finalise(Resplot::FitNull95); - // href = (TH1F*)rref.Sigma()->Clone("rref_sigma"); href->SetDirectory(0); - - /// still get the reference histo TH1F* hreft = 0; if ( !noreftmp ) { if ( refitref_resplots ) { - Resplot rref("tmp", _href2d); + Resplot rref("tmp", href2d_ ); if ( rref.finalised() ) { if ( contains(histo.name(),"npix") || contains(histo.name(),"nsct") ) rref.Refit(Resplot::FitNull); @@ -1222,13 +1486,14 @@ int main(int argc, char** argv) { } else { - hreft = Get( fref, refchain[j]+"/"+histo.name(), rawrefrun, chainmap ); + hreft = Get( *ffref, refchain[j]+"/"+histo.name(), rawrefrun, chainmap ); } } if ( !noreftmp && hreft==0 ) { - std::cerr << "missing histogram: " << (refchain[j]+" / "+histo.name()) << " " << htest << "(ref)" << std::endl; - noreftmp = true; + std::cerr << "missing ref histogram: " << (refchain[j]+" / "+histo.name()) << " " << htest << "(ref)" << std::endl; + noreftmp = true; + std::exit(-1); Plotter::setplotref(!noreftmp); } @@ -1236,9 +1501,9 @@ int main(int argc, char** argv) { href = (TH1F*)hreft->Clone(); href->SetDirectory(0); } - + /// useful test for debugging ... - // std::cout << "\tget " << (refchain[j]+"/"+histos[i]) << "\t" << href << std::endl; + // std::cout << "\tget " << (refchain[j]+"/"+histos[i]) << "\t" << href << std::endl; savedhistos.push_back( refchain[j]+"/"+histo.name() ); @@ -1251,17 +1516,27 @@ int main(int argc, char** argv) { std::string reghist = histo.name(); - std::cout << "hist: " << (chains[j]+"/"+reghist) << std::endl; + std::cout << "hist: " << (chains[j]+"/"+reghist) << "\tftest " << ftest << std::endl; - htest = Get( ftest, chains[j]+"/"+reghist, testrun, 0, &savedhistos ); + htest = Get( *fftest, chains[j]+"/"+reghist, testrun, 0, &savedhistos ); + std::cout << "hist: " << htest << std::endl; + + std::cout << xaxis << std::endl; if ( htest==0 ) { - if ( htest==0 ) std::cerr << "missing histogram: " << (chains[j]+" / "+reghist) << " " << htest<< std::endl; + if ( htest==0 ) std::cerr << "missing test histogram: " << (chains[j]+" / "+reghist) << " " << htest<< std::endl; continue; } - TH1F* hreft = Get( fref, refchain[j]+"/"+reghist, rawrefrun, chainmap ); + TH1F* hreft = 0; + + std::cout << "hreft: " << hreft << std::endl; + + if ( ffref ) hreft = Get( *ffref, refchain[j]+"/"+reghist, rawrefrun, chainmap ); + else noreftmp = true; + + std::cout << "hreft: " << hreft << std::endl; if ( std::string(htest->ClassName()).find("TH2")!=std::string::npos ) { std::cout << "Class TH2: " << htest->GetName() << std::endl; @@ -1278,9 +1553,10 @@ int main(int argc, char** argv) { if ( !noreftmp && hreft==0 ) { - if ( hreft==0 ) std::cerr << "missing histogram: " << (refchain[j]+" / "+reghist) + if ( hreft==0 ) std::cerr << "missing ref histogram: " << (refchain[j]+" / "+reghist) << " " << hreft << std::endl; noreftmp = true; + std::exit(-1); Plotter::setplotref(false); } @@ -1331,14 +1607,16 @@ int main(int argc, char** argv) { if ( make_ref_efficiencies ) { if ( htest && href ) { - /// deugging ... - // std::cout << "contains _eff " << contains( std::string(htest->GetName()), "eff" ) << std::endl; + /// debugging ... + // std::cout << "contains _eff " << contains( std::string(htest->GetName()), "eff" ) << std::endl; - if ( contains( std::string(htest->GetName()), "_eff" ) ) { + if ( contains( std::string(htest->GetName()), "eff" ) ) { - htestnum = Get( ftest, chains[j]+"/"+histo.name()+"_n", testrun ); + std::string effhist = histo.name(); + + htestnum = Get( *fftest, chains[j]+"/"+effhist+"_n", testrun, 0, &savedhistos ); - TH1F* hrefnumt = Get( fref, refchain[j]+"/"+histo.name()+"_n", rawrefrun, chainmap, &savedhistos ); + TH1F* hrefnumt = Get( *ffref, refchain[j]+"/"+effhist+"_n", rawrefrun, chainmap, &savedhistos ); if ( !noreftmp && hrefnumt!=0 ) { hrefnum = (TH1F*)hrefnumt->Clone(); @@ -1349,18 +1627,56 @@ int main(int argc, char** argv) { } } - + if ( _bayes ) { if ( htest && contains( std::string(htest->GetName()), "eff" ) ) { - htestnum = Get( ftest, chains[j]+"/"+histo.name()+"_n", testrun, 0, &savedhistos ) ; - htestden = Get( ftest, chains[j]+"/"+histo.name()+"_d", testrun, 0, &savedhistos ) ; + double rebin = 0; + + std::string effhist = histo.name(); + + /// rebin if requested ... + + if ( contains( effhist, "+Rebin" ) ) { + rebin = std::atof( effhist.substr( effhist.find("+Rebin")+6, effhist.size() ).c_str() ); + effhist = effhist.substr( 0, effhist.find("+Rebin") ); + } + + if ( contains( effhist, "+rebin" ) ) { + rebin = std::atof( effhist.substr( effhist.find("+rebin")+6, effhist.size() ).c_str() ); + effhist = effhist.substr( 0, effhist.find("+rebin") ); + } + + htestnum = Get( *fftest, chains[j]+"/"+effhist+"_n", testrun, 0, &savedhistos ) ; + htestden = Get( *fftest, chains[j]+"/"+effhist+"_d", testrun, 0, &savedhistos ) ; + + if ( rebin!=0 ) { + htestnum = Rebin(htestnum, rebin ); + htestden = Rebin(htestden, rebin ); + } - std::cout << "Bayesian error calculation " << htestnum << " " << htestden << "\tscale " << scale_eff << std::endl; + std::cout << "test histogram name: : " << htestnum->GetName() << "\txaxis: " << xaxis << "\t" << std::endl; + + // if ( xaxis.find("p_{T}")!=std::string::npos || xaxis.find("pt")!=std::string::npos ) { + // b.range( chains[j], htestnum ); + // b.range( chains[j], htestden ); + // } + + std::cout << "1: Bayesian error calculation " << htestnum << " " << htestden << "\tscale " << scale_eff << std::endl; if ( htestnum && htestden ) { + if ( std::string(htestnum->GetName()).find("ntrax_eff")!=std::string::npos ) { + + bool low = true; + + // if ( chains[j].find("j55")!=std::string::npos ) low = false; + + htestnum = rebin_log( htestnum, low ); + htestden = rebin_log( htestden, low ); + } + #if 0 /// need this for lumi block histograms - although not always needed, so /// excluded to prevent problems most of the time ... @@ -1376,12 +1692,22 @@ int main(int argc, char** argv) { htestden->Rebin(2); } #endif + + // if ( RANGEMAP && (effhist.find("pT")!=std::string::npos || effhist.find("pt")!=std::string::npos ) ) { + if ( RANGEMAP && (effhist.find("ET")!=std::string::npos ) ) { + std::cout << "\trange: " << j << " " << htest << std::endl; + bnd.range( chains[j], htestnum ); + bnd.range( chains[j], htestden ); + } + Efficiency e( htestnum, htestden, "", scale_eff ); tgtest = e.Bayes(scale_eff); htest = e.Hist(); + std::cout << "effhist: " << effhist << std::endl; + } /// now recalculate reference @@ -1392,16 +1718,17 @@ int main(int argc, char** argv) { std::cout << "doin ..." << std::endl; - TH1F* hrefnum = Get( fref, refchain[j]+"/"+histo.name()+"_n", rawrefrun, chainmap ); - TH1F* hrefden = Get( fref, refchain[j]+"/"+histo.name()+"_d", rawrefrun, chainmap ); + TH1F* hrefnum = Get( *ffref, refchain[j]+"/"+histo.name()+"_n", rawrefrun, chainmap ); - std::cout << "Bayesian error calculation " << htestnum << " " << htestden << "\tscale " << scale_eff << std::endl; - std::cout << "Bayesian error calculation " << hrefnum << " " << hrefden << "\tscale " << scale_eff_ref << std::endl; + TH1F* hrefden = Get( *ffref, refchain[j]+"/"+histo.name()+"_d", rawrefrun, chainmap ); + + std::cout << "2. Bayesian error calculation " << htestnum << " " << htestden << "\tscale " << scale_eff << std::endl; + std::cout << "3. Bayesian error calculation " << hrefnum << " " << hrefden << "\tscale " << scale_eff_ref << std::endl; if ( hrefnum && hrefden ) { Efficiency e( hrefnum, hrefden, "", scale_eff_ref ); /// leave for documentation purposes ... - // tgref = e.Bayes(scale_eff); + // tgref = e.Bayes(scale_eff); href = e.Hist(); @@ -1423,7 +1750,7 @@ int main(int argc, char** argv) { } - htest->GetYaxis()->SetTitleOffset(1.5); + htest->GetYaxis()->SetTitleOffset(1.55); htest->GetXaxis()->SetTitleOffset(1.5); htest->GetXaxis()->SetTitle(xaxis.c_str()); htest->GetYaxis()->SetTitle(yaxis.c_str()); @@ -1518,9 +1845,10 @@ int main(int argc, char** argv) { if ( actual_chain.find("_boffperf")!=std::string::npos ) actual_chain.erase( actual_chain.find("_boffperf"), 9 ); if ( collection.find("_IDTrkNoCut")!=std::string::npos ) collection.erase( collection.find("_IDTrkNoCut"), 11 ); if ( collection.find("xAODCnv")!=std::string::npos ) collection.erase( collection.find("xAODCnv"), 7 ); - if ( collection.find("HLT_IDTrack")!=std::string::npos ) collection.erase( collection.find("HLT_IDTrack"), 7 ); + if ( collection.find("HLT_IDTrack")!=std::string::npos ) collection.erase( collection.find("HLT_IDTrack"), 11 ); if ( collection.find("Tracking")!=std::string::npos ) collection.replace( collection.find("Tracking"), 8, "Trk" ); if ( collection.find("InDetTrigTrk_")!=std::string::npos ) collection.erase( collection.find("InDetTrigTrk_"), 13 ); + if ( collection.find("HLT_xAODTracks_")!=std::string::npos ) collection.erase( collection.find("HLT_xAODTracks_"), 15 ); std::string c = actual_chain + " : " + collection; @@ -1531,26 +1859,94 @@ int main(int argc, char** argv) { c = " " + c; - std::cout << "use label: " << c << std::endl; + std::cout << "use label: " << c << "\tchains size " << chains.size() << "\t" << usrlabels.size() << std::endl; + + std::cout << "chains.size() " << chains.size() << " " << j << std::endl; + std::cout << "chains.size() " << chains.size() << " " << j << std::endl; + + std::cout << "chains[j] : " << j << " " << chains[j] << std::endl; + + std::cout << "userlabels.size() " << usrlabels.size() << std::endl; + + if ( usrlabels.size() < j+1 ) std::cerr << "userlabels not large enough - not using userlabels" << std::endl; + else c = usrlabels[ j ]; + + std::cout << "use label: c: " << c << std::endl; /// calculate and set axis limits // std::cout << "adding plot " << histos[i] << " " << htest->GetName() << std::endl; if ( fulldbg ) std::cout << __LINE__ << std::endl; + + + std::cout << "\n\n\n\nxaxis: " << xaxis << std::endl; + + if ( ALLRANGEMAP || xaxis.find("p_{T}")!=std::string::npos || xaxis.find("E_{T}")!=std::string::npos ) { + + if ( RANGEMAP && xaxis.find("p_{T}")!=std::string::npos ) { + bnd.range( chains[j], htest ); + if ( href ) bnd.range( chains[j], href ); + } + + if ( RANGEMAP || ALLRANGEMAP ) { + + LINEF = false; + + std::cout << "\n\n\nctags " << ctags.size() << "\n\n" << std::endl; + + for ( size_t ic=0 ; ic<ctags.size() ; ic++ ) { + + // std::cout << "\tctags[" << ic << "] = " << ctags[ic] << std::endl; + + std::cout << "\n\nic: " << ic << " " << ctags[ic] << " " << ccolours[ic] << "\n\n" << std::endl; + + if ( chains[j].find(ctags[ic])!=std::string::npos ) { + std::cout << "\ttag " << ctags[ic] << " \tcolour: " << ccolours[ic] << "\tstyle: " << cstyles[ic] << std::endl; + htest->SetLineColor( ccolours[ic] ); + htest->SetMarkerColor( ccolours[ic] ); + htest->SetMarkerStyle( cstyles[ic] ); + c = ctaglabels[ic]; + if ( tgtest ) { + tgtest->SetLineColor(htest->GetMarkerColor()); + tgtest->SetMarkerStyle(htest->GetMarkerStyle()); + tgtest->SetMarkerColor(htest->GetMarkerColor()); + } + break; + } + } + + } + + std::cout << "test: " << chains[j] << "chains colour: " << htest->GetMarkerColor() << std::endl; + + } + + + + + std::cout << "movin' on ..." << std::endl; + + std::cout << "chain: " << chains[j] << " \t marker colour: " << htest->GetMarkerColor() << std::endl; + + // std::exit(0); + + std::cout << "Plotter marker : " << htest->GetMarkerColor() << " " << htest->GetMarkerStyle() << std::endl; + // if ( uselabels ) plots.push_back( Plotter( htest, href, chain_name+usrlabels[j], tgtest ) ); - if ( uselabels ) plots.push_back( Plotter( htest, href, " " + chain_name[j] + usrlabels[j], tgtest ) ); + if ( uselabels ) plots.push_back( Plotter( htest, href, " " + chain_name[j] + c, tgtest ) ); else { std::cout << "using label: " << c << std::endl; plots.push_back( Plotter( htest, href, c, tgtest ) ); } + if ( ALLRANGEMAP || ( RANGEMAP && xaxis.find("p_{T}")!=std::string::npos ) ) plots.back().max_entries( ccolours.size() ); + if ( fulldbg ) std::cout << __LINE__ << std::endl; - if ( make_ref_efficiencies ) { if ( htestnum && hrefnum ) { @@ -1581,7 +1977,7 @@ int main(int argc, char** argv) { if ( href ) Chi2.push_back( label( "chi2 = %5.2lf / %2.0lf", chi2( htest, href ), double(htest->GetNbinsX()) ) ); - if( residual ) { + if ( residual ) { /// resolutions @@ -1844,7 +2240,7 @@ int main(int argc, char** argv) { // plots.SetLogy(false); if ( fulldbg ) std::cout << __LINE__ << std::endl; - + // plots.limits(); /// actually draw the plot here ... @@ -1965,11 +2361,11 @@ int main(int argc, char** argv) { /// make sure we are not using the same reference as test file - bool files_duplicated = ( _fref==_ftest ); + bool files_duplicated = ( fref_==ftest_ ); if ( deleteref && !files_duplicated ) { - if ( _fref ) { + if ( fref_ ) { /// clean up reference file @@ -1979,12 +2375,12 @@ int main(int argc, char** argv) { newout->cd(); /// copy the release tree - copyReleaseInfo( &fref, newout ); + copyReleaseInfo( fref, newout ); TDirectory* base = gDirectory; for ( unsigned i=0 ; i<savedhistos.size() ; i++ ) { - + /// debugging ... // std::cout << i << " " << savedhistos[i] << std::endl; @@ -1997,7 +2393,8 @@ int main(int argc, char** argv) { gDirectory->cd( dirs[j].c_str() ); } - TH1* href = (TH1*)fref.Get( savedhistos[i].c_str() ); + + TH1* href = (TH1*)fref->Get( savedhistos[i].c_str() ); if ( !noreftmp && href ) { std::cout << i << " " << savedhistos[i] << " 0x" << href << std::endl; href->Write( dirs.back().c_str() ); @@ -2017,8 +2414,8 @@ int main(int argc, char** argv) { /// close files - if ( _fref && !files_duplicated ) _fref->Close(); - if ( _ftest ) _ftest->Close(); + if ( fref_ && !files_duplicated ) fref_->Close(); + if ( ftest_ ) ftest_->Close(); /// now actually overwrite the old reference file @@ -2038,8 +2435,8 @@ int main(int argc, char** argv) { // std::cout << "deleting " << __LINE__ << std::endl; - if ( _fref && !files_duplicated ) delete _fref; - if ( _ftest ) delete _ftest; + if ( fref_ && !files_duplicated ) delete fref_; + if ( ftest_ ) delete ftest_; return 0; } diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/computils.cxx b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/computils.cxx index e477e7c0c5d9b47164692a94d47b6c5bf09bbe78..7ac7ed7cb59389413c421e1e8747de4a5691507b 100644 --- a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/computils.cxx +++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/computils.cxx @@ -4,7 +4,7 @@ ** @author mark sutton ** @date Sat Aug 30 2014 14:38:03 CEST ** - ** Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + ** Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration **/ @@ -13,6 +13,7 @@ #include <sys/stat.h> #include <sys/types.h> #include <glob.h> +#include <stdint.h> #include <iostream> #include <string> @@ -34,6 +35,9 @@ #include "computils.h" +bool LINEF = true; +bool LINES = false; + bool Plots::watermark = true; @@ -70,6 +74,89 @@ void Norm( TH1* h, double scale ) { + + + + +union floaty_t { + floaty_t( float n = 0.0f ) : f(n) {} + + /// portable extraction of components + /// sign + bool negative() const { return i < 0; } + + /// float has 23 bit mentissa + int32_t raw_mantissa() const { return i & ((1 << 23) - 1); } + /// and an 8 bit exponent + int32_t raw_exponent() const { return (i >> 23) & 0xff; } + + int32_t i; + float f; +}; + + +bool almost_equal( floaty_t a, floaty_t b, int max_diff ) { + + // Check for trivial equality to make sure +0==-0 + if ( a.f == b.f ) return true; + + // Different signs means they do not match. + if ( a.negative() != b.negative() ) return false; + + // Find the difference in last place units + int ulps_diff = std::abs( a.i - b.i ); + if (ulps_diff <= max_diff) return true; + + return false; +} + + +bool almost_equal( float a, float b, int max_diff ) { + return almost_equal( floaty_t(a), floaty_t(b), max_diff ); +} + + +bool operator==( floaty_t a, floaty_t b ) { + /// use a maximum 5 float separation between the two - could be more precise + return almost_equal( a, b, 5 ); +} + + +void trim_tgraph( TH1* h, TGraphAsymmErrors* t ) { + + double ylo = h->GetMinimum(); + + int ih=1; + + for ( int i=0 ; i<t->GetN() && ih<=h->GetNbinsX() ; i++, ih++ ) { + + double yt = 0; + double xt = 0; + double ye = 0; + + t->GetPoint( i, xt, yt ); + ye = t->GetErrorYlow( i ); + + double yh = h->GetBinContent(ih); + double xh = h->GetBinCenter(ih); + + while( !almost_equal( xh, xt, 5 ) && ih<=h->GetNbinsX() ) { + ih++; + yh = h->GetBinContent(ih); + xh = h->GetBinCenter(ih); + } + + if ( !almost_equal( yh, yt, 5 ) ) throw data_mismatch(std::string("for histogram ")+h->GetName()); + + if ( (yt-ye) < ylo ) { + h->SetBinContent(ih, ylo-100 ); + t->SetPoint( i, xt, ylo-100 ); + } + + } +} + + void ATLASFORAPP_LABEL( double x, double y, int color, double size ) { TLatex* lat = new TLatex(); //lat.SetTextAlign(12); lat.SetTextSize(tsize); diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/computils.h b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/computils.h index eb22d8c1f774ef5182734c6b11c0b5c8db5b5106..3c84c7b2c4c4fd3417eb89d0f9f6997e6b3e1031 100644 --- a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/computils.h +++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/computils.h @@ -33,6 +33,11 @@ #include "TLegend.h" #include "TrigInDetAnalysis/Efficiency.h" + +extern bool LINEF; +extern bool LINES; + + void ATLASFORAPP_LABEL( double x, double y, int color, double size=0.06 ); void myText( Double_t x, Double_t y, Color_t color, const std::string& text, Double_t tsize); @@ -79,6 +84,13 @@ std::string findrun( TFile *f ); double plotable( TH1* h ); // , double xlo=-999, double xhi=-999 ); +class data_mismatch : public std::exception { +public: + data_mismatch(const std::string& s) { std::cerr << "exception:" << what() << " " << s << std::endl; }; + virtual const char* what() const throw() { return "data don't match"; } +}; + + template<typename T> std::ostream& operator<<( std::ostream& s, std::vector<T>& v) { @@ -92,6 +104,10 @@ std::vector<int> findxrange(TH1* h, bool symmetric=false ); std::vector<double> findxrangeuser(TH1* h, bool symmetric=false ); + +void trim_tgraph( TH1* h, TGraphAsymmErrors* t ); + + void xrange(TH1* h, bool symmetric=true ); /// copy the TTree of release info from one directory to another @@ -115,7 +131,9 @@ public: m_hi(0), m_norm(false), m_refnorm(false), - m_binwidth(false) + m_binwidth(false), + m_offset(0), + m_trim(false) { // std::cout << "AxisInfo::info" << m_info << std::endl; @@ -137,6 +155,18 @@ public: else if ( keys[i]=="refn" ) m_refnorm = true; else if ( keys[i]=="width" ) m_binwidth = true; else if ( keys[i]=="auto" ) m_autoset = true; + else if ( keys[i]=="trim" ) m_trim = true; + else if ( keys[i].find("offset")==0 ) { + + std::cout << "offset:" << std::endl; + std::cout << "\tkey: " << keys[i] << std::endl; + std::cout << "\tpos: " << keys[i].find("offset") << std::endl; + + std::string offset = keys[i]; + m_offset=std::atof(offset.substr(6,offset.size()-6).c_str()); + + std::cout << "m_offset: " << m_offset << std::endl; + } else if ( keys[i]=="auton" ) { m_autoset = true; m_norm = true; @@ -198,6 +228,12 @@ public: bool rangeset() const { return m_rangeset; } + bool trim() const { return m_trim; } + + + double offset() const { return m_offset; } + + double lo() const { return m_lo; } double hi() const { return m_hi; } @@ -205,6 +241,7 @@ public: std::string c_str() const { return m_info; } + public: static std::vector<std::string> split( const std::string& s, const std::string& t=":" ) { @@ -239,11 +276,15 @@ public: double m_lo; double m_hi; - bool m_norm; - bool m_refnorm; + bool m_norm; + bool m_refnorm; - bool m_binwidth; + bool m_binwidth; + double m_offset; + + bool m_trim; + }; @@ -301,8 +342,8 @@ private: }; -static const int colours[6] = { 1, 2, kBlue-4, 6, kCyan-2, kGreen+2 }; -static const int markers[6] = { 20, 24, 25, 26, 21, 22 }; +static const int colours[6] = { 1, 2, kBlue-4, 6, kCyan-2, kMagenta+2 }; +static const int markers[6] = { 20, 24, 25, 26, 25, 22 }; template<typename T> @@ -331,11 +372,15 @@ template<typename T> class tPlotter { public: - + tPlotter(T* _htest=0, T* _href=0, const std::string& s="", TGraphAsymmErrors* _tgtest=0, TGraphAsymmErrors* _tgref=0 ) : m_htest(_htest), m_href(_href), m_tgtest(_tgtest), m_tgref(_tgref), - m_plotfilename(s) { + m_plotfilename(s), + m_max_entries(2), + m_entries(0), + m_trim_errors(false) + { // plotref = true; } @@ -343,9 +388,13 @@ public: tPlotter(const tPlotter& p) : m_htest(p.m_htest), m_href(p.m_href), m_tgtest(p.m_tgtest), m_tgref(p.m_tgref), - m_plotfilename(p.m_plotfilename) { + m_plotfilename(p.m_plotfilename), + m_max_entries(p.m_max_entries), + m_entries(0), + m_trim_errors(p.m_trim_errors) { } + /// sadly, root manages all the histograms (does it really? /// who can tell) so we mustn't delete anything just in case @@ -356,7 +405,10 @@ public: std::string plotfilename() const { return m_plotfilename; } - // void Draw(const std::string& chain, unsigned int i, Legend& leg ) { + void trim_errors(bool b) { m_trim_errors=b; } + + bool trim_errors() const { return m_trim_errors; } + void Draw( int i, Legend& _leg, bool mean=false, bool first=true ) { Legend leg = _leg; @@ -369,62 +421,35 @@ public: href()->SetLineColor(colours[i%6]); href()->SetLineStyle(2); href()->SetMarkerStyle(0); - href()->GetYaxis()->SetMoreLogLabels(true); } - // href()->SetMarkerColor(href()->GetLineColor()); - htest()->SetLineColor(colours[i%6]); + + if ( LINEF ) htest()->SetLineColor(colours[i%6]); htest()->SetLineStyle(1); - htest()->SetMarkerColor(htest()->GetLineColor()); - htest()->SetMarkerStyle(markers[i%6]); - htest()->GetYaxis()->SetMoreLogLabels(true); + if ( LINEF ) htest()->SetMarkerColor(htest()->GetLineColor()); + if ( LINEF ) htest()->SetMarkerStyle(markers[i%6]); - // std::cout << "Draw() href() " << href() << "\thtest() " << htest() << "\ttgtest() " << tgtest(); if ( htest() ) std::cout << "\tentries " << plotable( htest() ); std::cout << std::endl; if(first) { -#if 0 - if ( plotref && href() ) { - href()->GetXaxis()->SetMoreLogLabels(true); - href()->Draw("hist]["); - // if ( tgref() ) { - // setParameters( href(), tgref() ); - // } - } - else -#endif - { - if ( tgtest() ) { + + if ( tgtest() ) { zeroErrors(htest()); htest()->GetXaxis()->SetMoreLogLabels(true); - htest()->GetYaxis()->SetMoreLogLabels(true); + if ( trim_errors() ) trim_tgraph( htest(), tgtest() ); htest()->Draw("ep"); + if ( LINES ) htest()->Draw("lhistsame"); setParameters( htest(), tgtest() ); - // tgtest()->Draw("p1same"); tgtest()->Draw("esame"); - } - else { + } + else { htest()->GetXaxis()->SetMoreLogLabels(true); - htest()->GetYaxis()->SetMoreLogLabels(true); htest()->Draw("ep"); - } + if ( LINES ) htest()->Draw("lhistsame"); } + } -#if 0 - static bool _dbg = true; - - if ( _dbg && htest() && tgtest() ) { - TFile f("dbg.root","recreate"); - htest()->Write(); - tgtest()->Write(); - f.Close(); - - _dbg = false; - } -#endif - - if ( plotref && href() ) { if ( contains(href()->GetName(),"_vs_") || contains(href()->GetName(),"sigma") || @@ -438,8 +463,12 @@ public: if ( tgtest() ) { zeroErrors(htest()); + + if ( trim_errors() ) trim_tgraph( htest(), tgtest() ); setParameters( htest(), tgtest() ); tgtest()->Draw("e1same"); + if ( LINES ) tgtest()->Draw("lsame"); + } #if 0 @@ -459,6 +488,7 @@ public: #endif htest()->Draw("ep same"); + if ( LINES ) htest()->Draw("lhist same"); // href()->Draw("lhistsame"); // htest()->Draw("lhistsame"); @@ -497,20 +527,25 @@ public: std::string rkey = key; - key += std::string(" : "); - leg->AddEntry( htest(), key.c_str(), "p" ); - leg->AddEntry( hnull, _mean, "p" ); - - if ( displayref ) { - rkey += std::string(" : "); - leg->AddEntry( hnull, "", "l" ); - leg->AddEntry( href(), rkey.c_str(), "l" ); - leg->AddEntry( hnull, _meanref, "l" ); + if ( LINEF || leg.size() < m_max_entries ) { + key += std::string(" : "); + leg->AddEntry( htest(), key.c_str(), "p" ); + leg->AddEntry( hnull, _mean, "p" ); + + if ( displayref ) { + rkey += std::string(" : "); + leg->AddEntry( hnull, "", "l" ); + leg->AddEntry( href(), rkey.c_str(), "l" ); + leg->AddEntry( hnull, _meanref, "l" ); + } } - } - else leg->AddEntry( htest(), key.c_str(), "p" ); + else { + if ( LINEF || leg.size()<m_max_entries ) leg->AddEntry( htest(), key.c_str(), "p" ); + } + + m_entries++; leg->Draw(); @@ -532,6 +567,8 @@ public: TGraphAsymmErrors* tgref() { return m_tgref; } + void max_entries( int i ) { m_max_entries = i; } + public: static void setplotref( bool b ) { plotref=meanplotref=b; } @@ -551,6 +588,11 @@ private: static bool plotref; static bool meanplotref; + size_t m_max_entries; + size_t m_entries; + + bool m_trim_errors; + }; template<typename T> @@ -587,12 +629,13 @@ class Plots : public std::vector<Plotter> { public: - Plots(const std::string& s="") : + Plots(const std::string& s="", bool errors=false ) : m_name(s), m_logx(false), m_logy(false), m_maxset(false), m_max(0), m_minset(false), m_min(0), - m_rangeset(false) + m_rangeset(false), + m_trim_errors(errors) { } double realmin( double lo=0, double hi=0 ) { @@ -809,30 +852,37 @@ public: } } + void Draw( Legend& leg, bool means=false ) { - // Max(); - - // std::cout << "\thref() " << href() << "\thtest() " << htest() << std::endl; - - /// plotting range options etc - // std::cout << "Plotter::Draw() " << m_name << "\tsize " << size() << "\txaxis: log: " << m_logx; - - // if ( m_rangeset ) std::cout << "\trange: " << m_lo << " - " << m_hi; + Draw_i( leg, means ); + if ( LINES ) { + LINES=false; + Draw_i( leg, means ); + LINES=true; + } + } - // std::cout << "\tyaxis: log:" << m_logy; - // if ( m_minset ) std::cout << "\tymin: " << m_min; - // if ( m_maxset ) std::cout << "\tymax: " << m_max; - // std::cout << std::endl; + void Draw_i( Legend& leg, bool means=false ) { bool first = true; - // for ( unsigned i=size() ; i-- ; first=false ) at(i).Draw( i, leg, means, first ); + if ( m_logy ) { + /// increase the number of log labels if only a few decades + for ( unsigned i=0 ; i<size() ; i++, first=false ) { + double ymax = at(i).htest()->GetMaximum(); + double ymin = at(i).htest()->GetMinimum(); + at(i).htest()->GetYaxis()->SetMoreLogLabels(true); + if ( ymax/ymin>1e6 ) at(i).htest()->GetYaxis()->SetMoreLogLabels(false); + break; + } + } + + for ( unsigned i=0 ; i<size() ; i++ ) at(i).trim_errors( m_trim_errors ); + for ( unsigned i=0 ; i<size() ; i++, first=false ) at(i).Draw( i, leg, means, first ); if ( watermark ) DrawLabel(0.1, 0.02, "built on "+stime()+release, kBlack, 0.03 ); - /// std::cout << "\txlimits : " << m_lo << " " << m_hi << std::endl; - gPad->SetLogy(m_logy); gPad->SetLogx(m_logx); } @@ -889,6 +939,8 @@ private: double m_lo; double m_hi; + bool m_trim_errors; + private: static bool watermark; diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/cpucost.cxx b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/cpucost.cxx index 1daef4d4675fb38f12efd3166c84e22b54a9243c..6e2db84146e9402112639a83d54281719203ef1c 100644 --- a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/cpucost.cxx +++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/cpucost.cxx @@ -4,7 +4,7 @@ ** @author ben sowden ** @date Mon 04 Aug 2014 10:45:00 BST ** - ** Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + ** Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration **/ @@ -34,6 +34,8 @@ #include "computils.h" + + /// Prints usage instructions to standard output and returns given status int usage(const std::string& name, int status) { std::ostream& s = std::cout; @@ -275,6 +277,8 @@ int main(int argc, char** argv) { // Loop over input algorithms // for (unsigned int algorithm = 0; algorithm < algorithms.size(); ++algorithm) { for (unsigned int algorithm = algorithms.size(); algorithm-- ; ) { + + if ( algorithms[algorithm].find("LumiBlock")!=std::string::npos ) continue; std::cout << "\nmain() processing algorithm : " << algorithms[algorithm] << std::endl; diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/rmain.cxx b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/rmain.cxx index 94b50e23285e70d315a9cdf5e20333e1ef9a9543..e330577804045b851ac307bc8036e018a3ce8f1b 100644 --- a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/rmain.cxx +++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/rmain.cxx @@ -4,7 +4,7 @@ ** @author mark sutton ** @date Fri 11 Jan 2019 07:41:26 CET ** - ** Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + ** Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration **/ @@ -17,7 +17,11 @@ #include <map> #include <set> -//#include "Cintex/Cintex.h" +/// stack trace headers +#include <execinfo.h> +#include <signal.h> +#include <unistd.h> + #include "TChain.h" #include "TFile.h" @@ -86,6 +90,21 @@ extern BinConfig cosmicBinConfig; void copyReleaseInfo( TTree* tree, TFile* foutdir ); +/// signal handler +void handler(int sig) { + void *array[10]; + + // get void*'s for all entries on the stack + size_t size = backtrace(array, 10); + + // print out all the frames to stderr + std::cout << "Error: signal %d:\n" << sig << std::endl; + backtrace_symbols_fd(array, size, STDERR_FILENO); + std::exit(1); +} + + + // useful function to return a string with the // current date @@ -341,9 +360,9 @@ int usage(const std::string& name, int status) { template<typename T> std::vector<T*> pointers( std::vector<T>& v ) { /// this is slow - all this copying - std::vector<T*> _v(v.size()); - for ( unsigned i=0 ; i<v.size() ; i++ ) _v.push_back( &v[i] ); - return _v; + std::vector<T*> vp(v.size(),0); + for ( unsigned i=v.size() ; i-- ; ) vp[i] = &v[i]; + return vp; } @@ -365,6 +384,11 @@ bool SelectObjectETovPT(const TrackTrigObject& tobj, TIDA::Track* t=0) { int main(int argc, char** argv) { + signal( SIGABRT, handler ); + signal( SIGFPE, handler ); + signal( SIGILL, handler ); + signal( SIGSEGV, handler ); + signal( SIGTERM, handler ); // ROOT::Cintex::Cintex::Enable(); @@ -2100,22 +2124,10 @@ int main(int argc, char** argv) /// and all our functions are using const vector<T>&, so we would need to duplicate /// all the functions to allow over riding with vector<T*> *and* vector<const T*> /// to get this nonsense to work - - std::vector<TIDA::Vertex> vtxcck = vertices_roi; - std::vector<TIDA::Vertex*> vtxp; // = pointers( vtxcck ); - - vtxp.reserve( vtxcck.size() ); - for ( unsigned iv=0 ; iv<vtxcck.size() ; iv++ ) vtxp.push_back( &vtxcck[iv] ); - - std::vector<TIDA::Vertex> vtxcck_test = vertices_test; - std::vector<TIDA::Vertex*> vtxp_test; // = pointers( vtxcck_test ); - - vtxp_test.reserve( vtxcck_test.size() ); - for ( unsigned iv=0 ; iv<vtxcck_test.size() ; iv++ ) vtxp_test.push_back( &vtxcck_test[iv] ); - - // std::cout << "vertex size :" << vtxp_test.size() << "\tvertex key " << vtxanal->name() << std::endl; - if ( vtxp.size()>0 ) vtxanal->execute( vtxp, vtxp_test, track_ev ); + /// so we now use a handy wrapper function to do the conversion for us ... + + if ( vertices_roi.size()>0 ) vtxanal->execute( pointers(vertices_roi), pointers(vertices_test), track_ev ); } diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Readcards/src/ReadCards.h b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Readcards/src/ReadCards.h index 07a17e77284ff9b25499eee8874b3a82441ec332..2a820a490e5071bb9ced49919959e1af5e928278 100644 --- a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Readcards/src/ReadCards.h +++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Readcards/src/ReadCards.h @@ -103,6 +103,15 @@ public: return GetVector(GetIndex(tag)); } + + const std::vector<int> GetIntVector(const std::string& tag) const { + std::vector<double> s = GetVector(GetIndex(tag)); + std::vector<int> a; a.reserve(s.size()); + for ( size_t i=0 ; i<s.size() ; i++ ) a.push_back( int(s[i]) ); + return a; + } + + std::vector<std::string> GetStringVector(const std::string& tag) const { return mValues[GetIndex(tag)].Val(); } diff --git a/Trigger/TrigDataAccess/TrigDataAccessMonitoring/CMakeLists.txt b/Trigger/TrigDataAccess/TrigDataAccessMonitoring/CMakeLists.txt index 422651eec081ef68e9f462b33b5657677f685553..7889473990344a69a20784f7ff502bb42a0335ad 100644 --- a/Trigger/TrigDataAccess/TrigDataAccessMonitoring/CMakeLists.txt +++ b/Trigger/TrigDataAccess/TrigDataAccessMonitoring/CMakeLists.txt @@ -1,23 +1,10 @@ -################################################################################ -# Package: TrigDataAccessMonitoring -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( TrigDataAccessMonitoring ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Control/AthenaKernel - Control/AthContainers - Event/ByteStreamCnvSvcBase - Event/ByteStreamData - GaudiKernel - PRIVATE - AtlasTest/TestTools - Control/StoreGate ) - # External dependencies: -find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) +find_package( ROOT COMPONENTS Hist ) find_package( tdaq-common ) # Component(s) in the package: @@ -26,21 +13,19 @@ atlas_add_library( TrigDataAccessMonitoringLib PUBLIC_HEADERS TrigDataAccessMonitoring INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS} PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} AthContainers ByteStreamData GaudiKernel ByteStreamCnvSvcBaseLib ByteStreamData_test StoreGateLib SGtests - PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} TestTools ) + LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} AthContainers AthenaKernel ByteStreamCnvSvcBaseLib ByteStreamData GaudiKernel + PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} StoreGateLib ) atlas_add_component( TrigDataAccessMonitoring src/components/*.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${TDAQ-COMMON_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${TDAQ-COMMON_LIBRARIES} AthContainers ByteStreamCnvSvcBaseLib ByteStreamData ByteStreamData_test GaudiKernel TestTools StoreGateLib SGtests TrigDataAccessMonitoringLib ) + LINK_LIBRARIES TrigDataAccessMonitoringLib ) + +# Install files from the package: +atlas_install_joboptions( share/*.py ) +# Tests in the package: atlas_add_test( Methods_test SOURCES test/Methods_test.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${TDAQ-COMMON_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${TDAQ-COMMON_LIBRARIES} AthContainers ByteStreamCnvSvcBaseLib ByteStreamData ByteStreamData_test GaudiKernel TestTools StoreGateLib SGtests TrigDataAccessMonitoringLib + LINK_LIBRARIES TrigDataAccessMonitoringLib POST_EXEC_SCRIPT nopost.sh ) - -# Install files from the package: -atlas_install_joboptions( share/*.py ) - diff --git a/Trigger/TrigDataAccess/TrigROBDataProviderSvc/CMakeLists.txt b/Trigger/TrigDataAccess/TrigROBDataProviderSvc/CMakeLists.txt index 395da5c4240d6797ba099f98dfb12bf037349a62..04deb38b4e36a5673096c58bc958563185c55cbb 100644 --- a/Trigger/TrigDataAccess/TrigROBDataProviderSvc/CMakeLists.txt +++ b/Trigger/TrigDataAccess/TrigROBDataProviderSvc/CMakeLists.txt @@ -1,25 +1,10 @@ -################################################################################ -# Package: TrigROBDataProviderSvc -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( TrigROBDataProviderSvc ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Event/ByteStreamData - GaudiKernel - Trigger/TrigEvent/TrigSteeringEvent - PRIVATE - Control/AthenaMonitoring - Control/CxxUtils - Control/StoreGate - Event/ByteStreamCnvSvcBase - Trigger/TrigDataAccess/TrigDataAccessMonitoring - Trigger/TrigMonitoring/TrigMonitorBase ) - # External dependencies: -find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) +find_package( ROOT COMPONENTS Hist ) find_package( tdaq-common ) # Component(s) in the package: @@ -28,13 +13,12 @@ atlas_add_library( TrigROBDataProviderSvcLib PUBLIC_HEADERS TrigROBDataProviderSvc INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS} PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} ByteStreamData GaudiKernel ByteStreamData_test StoreGateLib SGtests ByteStreamCnvSvcBaseLib TrigDataAccessMonitoringLib TrigMonitorBaseLib - PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} CxxUtils ) + LINK_LIBRARIES ByteStreamCnvSvcBaseLib ByteStreamData GaudiKernel TrigDataAccessMonitoringLib TrigSteeringEvent + PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ${TDAQ-COMMON_LIBRARIES} AthenaMonitoringKernelLib CxxUtils StoreGateLib ) atlas_add_component( TrigROBDataProviderSvc src/components/*.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${TDAQ-COMMON_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${TDAQ-COMMON_LIBRARIES} ByteStreamData ByteStreamData_test GaudiKernel CxxUtils StoreGateLib SGtests ByteStreamCnvSvcBaseLib TrigDataAccessMonitoringLib TrigMonitorBaseLib TrigROBDataProviderSvcLib ) + LINK_LIBRARIES TrigROBDataProviderSvcLib ) # Install files from the package: atlas_install_joboptions( share/*.py ) diff --git a/Trigger/TrigDataAccess/TrigSerializeCnvSvc/CMakeLists.txt b/Trigger/TrigDataAccess/TrigSerializeCnvSvc/CMakeLists.txt index 26d23aee47a7749da09aa4d6f9b8901b2f50af83..0a4e9a6904cb98b548ba0c4325e8c7848da32070 100644 --- a/Trigger/TrigDataAccess/TrigSerializeCnvSvc/CMakeLists.txt +++ b/Trigger/TrigDataAccess/TrigSerializeCnvSvc/CMakeLists.txt @@ -1,34 +1,15 @@ -################################################################################ -# Package: TrigSerializeCnvSvc -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( TrigSerializeCnvSvc ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Control/AthContainers - Control/AthenaBaseComps - Control/StoreGate - GaudiKernel - PRIVATE - Control/CxxUtils - Control/AthenaKernel - Control/DataModelRoot - Database/APR/StorageSvc - Database/PersistentDataModel - Trigger/TrigDataAccess/TrigSerializeResult - Trigger/TrigDataAccess/TrigSerializeTP ) - - # Component(s) in the package: atlas_add_library( TrigSerializeCnvSvcLib src/*.cxx PUBLIC_HEADERS TrigSerializeCnvSvc - LINK_LIBRARIES AthContainers AthenaBaseComps GaudiKernel StoreGateLib SGtests TrigSerializeResultLib TrigSerializeTPLib - PRIVATE_LINK_LIBRARIES AthenaKernel DataModelRoot StorageSvc PersistentDataModel ) + LINK_LIBRARIES AthContainers AthenaBaseComps AthenaKernel CxxUtils GaudiKernel StoreGateLib + PRIVATE_LINK_LIBRARIES DataModelRoot PersistentDataModel StorageSvc TrigSerializeResultLib TrigSerializeTPLib ) atlas_add_component( TrigSerializeCnvSvc src/components/*.cxx - LINK_LIBRARIES AthContainers AthenaBaseComps StoreGateLib SGtests GaudiKernel AthenaKernel DataModelRoot StorageSvc PersistentDataModel TrigSerializeResultLib TrigSerializeTPLib TrigSerializeCnvSvcLib ) - + LINK_LIBRARIES TrigSerializeCnvSvcLib ) diff --git a/Trigger/TrigDataAccess/TrigSerializeResult/CMakeLists.txt b/Trigger/TrigDataAccess/TrigSerializeResult/CMakeLists.txt index abe125667965fd1a0c66db939dc5a0cb232fc261..1cb063e60120692401710d70b2e93c10de0d3a3b 100644 --- a/Trigger/TrigDataAccess/TrigSerializeResult/CMakeLists.txt +++ b/Trigger/TrigDataAccess/TrigSerializeResult/CMakeLists.txt @@ -1,51 +1,35 @@ -################################################################################ -# Package: TrigSerializeResult -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( TrigSerializeResult ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Control/AthenaKernel - GaudiKernel - PRIVATE - AtlasTest/TestTools - Control/CxxUtils - Control/AthenaBaseComps - Control/AthenaKernel - Control/DataModelRoot - Tools/PathResolver ) - # External dependencies: find_package( ROOT COMPONENTS RIO Core Tree MathCore Hist pthread ) +find_package( Boost ) # Component(s) in the package: atlas_add_library( TrigSerializeResultLib src/*.cxx PUBLIC_HEADERS TrigSerializeResult - PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES AthenaKernel GaudiKernel - PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} TestTools AthenaBaseComps AthenaKernel DataModelRoot PathResolver ) + PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} + LINK_LIBRARIES AthenaBaseComps AthenaKernel GaudiKernel StoreGateLib + PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} CxxUtils DataModelRoot PathResolver ) atlas_add_component( TrigSerializeResult src/components/*.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaKernel GaudiKernel TestTools AthenaBaseComps AthenaKernel DataModelRoot PathResolver TrigSerializeResultLib ) + LINK_LIBRARIES TrigSerializeResultLib ) atlas_add_dictionary( TrigSerializeResultDict TrigSerializeResult/TrigSerializeResultDict.h TrigSerializeResult/selection.xml - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaKernel GaudiKernel TestTools AthenaBaseComps AthenaKernel DataModelRoot PathResolver TrigSerializeResultLib ) + LINK_LIBRARIES TrigSerializeResultLib ) + +# Install files from the package: +atlas_install_runtime( share/bs-streamerinfos*.root ) +# Tests in the package: atlas_add_test( remap_test SOURCES test/remap_test.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaKernel GaudiKernel TestTools AthenaBaseComps AthenaKernel DataModelRoot PathResolver TrigSerializeResultLib + LINK_LIBRARIES TrigSerializeResultLib POST_EXEC_SCRIPT nopost.sh ) - -# Install files from the package: -atlas_install_runtime( share/bs-streamerinfos*.root ) - diff --git a/Trigger/TrigDataAccess/TrigSerializeTP/CMakeLists.txt b/Trigger/TrigDataAccess/TrigSerializeTP/CMakeLists.txt index c77b2e1f2fedaffe406f1a7a448ab2193235cbc0..22f0ee0933717ceb075bfac166b22b9dc388bed2 100644 --- a/Trigger/TrigDataAccess/TrigSerializeTP/CMakeLists.txt +++ b/Trigger/TrigDataAccess/TrigSerializeTP/CMakeLists.txt @@ -1,18 +1,10 @@ -################################################################################ -# Package: TrigSerializeTP -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( TrigSerializeTP ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Control/AthenaBaseComps - Control/AthenaKernel - GaudiKernel ) - # External dependencies: -find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) +find_package( ROOT COMPONENTS Core ) # Component(s) in the package: atlas_add_library( TrigSerializeTPLib @@ -24,6 +16,4 @@ atlas_add_library( TrigSerializeTPLib atlas_add_component( TrigSerializeTP src/components/*.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps AthenaKernel GaudiKernel TrigSerializeTPLib ) - + LINK_LIBRARIES TrigSerializeTPLib ) diff --git a/Trigger/TrigEvent/TrigCaloEvent/CMakeLists.txt b/Trigger/TrigEvent/TrigCaloEvent/CMakeLists.txt index cfcd3f0b79b965244259a91d9f08812730a60010..50cf2d037d7166e66e5467708d1d54df2fb71938 100644 --- a/Trigger/TrigEvent/TrigCaloEvent/CMakeLists.txt +++ b/Trigger/TrigEvent/TrigCaloEvent/CMakeLists.txt @@ -1,63 +1,29 @@ -################################################################################ -# Package: TrigCaloEvent -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( TrigCaloEvent ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Calorimeter/CaloGeoHelpers - Control/AthenaKernel - Control/AthLinks - Control/AthContainers - Control/Navigation - Control/CxxUtils - Event/EventKernel - Event/FourMom - GaudiKernel - - Trigger/TrigEvent/TrigMissingEtEvent - PRIVATE - Calorimeter/CaloEvent - Event/xAOD/xAODCaloEvent - Event/xAOD/xAODHIEvent - Event/xAOD/xAODTrigCalo - Event/xAOD/xAODTrigL1Calo - Event/xAOD/xAODTrigMinBias - Event/xAOD/xAODTrigRinger - Trigger/TrigDataAccess/TrigSerializeCnvSvc - Trigger/TrigEvent/TrigNavigation ) - -# External dependencies: -find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) - # Component(s) in the package: atlas_add_library( TrigCaloEvent src/*.cxx - src/components/*.cxx PUBLIC_HEADERS TrigCaloEvent - PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES CaloGeoHelpers AthLinks AthContainers Navigation AthenaKernel EventKernel FourMom GaudiKernel TrigMissingEtEvent TrigSerializeCnvSvcLib TrigNavigationLib - PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} CaloEvent xAODCaloEvent xAODHIEvent xAODTrigCalo xAODTrigL1Calo xAODTrigMinBias xAODTrigRinger ) + LINK_LIBRARIES AthContainers AthLinks AthenaKernel CaloGeoHelpers CxxUtils EventKernel FourMom GaudiKernel Navigation TrigMissingEtEvent xAODCaloEvent xAODTrigMinBias + PRIVATE_LINK_LIBRARIES CaloEvent TrigNavigationLib xAODHIEvent xAODTrigCalo xAODTrigL1Calo xAODTrigRinger ) atlas_add_sercnv_library( TrigCaloEventSerCnv FILES TrigCaloEvent/TrigCaloCluster.h TrigCaloEvent/TrigCaloClusterContainer.h TrigCaloEvent/TrigEMCluster.h TrigCaloEvent/TrigEMClusterContainer.h TrigCaloEvent/RingerRings.h TrigCaloEvent/RingerRingsContainer.h TrigCaloEvent/TrigTauCluster.h TrigCaloEvent/TrigTauClusterContainer.h TrigCaloEvent/TrigTauClusterDetails.h TrigCaloEvent/TrigTauClusterDetailsContainer.h TrigCaloEvent/TrigT2Jet.h TrigCaloEvent/TrigT2JetContainer.h TrigCaloEvent/Trig3Momentum.h TrigCaloEvent/TrigT2MbtsBits.h TrigCaloEvent/TrigT2MbtsBitsContainer.h TrigCaloEvent/TrigT2ZdcSignals.h TrigCaloEvent/TrigT2ZdcSignalsContainer.h TrigCaloEvent/TrigRNNOutput.h TrigCaloEvent/TrigRNNOutputContainer.h CaloEvent/CaloCellContainer.h CaloEvent/CaloClusterContainer.h CaloEvent/CaloShowerContainer.h CaloEvent/CaloTowerContainer.h CaloEvent/CaloCellLinkContainer.h - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} CaloGeoHelpers AthLinks AthContainers Navigation AthenaKernel EventKernel FourMom GaudiKernel TrigMissingEtEvent CaloEvent xAODCaloEvent xAODHIEvent xAODTrigCalo xAODTrigL1Calo xAODTrigMinBias xAODTrigRinger TrigSerializeCnvSvcLib TrigNavigationLib TrigCaloEvent ) + LINK_LIBRARIES TrigCaloEvent ) atlas_add_sercnv_library( TrigCaloEventxAODSerCnv FILES xAODTrigCalo/TrigCaloCluster.h xAODTrigCalo/TrigCaloClusterContainer.h xAODTrigCalo/TrigCaloClusterAuxContainer.h xAODTrigCalo/TrigEMCluster.h xAODTrigCalo/TrigEMClusterContainer.h xAODTrigCalo/TrigEMClusterAuxContainer.h xAODTrigCalo/CaloClusterTrigAuxContainer.h xAODTrigL1Calo/TriggerTower.h xAODTrigL1Calo/TriggerTowerContainer.h xAODTrigL1Calo/TriggerTowerAuxContainer.h xAODTrigRinger/TrigRingerRings.h xAODTrigRinger/TrigRingerRingsContainer.h xAODTrigRinger/TrigRingerRingsAuxContainer.h xAODTrigRinger/TrigRNNOutput.h xAODTrigRinger/TrigRNNOutputContainer.h xAODTrigRinger/TrigRNNOutputAuxContainer.h xAODTrigMinBias/TrigT2MbtsBits.h xAODTrigMinBias/TrigT2MbtsBitsContainer.h xAODTrigMinBias/TrigT2MbtsBitsAuxContainer.h xAODTrigMinBias/TrigT2ZdcSignals.h xAODTrigMinBias/TrigT2ZdcSignalsContainer.h xAODTrigMinBias/TrigT2ZdcSignalsAuxContainer.h xAODCaloEvent/CaloCluster.h xAODCaloEvent/CaloClusterContainer.h xAODCaloEvent/CaloClusterAuxContainer.h xAODHIEvent/HIEventShape.h xAODHIEvent/HIEventShapeContainer.h xAODHIEvent/HIEventShapeAuxContainer.h TYPES_WITH_NAMESPACE xAOD::CaloCluster xAOD::CaloClusterContainer xAOD::CaloClusterAuxContainer xAOD::CaloClusterTrigAuxContainer xAOD::TrigCaloCluster xAOD::TrigCaloClusterContainer xAOD::TrigCaloClusterAuxContainer xAOD::TrigEMCluster xAOD::TrigEMClusterContainer xAOD::TrigEMClusterAuxContainer xAOD::TrigT2MbtsBits xAOD::TrigT2MbtsBitsContainer xAOD::TrigT2MbtsBitsAuxContainer xAOD::TrigRingerRings xAOD::TrigRingerRingsContainer xAOD::TrigRingerRingsAuxContainer xAOD::TrigRNNOutput xAOD::TrigRNNOutputContainer xAOD::TrigRNNOutputAuxContainer xAOD::TrigT2ZdcSignals xAOD::TrigT2ZdcSignalsContainer xAOD::TrigT2ZdcSignalsAuxContainer xAOD::TriggerTower xAOD::TriggerTowerContainer xAOD::TriggerTowerAuxContainer xAOD::HIEventShape xAOD::HIEventShapeContainer xAOD::HIEventShapeAuxContainer CNV_PFX xAOD - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} CaloGeoHelpers AthLinks AthContainers Navigation AthenaKernel EventKernel FourMom GaudiKernel TrigMissingEtEvent CaloEvent xAODCaloEvent xAODHIEvent xAODTrigCalo xAODTrigL1Calo xAODTrigMinBias xAODTrigRinger TrigSerializeCnvSvcLib TrigNavigationLib TrigCaloEvent ) + LINK_LIBRARIES TrigCaloEvent ) atlas_add_dictionary( TrigCaloEventDict TrigCaloEvent/TrigCaloEventDict.h TrigCaloEvent/selection.xml - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} CaloGeoHelpers AthLinks AthContainers Navigation AthenaKernel EventKernel FourMom GaudiKernel TrigMissingEtEvent CaloEvent xAODCaloEvent xAODHIEvent xAODTrigCalo xAODTrigL1Calo xAODTrigMinBias xAODTrigRinger TrigSerializeCnvSvcLib TrigNavigationLib TrigCaloEvent + LINK_LIBRARIES TrigCaloEvent DATA_LINKS TrigCaloCluster TrigEMCluster TrigT2Jet TrigTauCluster TrigTauClusterDetails RingerRings TrigRNNOutput ELEMENT_LINKS TrigEMClusterContainer RingerRingsContainer TrigTauClusterContainer TrigTauClusterDetailsContainer TrigRNNOutputContainer ) diff --git a/Trigger/TrigEvent/TrigCaloEvent/docs/README.txt b/Trigger/TrigEvent/TrigCaloEvent/docs/README.txt deleted file mode 100755 index 15d36cfe165d4db058cecc0ce358ae6c9e2665a2..0000000000000000000000000000000000000000 --- a/Trigger/TrigEvent/TrigCaloEvent/docs/README.txt +++ /dev/null @@ -1,23 +0,0 @@ - -2005-10-27: In TrigCaloEvent directory : - TrigCaloCluster.h -> base classe of - the package. - TrigEMCluster.h -> egamma object - TrigTauCluster.h -> tau object - TrigEMCluster.h -> container for - egamma object - TrigTauCluster.h -> container for - tau object - TestEDM.h -> Writes the classes - to StoreGate and tried to read it - back. - In the src directory -> the implementation - of the classes described above. - In the docs directory -> this file. - In the share directory -> very simple - athena python script to test clusters - and containers. - If the package is configured you can - just get the TestEDM.py jobOption file - and do: - athena.py TestEDM.py diff --git a/Trigger/TrigEvent/TrigCaloEvent/src/components/TrigCaloEvent_entries.cxx b/Trigger/TrigEvent/TrigCaloEvent/src/components/TrigCaloEvent_entries.cxx deleted file mode 100644 index 8b137891791fe96927ad78e64b0aad7bded08bdc..0000000000000000000000000000000000000000 --- a/Trigger/TrigEvent/TrigCaloEvent/src/components/TrigCaloEvent_entries.cxx +++ /dev/null @@ -1 +0,0 @@ - diff --git a/Trigger/TrigEvent/TrigMuonEvent/CMakeLists.txt b/Trigger/TrigEvent/TrigMuonEvent/CMakeLists.txt index fec40324544a1b72f9bdaa1b78a101be9a685ca4..18d7258089c8e6e85b12801a81a5524e835a8117 100644 --- a/Trigger/TrigEvent/TrigMuonEvent/CMakeLists.txt +++ b/Trigger/TrigEvent/TrigMuonEvent/CMakeLists.txt @@ -1,71 +1,39 @@ -################################################################################ -# Package: TrigMuonEvent -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( TrigMuonEvent ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Control/AthenaKernel - Control/AthLinks - Control/AthContainers - Control/Navigation - Event/EventKernel - Event/FourMom - GaudiKernel - Reconstruction/Particle - Trigger/TrigEvent/TrigInDetEvent - PRIVATE - AtlasTest/TestTools - Event/xAOD/xAODMuon - Event/xAOD/xAODTrigMuon - MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPattern - MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonSegment - Reconstruction/MuonIdentification/MuidEvent - Trigger/TrigDataAccess/TrigSerializeCnvSvc - Trigger/TrigEvent/TrigNavigation ) - -# External dependencies: -find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) - # Component(s) in the package: atlas_add_library( TrigMuonEvent src/*.cxx PUBLIC_HEADERS TrigMuonEvent - PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES AthLinks AthContainers Navigation EventKernel FourMom GaudiKernel Particle TrigInDetEvent TrigSerializeCnvSvcLib TrigNavigationLib - PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} TestTools AthenaKernel xAODMuon xAODTrigMuon MuonPattern MuonSegment MuidEvent ) + LINK_LIBRARIES AthContainers AthLinks AthenaKernel EventKernel FourMom GaudiKernel Navigation Particle TrigInDetEvent + PRIVATE_LINK_LIBRARIES MuidEvent MuonPattern MuonSegment TrigNavigationLib ) atlas_add_sercnv_library( TrigMuonEventSerCnv FILES TrigMuonEvent/MuonFeature.h TrigMuonEvent/MuonFeatureContainer.h TrigMuonEvent/CombinedMuonFeature.h TrigMuonEvent/CombinedMuonFeatureContainer.h TrigMuonEvent/IsoMuonFeature.h TrigMuonEvent/IsoMuonFeatureContainer.h TrigMuonEvent/TrigMuonClusterFeature.h TrigMuonEvent/TrigMuonClusterFeatureContainer.h TrigMuonEvent/TrigMuonEF.h TrigMuonEvent/TrigMuonEFContainer.h TrigMuonEvent/TileMuFeature.h TrigMuonEvent/TileMuFeatureContainer.h TrigMuonEvent/TileTrackMuFeature.h TrigMuonEvent/TileTrackMuFeatureContainer.h TrigMuonEvent/TrigMuonEFTrack.h TrigMuonEvent/TrigMuonEFCbTrack.h TrigMuonEvent/TrigMuonEFInfo.h TrigMuonEvent/TrigMuonEFInfoContainer.h TrigMuonEvent/TrigMuonEFInfoTrack.h TrigMuonEvent/TrigMuonEFInfoTrackContainer.h TrigMuonEvent/TrigMuonEFIsolation.h TrigMuonEvent/TrigMuonEFIsolationContainer.h TrigMuonEvent/MuonFeatureDetails.h TrigMuonEvent/MuonFeatureDetailsContainer.h - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} AthLinks AthContainers Navigation EventKernel FourMom GaudiKernel Particle TrigInDetEvent TestTools AthenaKernel xAODMuon xAODTrigMuon MuonPattern MuonSegment MuidEvent TrigSerializeCnvSvcLib TrigNavigationLib TrigMuonEvent ) + LINK_LIBRARIES TrigMuonEvent ) atlas_add_sercnv_library( TrigMuonEventxAODSerCnv FILES xAODMuon/MuonContainer.h xAODMuon/MuonAuxContainer.h xAODTrigMuon/L2StandAloneMuonContainer.h xAODTrigMuon/L2StandAloneMuonAuxContainer.h xAODTrigMuon/L2CombinedMuonContainer.h xAODTrigMuon/L2CombinedMuonAuxContainer.h xAODTrigMuon/L2IsoMuonContainer.h xAODTrigMuon/L2IsoMuonAuxContainer.h TYPES_WITH_NAMESPACE xAOD::MuonContainer xAOD::MuonAuxContainer xAOD::L2StandAloneMuonContainer xAOD::L2StandAloneMuonAuxContainer xAOD::L2CombinedMuonContainer xAOD::L2CombinedMuonAuxContainer xAOD::L2IsoMuonContainer xAOD::L2IsoMuonAuxContainer CNV_PFX xAOD - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} AthLinks AthContainers Navigation EventKernel FourMom GaudiKernel Particle TrigInDetEvent TestTools AthenaKernel xAODMuon xAODTrigMuon MuonPattern MuonSegment MuidEvent TrigSerializeCnvSvcLib TrigNavigationLib TrigMuonEvent ) + LINK_LIBRARIES TrigMuonEvent ) atlas_add_dictionary( TrigMuonEvent_cDict TrigMuonEvent/TrigMuonEvent_cDict.h TrigMuonEvent/selection_c.xml - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} AthLinks AthContainers Navigation EventKernel FourMom GaudiKernel Particle TrigInDetEvent TestTools AthenaKernel xAODMuon xAODTrigMuon MuonPattern MuonSegment MuidEvent TrigSerializeCnvSvcLib TrigNavigationLib TrigMuonEvent ) + LINK_LIBRARIES TrigMuonEvent ) atlas_add_dictionary( TrigMuonEventDict TrigMuonEvent/TrigMuonEventDict.h TrigMuonEvent/selection.xml - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} AthLinks AthContainers Navigation EventKernel FourMom GaudiKernel Particle TrigInDetEvent TestTools AthenaKernel xAODMuon xAODTrigMuon MuonPattern MuonSegment MuidEvent TrigSerializeCnvSvcLib TrigNavigationLib TrigMuonEvent + LINK_LIBRARIES TrigMuonEvent DATA_LINKS MuonFeature CombinedMuonFeature IsoMuonFeature TrigMuonClusterFeature TrigMuonEFContainer TileMuFeature TileTrackMuFeature TrigMuonEFIsolationContainer ELEMENT_LINKS MuonFeatureContainer CombinedMuonFeatureContainer IsoMuonFeatureContainer TrigMuonClusterFeatureContainer TileMuFeatureContainer TileTrackMuFeatureContainer TrigMuonEFInfoContainer ) atlas_add_test( Operators_test SOURCES test/Operators_test.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} AthLinks AthContainers Navigation EventKernel FourMom GaudiKernel Particle TrigInDetEvent TestTools AthenaKernel xAODMuon xAODTrigMuon MuonPattern MuonSegment MuidEvent TrigSerializeCnvSvcLib TrigNavigationLib TrigMuonEvent + LINK_LIBRARIES TrigMuonEvent POST_EXEC_SCRIPT nopost.sh ) diff --git a/Trigger/TrigEvent/TrigNavTools/TrigNavTools/TrigNavigationSlimmingTool.h b/Trigger/TrigEvent/TrigNavTools/TrigNavTools/TrigNavigationSlimmingTool.h index 99e63909be431e1be6534054c5eabefe016ee0fc..670f81e8da88ba25813d2b7c961e6fa5edd2310c 100644 --- a/Trigger/TrigEvent/TrigNavTools/TrigNavTools/TrigNavigationSlimmingTool.h +++ b/Trigger/TrigEvent/TrigNavTools/TrigNavTools/TrigNavigationSlimmingTool.h @@ -71,9 +71,6 @@ namespace HLT { StatusCode doSlimming( std::vector<uint32_t>& slimmed_and_serialized ) const; - std::map<std::string, int>* getFeatureOccurrences(HLT::NavigationCore* navigation); - - private: ToolHandle<Trig::TrigDecisionTool> m_trigDecisionTool; @@ -251,12 +248,6 @@ namespace HLT { bool toBeIncluded(State& state, TriggerElement *te, std::vector<TriggerElement*> *inclusionList, std::vector<TriggerElement*> *exclusionList); - /** - * @brief Returns the label for the given feature - */ - std::string getLabel(const HLT::NavigationCore& navigation, - const TriggerElement::FeatureAccessHelper &fah) const; - /** * @brief Propagates the features on given TE to its children */ diff --git a/Trigger/TrigEvent/TrigNavTools/TrigNavTools/getFeatureOccurrences.h b/Trigger/TrigEvent/TrigNavTools/TrigNavTools/getFeatureOccurrences.h new file mode 100644 index 0000000000000000000000000000000000000000..fe6419ea616a8320367f291b5fda2ca87b7e71a5 --- /dev/null +++ b/Trigger/TrigEvent/TrigNavTools/TrigNavTools/getFeatureOccurrences.h @@ -0,0 +1,41 @@ +// This file's extension implies that it's C, but it's really -*- C++ -*-. +/* + * Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration. + */ +/** + * @file TrigNavTools/getFeatureOccurrences.h + * @author scott snyder <snyder@bnl.gov> + * @date May, 2020 + * @brief Return number of occurrences of each feature. + * + * Broken out from the old TrigNavigationSlimmingTool (B. Smith / T. Bold). + */ + + +#ifndef TRIGNAVTOOLS_GETFEATUREOCCURRENCES_H +#define TRIGNAVTOOLS_GETFEATUREOCCURRENCES_H + + +#include <map> +#include <string> + + +namespace HLT { + + +class NavigationCore; + + +namespace TrigNavTools { + + +/// Return number of occurrences of each feature. +std::map<std::string, int> +getFeatureOccurrences (const HLT::NavigationCore* navigation); + + + +}} // namespace HLT::TrigNavTools + + +#endif // not TRIGNAVTOOLS_GETFEATUREOCCURRENCES_H diff --git a/Trigger/TrigEvent/TrigNavTools/src/TrigNavigationSlimmingTool.cxx b/Trigger/TrigEvent/TrigNavTools/src/TrigNavigationSlimmingTool.cxx index 2de74db35c49e6be597eacd581f4b3b2b3f9c83b..fa5025c3437fa6265d8fb1095e7cfceeb7b39ef9 100644 --- a/Trigger/TrigEvent/TrigNavTools/src/TrigNavigationSlimmingTool.cxx +++ b/Trigger/TrigEvent/TrigNavTools/src/TrigNavigationSlimmingTool.cxx @@ -14,12 +14,15 @@ //#include "TrigNavigation/TriggerElementFactory.h" #include "TrigNavigation/Holder.h" #include "GaudiKernel/ThreadLocalContext.h" +#include "getLabel.h" #include "TrigNavTools/TrigNavigationSlimmingTool.h" #include <iostream> +using HLT::TrigNavTools::SlimmingHelper; + /********************************************************************** * * Constructors and destructors @@ -320,40 +323,6 @@ StatusCode HLT::TrigNavigationSlimmingTool::finalize() { -std::map<std::string, int> *HLT::TrigNavigationSlimmingTool::getFeatureOccurrences(HLT::NavigationCore* navigation) { - if(!navigation) - return 0; - - if (navigation->getInitialNode() == 0 ) - return 0; - - std::map<std::string, int> *featureOccurrences = new std::map<std::string, int>; - - - for ( auto te : navigation->getAllTEs() ) { - for ( const auto& fea: te->getFeatureAccessHelpers() ) { - (*featureOccurrences)[getLabel(*navigation, fea)] += 1; - } - } - - return featureOccurrences; -} - -std::string HLT::TrigNavigationSlimmingTool::getLabel(const HLT::NavigationCore& navigation, - const TriggerElement::FeatureAccessHelper &fah) const { - - CLID clid = fah.getCLID(); - std::string label; - HLTNavDetails::IHolder *h = navigation.getHolder(clid, fah.getIndex().subTypeIndex()); - if(h) label = h->label(); - - return label; -} - - - - - StatusCode HLT::TrigNavigationSlimmingTool::lateFillConfiguration(State& state) const { // remember the configured chain names, as they will be useful later @@ -534,11 +503,11 @@ bool HLT::TrigNavigationSlimmingTool::toBeIncluded(State& state, te->getFeatureAccessHelpers().begin(); iter != te->getFeatureAccessHelpers().end(); ++iter) { // grab the label and check if it was found in the inclusion list - if(std::find(inclusionList->begin(), inclusionList->end(), this->getLabel(state.navigation, *iter )) != inclusionList->end()) + if(std::find(inclusionList->begin(), inclusionList->end(), SlimmingHelper::getLabel(state.navigation, *iter )) != inclusionList->end()) return true; // now find if its in the exclusion list if(exclusionList && std::find(exclusionList->begin(), exclusionList->end(), - this->getLabel( state.navigation, *iter )) != exclusionList->end()) + SlimmingHelper::getLabel( state.navigation, *iter )) != exclusionList->end()) onExclusionList = 1; } @@ -562,7 +531,7 @@ bool HLT::TrigNavigationSlimmingTool::toBeIncluded(State& state, te->getFeatureAccessHelpers().begin(); iter != te->getFeatureAccessHelpers().end(); ++iter) { // grab the label and check if it was found in the exclusion list - if(std::find(exclusionList->begin(), exclusionList->end(), this->getLabel(state.navigation, *iter )) != exclusionList->end()) + if(std::find(exclusionList->begin(), exclusionList->end(), SlimmingHelper::getLabel(state.navigation, *iter )) != exclusionList->end()) return false; } diff --git a/Trigger/TrigEvent/TrigNavTools/src/getFeatureOccurrences.cxx b/Trigger/TrigEvent/TrigNavTools/src/getFeatureOccurrences.cxx new file mode 100644 index 0000000000000000000000000000000000000000..5b09dc5273d2cb40c266c5c9d07d3dd712c76fef --- /dev/null +++ b/Trigger/TrigEvent/TrigNavTools/src/getFeatureOccurrences.cxx @@ -0,0 +1,39 @@ +/** + * @file TrigNavTools/src/getFeatureOccurrences.h + * @author scott snyder <snyder@bnl.gov> + * @date May, 2020 + * @brief Return number of occurrences of each feature. + * + * Broken out from the old TrigNavigationSlimmingTool (B. Smith / T. Bold). + */ + + +#include "TrigNavTools/getFeatureOccurrences.h" +#include "TrigNavigation/Navigation.h" +#include "getLabel.h" + + +namespace HLT { +namespace TrigNavTools { + + +/// Return number of occurrences of each feature. +std::map<std::string, int> +getFeatureOccurrences (const HLT::NavigationCore* navigation) +{ + std::map<std::string, int> featureOccurrences; + + if (navigation && navigation->getInitialNode()) { + + for ( auto te : navigation->getAllTEs() ) { + for ( const auto& fea: te->getFeatureAccessHelpers() ) { + featureOccurrences[SlimmingHelper::getLabel(*navigation, fea)] += 1; + } + } + } + + return featureOccurrences; +} + + +}} // namespace HLT::TrigNavTools diff --git a/Trigger/TrigEvent/TrigNavTools/src/getLabel.cxx b/Trigger/TrigEvent/TrigNavTools/src/getLabel.cxx new file mode 100644 index 0000000000000000000000000000000000000000..11480ae3c9523bcf3307433868a9e56a02b93934 --- /dev/null +++ b/Trigger/TrigEvent/TrigNavTools/src/getLabel.cxx @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration. + */ +/** + * @file TrigNavTools/src/getLabel.cxx + * @author scott snyder <snyder@bnl.gov> + * @date May, 2020 + * @brief Helper function to get a label for a feature. + * + * Broken out from the old TrigNavigationSlimmingTool (B. Smith / T. Bold). + */ + + +#include "getLabel.h" +#include "TrigNavigation/Navigation.h" + + +namespace HLT { +namespace TrigNavTools { + + +std::string +SlimmingHelper::getLabel(const HLT::NavigationCore& navigation, + const HLT::TriggerElement::FeatureAccessHelper& fah) +{ + CLID clid = fah.getCLID(); + std::string label; + HLTNavDetails::IHolder *h = navigation.getHolder(clid, fah.getIndex().subTypeIndex()); + if(h) label = h->label(); + + return label; +} + + +}} // namespace HLT::TrigNavTools diff --git a/Trigger/TrigEvent/TrigNavTools/src/getLabel.h b/Trigger/TrigEvent/TrigNavTools/src/getLabel.h new file mode 100644 index 0000000000000000000000000000000000000000..18424dca4ef7bf1cd4ef72fc1a1cde096cd110de --- /dev/null +++ b/Trigger/TrigEvent/TrigNavTools/src/getLabel.h @@ -0,0 +1,44 @@ +// This file's extension implies that it's C, but it's really -*- C++ -*-. +/* + * Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration. + */ +/** + * @file TrigNavTools/src/getLabel.h + * @author scott snyder <snyder@bnl.gov> + * @date May, 2020 + * @brief Helper function to get a label for a feature. + * + * Broken out from the old TrigNavigationSlimmingTool (B. Smith / T. Bold). + */ + + +#ifndef TRIGNAVTOOLS_GETLABEL_H +#define TRIGNAVTOOLS_GETLABEL_H + + +#include "TrigNavigation/TriggerElement.h" +#include <string> + + +namespace HLT { + + +class NavigationCore; + + +namespace TrigNavTools { + + +// Wrapped in a class so we can more easily declare it a friend +// in NavigationCore. +struct SlimmingHelper { + static + std::string getLabel (const HLT::NavigationCore& navigation, + const HLT::TriggerElement::FeatureAccessHelper& fah); +}; + + +}} // namespace HLT::TrigNavTools + + +#endif // not TRIGNAVTOOLS_GETLABEL_H diff --git a/Trigger/TrigEvent/TrigNavigation/TrigNavigation/NavigationCore.h b/Trigger/TrigEvent/TrigNavigation/TrigNavigation/NavigationCore.h index 1d14bac24595571b3bb9eb4e23f1a56655c7ed9e..be488a5f8c915d6078d9fb8a374c402b1db33551 100644 --- a/Trigger/TrigEvent/TrigNavigation/TrigNavigation/NavigationCore.h +++ b/Trigger/TrigEvent/TrigNavigation/TrigNavigation/NavigationCore.h @@ -1,7 +1,7 @@ // Emacs -*- c++ -*- /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ @@ -43,6 +43,9 @@ class TrigBStoxAODTool; namespace HLT { class TrigNavigationSlimmingTool; + namespace TrigNavTools { + struct SlimmingHelper; + } /** * @brief The NavigationCore class, adds on top of the TrigNavStructure the EDM read-only handling * @@ -95,6 +98,7 @@ namespace HLT { class NavigationCore : public HLT::TrigNavStructure { friend class HLT::TrigNavigationSlimmingTool; + friend struct HLT::TrigNavTools::SlimmingHelper; friend class HLTNavDetails::TypeMapDeleter; friend class ::TrigBStoxAODTool; public: diff --git a/Trigger/TrigFake/CMakeLists.txt b/Trigger/TrigFake/CMakeLists.txt index 8b97b0e7d8f4942a2880022a2149ff272a3aef65..0d79ad93b1fe04e877470904572858272dfd8201 100644 --- a/Trigger/TrigFake/CMakeLists.txt +++ b/Trigger/TrigFake/CMakeLists.txt @@ -1,44 +1,13 @@ -################################################################################ -# Package: TrigFake -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( TrigFake ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Control/AthenaBaseComps - GaudiKernel - Trigger/TrigEvent/TrigInDetEvent - Trigger/TrigEvent/TrigSteeringEvent - Trigger/TrigSteer/TrigSteering - PRIVATE - Control/StoreGate - Generators/GeneratorObjects - Generators/AtlasHepMC - Trigger/TrigConfiguration/TrigConfHLTData - Trigger/TrigEvent/TrigNavigation - Trigger/TrigSteer/TrigInterfaces - Trigger/TrigT1/TrigT1Interfaces - Trigger/TrigT1/TrigT1Result ) - # External dependencies: find_package( CLHEP ) # Component(s) in the package: -atlas_add_library( TrigFakeLib - src/*.cxx - PUBLIC_HEADERS TrigFake - PRIVATE_INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} - PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES AthenaBaseComps GaudiKernel TrigInDetEvent TrigSteeringEvent TrigSteeringLib StoreGateLib SGtests TrigNavigationLib TrigInterfacesLib - PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} AtlasHepMCLib GeneratorObjects TrigConfHLTData TrigT1Interfaces TrigT1Result ) - atlas_add_component( TrigFake - src/components/*.cxx - INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaBaseComps GaudiKernel TrigInDetEvent TrigSteeringEvent TrigSteeringLib StoreGateLib SGtests GeneratorObjects TrigConfHLTData TrigNavigationLib TrigInterfacesLib TrigT1Interfaces TrigT1Result TrigFakeLib ) - -# Install files from the package: -atlas_install_joboptions( share/jobOfragment_TrigFake.* ) - + src/*.cxx src/components/*.cxx + INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} + LINK_LIBRARIES ${CLHEP_LIBRARIES} AtlasHepMCLib GeneratorObjects TrigConfHLTData TrigInDetEvent TrigSteeringEvent TrigSteeringLib TrigT1Interfaces TrigT1Result ) diff --git a/Trigger/TrigFake/share/IDonly_sequence.xml b/Trigger/TrigFake/share/IDonly_sequence.xml deleted file mode 100755 index ae6466c52335140b758d2f11a7a0e71b15d0079b..0000000000000000000000000000000000000000 --- a/Trigger/TrigFake/share/IDonly_sequence.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no" ?> - -<!DOCTYPE SEQUENCE_LIST SYSTEM "sequencelist.dtd"> - -<SEQUENCE_LIST> - - -<SEQUENCE level="L2" input="EMTAUROI" -algorithm=" -TrigIdScan::IdScanMain/IdScan_IdScanMain/1 -TrigEgammaNtuple/TrigEgammaNtuple/1 -" -output="LVL2out" /> - - - -</SEQUENCE_LIST> - - - - - diff --git a/Trigger/TrigFake/share/IDonly_signature.xml b/Trigger/TrigFake/share/IDonly_signature.xml deleted file mode 100755 index 71c705c5fcb6393d10bc082694216805b8b733c5..0000000000000000000000000000000000000000 --- a/Trigger/TrigFake/share/IDonly_signature.xml +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no" ?> - -<!DOCTYPE SIGNATURE_LIST SYSTEM "signaturelist.dtd"> - -<SIGNATURE_LIST> - -<SIGNATURE signature_id="LVL2out" prescale="1" forced_accept="0"> - <TRIGGERELEMENT te_name="LVL2out" /> -</SIGNATURE> - -</SIGNATURE_LIST> diff --git a/Trigger/TrigFake/share/TrigMaster_IDonly_jobOptions.txt b/Trigger/TrigFake/share/TrigMaster_IDonly_jobOptions.txt deleted file mode 100755 index 8919f75fe7f490e356e4a2789c876f138c07bf68..0000000000000000000000000000000000000000 --- a/Trigger/TrigFake/share/TrigMaster_IDonly_jobOptions.txt +++ /dev/null @@ -1,209 +0,0 @@ -//************************************************************** -// -// top jopOptions file for accessing RIOs from RDOs using transient BS -// for any algorithm. -// The Selection must come into the sequence list to use -// -//************************************************************** - - -// specify input file -ApplicationMgr.EvtSel = "FILE ZEBRA.P"; - -// specify the number of events -ApplicationMgr.EvtMax = 3; - -//-------------------------------------------------------------- -// Event parameters -//-------------------------------------------------------------- -EventSelector.dataSetNames = {"Y23406.1", "Y23406.2"}; -// For runs: provide a first/last range or a list -EventSelector.runs = {1, 30000}; - -// Switch off detectors not needed -EventSelector.muons=false; -//EventSelector.indet=false; -//EventSelector.pixel=false; -//EventSelector.sct=false; -//EventSelector.trt=false; -//EventSelector.calos=false; -//EventSelector.tile=false; -//EventSelector.hec=false; -//EventSelector.fcal=false; - -//-------------------------------------------------------------- -// Use auditors -//-------------------------------------------------------------- -ApplicationMgr.DLLs += { "GaudiAud" }; - -// write out a summary of the time spent -AuditorSvc.Auditors += { "ChronoAuditor"}; - -// write out a short message upon entering or leaving each algorithm -AuditorSvc.Auditors += { "NameAuditor" }; - -// write out s summary of the memory usage -AuditorSvc.Auditors += { "MemStatAuditor" }; -MemStatAuditor.OutputLevel = 4 ; - - -#include "$PARTPROPSVCROOT/share/PartPropSvc.txt" -// -// Genz/kine->HepMc converter for true particle, Generators and Kine -// -ApplicationMgr.DLLs += { "GenzModule"}; -// run the GenzKine->HepMC coverter -ApplicationMgr.TopAlg += { "GenzModule"}; - -ApplicationMgr.DLLs += { "TrigFake" }; - -#include "AthenaCommon/Atlas_ZebraTDR.UnixStandardJob.txt" - -#include "ByteStreamCnvSvcBase/BSAddProvSvc_RIO_jobOptions.txt" - -ProxyProviderSvc.ProviderNames += { "ByteStreamAddressProviderSvc" } ; - -#include "InDetDC1ReadPackage/SiTrackerDetDescrDC0_CnvOptions.txt" -#include "InDetDC1ReadPackage/PixelDetDescrCnvOptions.txt" -#include "InDetDC1ReadPackage/SCT_DetDescrCnvOptions.txt" -DetDescrCnvSvc.DecodeIdDict = true; - -// Make RDOs and Write BS for all 3 InDet detectors -// -ApplicationMgr.DLLs +={"InDetRawDataByteStream" }; - - -#include "InDetDC1ReadPackage/TRT_RDOCnvOptions.txt" - -#include "InDetDC1ReadPackage/SCT_RDOCnvOptions.txt" - -#include "InDetDC1ReadPackage/PixelRDOCnvOptions.txt" - -#include "$INDETSIMDATASELECTORROOT/share/PixelSimDataSelectorOptions.txt" -#include "$INDETSIMDATASELECTORROOT/share/SCT_SimDataSelectorOptions.txt" - -ApplicationMgr.DLLs +={"InDetRawDataByteStream" }; - -// TRT -StreamBS.ItemList +={"2542#*"}; - -// SCT -StreamBS.ItemList +={"2541#*"}; - -// Pixel -StreamBS.ItemList +={"2540#*"}; - -#include "ByteStreamCnvSvc/RDP_ByteStream_jobOptions.txt" - - -//InDet -ApplicationMgr.DLLs += {"InDetRecInputByteStream"}; -ApplicationMgr.ExtSvc += { "ByteStreamCnvSvc"} ; - - -//-------------------------------------------------------------- -// TrigConfig Algorithm -//-------------------------------------------------------------- -ApplicationMgr.DLLs += { "TrigConfig" }; -ApplicationMgr.TopAlg += {"HLT::TriggerConfig/TriggerConfig"}; - -// SG keys for config data -TriggerConfig.trigConfigL2Vector = "storeL2Location"; -TriggerConfig.trigConfigEFVector = "storeEFLocation"; -TriggerConfig.OutputLevel = 3; - -//-------------------------------------------------- -// TrigSteering Algorithm -//------------------------------------------------- -ApplicationMgr.DLLs += { "TrigSteering" }; - -ApplicationMgr.TopAlg += { "StepController/StepController_L2" }; - -// SG keys for config data -StepHandler_L2.trigConfigVector = "storeL2Location"; - -//-------------------------------------------------- -// Region Selection Tool -//------------------------------------------------- -ApplicationMgr.DLLs += { "TrigRegionSelector" }; - -//-------------------------------------------------- -// L2/EF Seeding -//------------------------------------------------- -//ApplicationMgr.DLLs += { "TrigL2Result" }; - -//-------------------------------------------------- -// Result Builder -//------------------------------------------------- -ApplicationMgr.DLLs += { "TrigL2ResultBuilder" }; - -ResultBuilder_L2.trigL2ConfigVector = "storeL2Location"; -ResultBuilder_L2.trigEFConfigVector = "storeEFLocation"; -ResultBuilder_L2.useL1Simulation= "NO"; - -#include "TrigIDSCAN/jobOfragment_TrigIDSCAN.txt" -#include "TrigSiTrack/jobOfragment_TrigSitrack.txt" -//#include "TrigTRTxK/jobOfragment_TrigTRTxK.txt" - -#include "TrigSiTreeAlg/jobOfragment_TrigSiTreeAlg.txt" - -//-------------------------------------------------------------- -// TrigNtEgamma: CBNT and LVL2 Ntuples -//-------------------------------------------------------------- -#include "TrigNtEgamma/jobOfragment_TrigNtEgamma.txt" -TrigEgammaNtuple_1_L2.NtupleID = 101; -TrigEgammaNtuple_2_L2.NtupleID = 102; - -//-------------------------------------------------------------- -// Set individual output levels -// (0=NIL 1=VERBOSE, 2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL ) -//-------------------------------------------------------------- -// Get rid of messages during running -L2Result.OutputLevel = 4; - -//-------------------------------------------------- -// Benchmarking -//-------------------------------------------------- -#include "TrigTimeAlgs/jobOfragment_TrigTimerSvc.txt" -TrigTimeNtuple_1_L2.NtupleID = 501; -TrigTimeNtuple_2_L2.NtupleID = 502; - - - - -//-------------------------------------------------------------- -// Algorithm Sequence and Signature lists to configure HLTSSW -//-------------------------------------------------------------- -TriggerConfig.sequenceListFileLocation = "IDonly_sequence.xml"; -TriggerConfig.signatureListFileLocation = "IDonly_signature.xml"; - -//--------------------------------------------------------------- -// Ntuple service output -//--------------------------------------------------------------- -ApplicationMgr.HistogramPersistency="HBOOK"; -NTupleSvc.Output = { "FILE1 DATAFILE='trigger.ntup' OPT='NEW'" }; -HbookHistSvc.NPAWC = 1500000 ; - -// Histogram output, if any. -HistogramPersistencySvc.OutputFile = "histo.hbook"; - -StepController_L2.Lvl1Conversion="FakeLvl1Conversion"; -FakeLvl1Conversion_L2.FakeEmTauRoiParticleIDs={11,-11}; -FakeLvl1Conversion_L2.FakeEmTauRoiPtMin=20.*GeV; -FakeLvl1Conversion_L2.FakeMuonRoiParticleIDs={13,-13}; -FakeLvl1Conversion_L2.FakeMuonRoiPtMin=20.*GeV; - -//-------------------------------------------------------------- -// Output levels -//-------------------------------------------------------------- -// Set output level threshold -// (0=NIL 1=VERBOSE, 2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL ) -MessageSvc.OutputLevel = 2 ; -StoreGateSvc.OutputLevel = 3 ; - - -// write out a list of all Storegate collection with their keys and -// lock/unlock state. Very useful for debugging purpose -StoreGateSvc.Dump = false ; -ROBDataProviderSvc.OutputLevel = 3 ; -TRT_RDO_Cnv.OutputLevel = 3 ; \ No newline at end of file diff --git a/Trigger/TrigFake/share/jobOfragment_FakeLvl1ConversionTestBeam.py b/Trigger/TrigFake/share/jobOfragment_FakeLvl1ConversionTestBeam.py deleted file mode 100755 index 7ff5f35062c21d4f9a4c139050351c83caa6ffed..0000000000000000000000000000000000000000 --- a/Trigger/TrigFake/share/jobOfragment_FakeLvl1ConversionTestBeam.py +++ /dev/null @@ -1,15 +0,0 @@ -#give a list of RoI you want to create (as many as the shortest list below) -FakeLvl1Conversion_L2.RoiIDs = ["MUONROI","MUONROI","MUONROI","EMTAUROI"] - -#their positions in eta -#FakeLvl1Conversion_L2.RoiPositionsEta = [-0.405654,0.87,99.] -FakeLvl1Conversion_L2.RoiPositionsEta = [2.75] - -#and phi -FakeLvl1Conversion_L2.RoiPositionsPhi = [4.09706,0.17,0.] -FakeLvl1Conversion_L2.OutputLevel = DEBUG - -#only one MUONROI can be set (defaults are 1/31/10) -FakeLvl1Conversion_L2.MUONROIsubsysId = 1 -FakeLvl1Conversion_L2.MUONROIsectorId = 31 -FakeLvl1Conversion_L2.MUONROIroiNumber= 10 diff --git a/Trigger/TrigFake/share/jobOfragment_TrigFake.py b/Trigger/TrigFake/share/jobOfragment_TrigFake.py deleted file mode 100755 index 9581352cce0dc83b18d6ab63ce67617bf549726d..0000000000000000000000000000000000000000 --- a/Trigger/TrigFake/share/jobOfragment_TrigFake.py +++ /dev/null @@ -1,9 +0,0 @@ -theApp.Dlls += [ "TrigFake" ] -if doTruth: - theApp.TopAlg += [ "ZVertexFromKine" ] - - if DetDescrVersion[0:2]=="DC2": - Algorithm("ZVertexFromKine").McEventCollectionName = "G4Truth" - else: - Algorithm("ZVertexFromKine").McEventCollectionName = "TruthEvent" - diff --git a/Trigger/TrigFake/share/jobOfragment_TrigFake.txt b/Trigger/TrigFake/share/jobOfragment_TrigFake.txt deleted file mode 100755 index dac7ebd55a171f0b2392fa12b3edf5ad965c8127..0000000000000000000000000000000000000000 --- a/Trigger/TrigFake/share/jobOfragment_TrigFake.txt +++ /dev/null @@ -1 +0,0 @@ -ApplicationMgr.DLLs += { "TrigFake" }; diff --git a/Trigger/TrigFake/src/FakeLvl1MultipleRoIsatFixedEtaPhi.cxx b/Trigger/TrigFake/src/FakeLvl1MultipleRoIsatFixedEtaPhi.cxx old mode 100755 new mode 100644 index b48deb22969eccbfeabf6a417271069221f082f8..2ecadae82256704452dd298dd8f62d6018f085c3 --- a/Trigger/TrigFake/src/FakeLvl1MultipleRoIsatFixedEtaPhi.cxx +++ b/Trigger/TrigFake/src/FakeLvl1MultipleRoIsatFixedEtaPhi.cxx @@ -31,9 +31,9 @@ Modified : # include "CLHEP/Units/SystemOfUnits.h" #include "TrigSteeringEvent/TrigRoiDescriptor.h" -#include "TrigFake/FakeLvl1MultipleRoIsatFixedEtaPhi.h" -#include "TrigFake/FakeRoI.h" -#include "TrigFake/Trajectory.h" +#include "FakeLvl1MultipleRoIsatFixedEtaPhi.h" +#include "FakeRoI.h" +#include "Trajectory.h" #include "TrigInterfaces/AlgoConfig.h" #include "TrigSteering/SteeringChain.h" diff --git a/Trigger/TrigFake/TrigFake/FakeLvl1MultipleRoIsatFixedEtaPhi.h b/Trigger/TrigFake/src/FakeLvl1MultipleRoIsatFixedEtaPhi.h similarity index 100% rename from Trigger/TrigFake/TrigFake/FakeLvl1MultipleRoIsatFixedEtaPhi.h rename to Trigger/TrigFake/src/FakeLvl1MultipleRoIsatFixedEtaPhi.h diff --git a/Trigger/TrigFake/src/FakeLvl1RoIatFixedEtaPhi.cxx b/Trigger/TrigFake/src/FakeLvl1RoIatFixedEtaPhi.cxx old mode 100755 new mode 100644 index ab1a7e2b40e1bfca837c55bc40b35252d0f440b5..164b12a3ea103697391a9545fd59af04bdff1d02 --- a/Trigger/TrigFake/src/FakeLvl1RoIatFixedEtaPhi.cxx +++ b/Trigger/TrigFake/src/FakeLvl1RoIatFixedEtaPhi.cxx @@ -27,9 +27,9 @@ Modified : # include "CLHEP/Units/SystemOfUnits.h" #include "TrigSteeringEvent/TrigRoiDescriptor.h" -#include "TrigFake/FakeLvl1RoIatFixedEtaPhi.h" -#include "TrigFake/FakeRoI.h" -#include "TrigFake/Trajectory.h" +#include "FakeLvl1RoIatFixedEtaPhi.h" +#include "FakeRoI.h" +#include "Trajectory.h" #include "TrigInterfaces/AlgoConfig.h" #include "TrigSteering/SteeringChain.h" diff --git a/Trigger/TrigFake/TrigFake/FakeLvl1RoIatFixedEtaPhi.h b/Trigger/TrigFake/src/FakeLvl1RoIatFixedEtaPhi.h similarity index 100% rename from Trigger/TrigFake/TrigFake/FakeLvl1RoIatFixedEtaPhi.h rename to Trigger/TrigFake/src/FakeLvl1RoIatFixedEtaPhi.h diff --git a/Trigger/TrigFake/src/FakeLvl1RoIfromKine.cxx b/Trigger/TrigFake/src/FakeLvl1RoIfromKine.cxx old mode 100755 new mode 100644 index d05c4d58a4b0e6c0d0b0e1b12ab06aa09e230fb5..40d868dd86ddef2995514f2357cffa9001731716 --- a/Trigger/TrigFake/src/FakeLvl1RoIfromKine.cxx +++ b/Trigger/TrigFake/src/FakeLvl1RoIfromKine.cxx @@ -33,9 +33,9 @@ Modified : #include "GeneratorObjects/McEventCollection.h" #include "TrigSteeringEvent/TrigRoiDescriptor.h" -#include "TrigFake/FakeLvl1RoIfromKine.h" -#include "TrigFake/FakeRoI.h" -#include "TrigFake/Trajectory.h" +#include "FakeLvl1RoIfromKine.h" +#include "FakeRoI.h" +#include "Trajectory.h" #include "TrigInterfaces/AlgoConfig.h" diff --git a/Trigger/TrigFake/TrigFake/FakeLvl1RoIfromKine.h b/Trigger/TrigFake/src/FakeLvl1RoIfromKine.h similarity index 100% rename from Trigger/TrigFake/TrigFake/FakeLvl1RoIfromKine.h rename to Trigger/TrigFake/src/FakeLvl1RoIfromKine.h diff --git a/Trigger/TrigFake/TrigFake/FakeRoI.h b/Trigger/TrigFake/src/FakeRoI.h similarity index 100% rename from Trigger/TrigFake/TrigFake/FakeRoI.h rename to Trigger/TrigFake/src/FakeRoI.h diff --git a/Trigger/TrigFake/src/Trajectory.cxx b/Trigger/TrigFake/src/Trajectory.cxx old mode 100755 new mode 100644 index 598bc5f2536d0be15f60db56665376c420a47a7b..44113db61aec510ae4655f14dd25034b8ae86b2c --- a/Trigger/TrigFake/src/Trajectory.cxx +++ b/Trigger/TrigFake/src/Trajectory.cxx @@ -3,7 +3,7 @@ */ #include<cmath> -#include "TrigFake/Trajectory.h" +#include "Trajectory.h" namespace TrigFake{ Trajectory::Trajectory(double px_MeV, double py_MeV, double pz_MeV, diff --git a/Trigger/TrigFake/TrigFake/Trajectory.h b/Trigger/TrigFake/src/Trajectory.h similarity index 100% rename from Trigger/TrigFake/TrigFake/Trajectory.h rename to Trigger/TrigFake/src/Trajectory.h diff --git a/Trigger/TrigFake/src/ZVertexFromKine.cxx b/Trigger/TrigFake/src/ZVertexFromKine.cxx old mode 100755 new mode 100644 index d1558205b8a7436b07bde4b70dc2d81d77e3210c..9b0f9d3b6e1c6e1a58579fb14cb800e45ffcec64 --- a/Trigger/TrigFake/src/ZVertexFromKine.cxx +++ b/Trigger/TrigFake/src/ZVertexFromKine.cxx @@ -25,7 +25,7 @@ Modified : #include "TrigInDetEvent/TrigVertexCollection.h" #include "TrigInDetEvent/TrigVertex.h" -#include "TrigFake/ZVertexFromKine.h" +#include "ZVertexFromKine.h" diff --git a/Trigger/TrigFake/TrigFake/ZVertexFromKine.h b/Trigger/TrigFake/src/ZVertexFromKine.h similarity index 100% rename from Trigger/TrigFake/TrigFake/ZVertexFromKine.h rename to Trigger/TrigFake/src/ZVertexFromKine.h diff --git a/Trigger/TrigFake/src/components/TrigFake_entries.cxx b/Trigger/TrigFake/src/components/TrigFake_entries.cxx index 45baa2d1d037e7d5dad84849fa9ecd0338a6c10b..78d495b978e998191ded7e3a0ef949e21539dc19 100644 --- a/Trigger/TrigFake/src/components/TrigFake_entries.cxx +++ b/Trigger/TrigFake/src/components/TrigFake_entries.cxx @@ -1,8 +1,8 @@ -#include "TrigFake/FakeLvl1RoIatFixedEtaPhi.h" -#include "TrigFake/FakeLvl1MultipleRoIsatFixedEtaPhi.h" +#include "../FakeLvl1RoIatFixedEtaPhi.h" +#include "../FakeLvl1MultipleRoIsatFixedEtaPhi.h" //#include "TrigFake/FakeLvl1ConversionTestBeam.h" -#include "TrigFake/FakeLvl1RoIfromKine.h" -#include "TrigFake/ZVertexFromKine.h" +#include "../FakeLvl1RoIfromKine.h" +#include "../ZVertexFromKine.h" DECLARE_COMPONENT( FakeLvl1RoIfromKine ) diff --git a/Trigger/TrigHypothesis/TrigAFPHypo/CMakeLists.txt b/Trigger/TrigHypothesis/TrigAFPHypo/CMakeLists.txt index 89fd71dba4a2bcbe8dfb5686d3ad5394911ed855..5bdbcbf3b81a7a2365c9191e4aab198364b217e7 100644 --- a/Trigger/TrigHypothesis/TrigAFPHypo/CMakeLists.txt +++ b/Trigger/TrigHypothesis/TrigAFPHypo/CMakeLists.txt @@ -1,35 +1,13 @@ -################################################################################ -# Package: TrigAFPHypo -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( TrigAFPHypo ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - GaudiKernel - Trigger/TrigEvent/TrigParticle - Trigger/TrigEvent/TrigSteeringEvent - Trigger/TrigSteer/TrigInterfaces - PRIVATE - Event/xAOD/xAODJet - Event/xAOD/xAODTrigger - Event/xAOD/xAODForward - Tools/PathResolver - Trigger/TrigEvent/TrigMissingEtEvent ) - -# External dependencies: -find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) - # Component(s) in the package: atlas_add_component( TrigAFPHypo - src/*.cxx - src/components/*.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} GaudiKernel TrigParticle TrigSteeringEvent TrigInterfacesLib xAODJet xAODTrigger TrigMissingEtEvent xAODForward PathResolver) + src/*.cxx src/components/*.cxx + LINK_LIBRARIES GaudiKernel TrigParticle TrigSteeringEvent TrigInterfacesLib xAODJet xAODTrigger TrigMissingEtEvent xAODForward PathResolver) # Install files from the package: -atlas_install_joboptions( share/HypoJobOptions.py ) -atlas_install_python_modules( python/*.py ) +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) atlas_install_runtime( optics/*.txt ) - diff --git a/Trigger/TrigHypothesis/TrigAFPHypo/python/TrigAFPJetAllTEConfig.py b/Trigger/TrigHypothesis/TrigAFPHypo/python/TrigAFPJetAllTEConfig.py index 8090926e71851a356668258e574d5401ebf13f23..0d5a2e003ec4a4509fb58d3cc54cbcd0b8df15ed 100644 --- a/Trigger/TrigHypothesis/TrigAFPHypo/python/TrigAFPJetAllTEConfig.py +++ b/Trigger/TrigHypothesis/TrigAFPHypo/python/TrigAFPJetAllTEConfig.py @@ -1,15 +1,12 @@ -#from TrigAFPHypo.TrigAFPHypoConf import TrigAFPJetAllTE +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration import TrigAFPHypoConf from TrigAFPHypo.TrigAFPJetAllTEMonitoring import ( TrigAFPJetAllTEValidationMonitoring, TrigAFPJetAllTEOnlineMonitoring) -from AthenaCommon.SystemOfUnits import GeV - class TrigAFPJetAllTE(TrigAFPHypoConf.TrigAFPJetAllTE): __slots__ = [] - def __init__(self, - name = "TrigAFPJetAllTE"): + def __init__(self, name = "TrigAFPJetAllTE"): super( TrigAFPJetAllTE, self ).__init__( name ) diff --git a/Trigger/TrigHypothesis/TrigAFPHypo/python/TrigAFPJetAllTEMonitoring.py b/Trigger/TrigHypothesis/TrigAFPHypo/python/TrigAFPJetAllTEMonitoring.py index 165625debc13a4b1de8b69ce62bde937235ec63d..4cbd17972ba83e3e782e8104d4e55d7737d3c9d1 100644 --- a/Trigger/TrigHypothesis/TrigAFPHypo/python/TrigAFPJetAllTEMonitoring.py +++ b/Trigger/TrigHypothesis/TrigAFPHypo/python/TrigAFPJetAllTEMonitoring.py @@ -1,3 +1,4 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from TrigMonitorBase.TrigGenericMonitoringToolConfig import defineHistogram, TrigGenericMonitoringToolConfig class TrigAFPJetAllTEValidationMonitoring(TrigGenericMonitoringToolConfig): diff --git a/Trigger/TrigHypothesis/TrigAFPHypo/share/HypoJobOptions.py b/Trigger/TrigHypothesis/TrigAFPHypo/share/HypoJobOptions.py deleted file mode 100644 index 06acd2227dfa3dc08315721048311a805562df06..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigAFPHypo/share/HypoJobOptions.py +++ /dev/null @@ -1,19 +0,0 @@ -#-- ------------------------------------------------------------ -# Private Application Configuration options -#-- ------------------------------------------------------------ -# Full job is a list of algorithms -from AthenaCommon.AlgSequence import AlgSequence - job = AlgSequence() -# Add top algorithms to be run - from TrigAFPHypo.TrigAFPHypoConf import TrigAFPJetAllTE - job += TrigAFPHypo("TrigAFPHypo") -#-- ------------------------------------------------------------ -# Set output level threshold (DEBUG, INFO, WARNING, ERROR, FATAL) -#-- ------------------------------------------------------------ - job.TrigAFPHypo.OutputLevel = INFO -#-- ------------------------------------------------------------ -# Event related parameters -#-- ------------------------------------------------------------ -# Number of events to be processed (default is 10) -#theApp .EvtMax = 1 -#== ============================================================ diff --git a/Trigger/TrigHypothesis/TrigHIHypo/CMakeLists.txt b/Trigger/TrigHypothesis/TrigHIHypo/CMakeLists.txt index e6ba875b48e5f72419353d7ead0abd4739e98fe8..8fe5905d50eb5b74376eae8c9c71ec8142cc5059 100644 --- a/Trigger/TrigHypothesis/TrigHIHypo/CMakeLists.txt +++ b/Trigger/TrigHypothesis/TrigHIHypo/CMakeLists.txt @@ -1,43 +1,12 @@ -################################################################################ -# Package: TrigHIHypo -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( TrigHIHypo ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Trigger/TrigEvent/TrigCaloEvent - Trigger/TrigEvent/TrigInDetEvent - Trigger/TrigEvent/TrigSteeringEvent - PRIVATE - Calorimeter/CaloEvent - Calorimeter/CaloInterface - Control/AthenaBaseComps - Control/AthenaKernel - Event/xAOD/xAODHIEvent - Event/xAOD/xAODMuon - Event/xAOD/xAODTracking - GaudiKernel - Reconstruction/HeavyIonRec/HIGlobal - Reconstruction/Particle - Tracking/TrkEvent/TrkParameters - Trigger/TrigEvent/TrigMissingEtEvent - Trigger/TrigEvent/TrigMuonEvent - Trigger/TrigEvent/TrigParticle - Trigger/TrigSteer/TrigInterfaces - Trigger/TrigT1/TrigT1Interfaces ) - -# External dependencies: -find_package( CLHEP ) - # Component(s) in the package: atlas_add_component( TrigHIHypo - src/*.cxx - src/components/*.cxx - INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} TrigCaloEvent TrigInDetEvent TrigSteeringEvent CaloEvent AthenaBaseComps xAODHIEvent xAODMuon xAODTracking GaudiKernel Particle TrkParameters TrigMissingEtEvent TrigMuonEvent TrigParticle TrigInterfacesLib TrigT1Interfaces ) + src/*.cxx src/components/*.cxx + LINK_LIBRARIES AthenaBaseComps AthenaKernel CaloEvent CaloInterfaceLib GaudiKernel HIGlobalLib Particle StoreGateLib TrigCaloEvent TrigInDetEvent TrigInterfacesLib TrigMissingEtEvent TrigSteeringEvent TrigT1Interfaces TrigTimeAlgsLib TrkParameters xAODHIEvent xAODMuon xAODTracking ) # Install files from the package: -atlas_install_python_modules( python/*.py ) - +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) diff --git a/Trigger/TrigHypothesis/TrigHIHypo/python/UE.py b/Trigger/TrigHypothesis/TrigHIHypo/python/UE.py index 379bc212115712c0cad0653cb5cc6812395a9e83..bc46bb1c9d4bd8f88f95a46afd82e9bd5de11e8d 100644 --- a/Trigger/TrigHypothesis/TrigHIHypo/python/UE.py +++ b/Trigger/TrigHypothesis/TrigHIHypo/python/UE.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from AthenaCommon.AppMgr import ToolSvc @@ -45,7 +45,7 @@ class ElectronUEMonitoringTool(TrigGenericMonitoringToolConfig): from TrigHIHypo.TrigHIHypoConf import ElectronUEMonitoring -theElectronUEMonitoring = ElectronUEMonitoring("EgammaUEMonitoring"); +theElectronUEMonitoring = ElectronUEMonitoring("EgammaUEMonitoring") theElectronUEMonitoring.AthenaMonTools = [ElectronUEMonitoringTool()] diff --git a/Trigger/TrigHypothesis/TrigHIHypo/src/TrigHIEFTrackHypo.cxx b/Trigger/TrigHypothesis/TrigHIHypo/src/TrigHIEFTrackHypo.cxx index 1e9a66c0a39216509b6bb935f53e53fb6fe2229d..18a3430a735d6fdb44f9b97efde2d12d7ee6a1dd 100755 --- a/Trigger/TrigHypothesis/TrigHIHypo/src/TrigHIEFTrackHypo.cxx +++ b/Trigger/TrigHypothesis/TrigHIHypo/src/TrigHIEFTrackHypo.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // ******************************************************************** @@ -24,7 +24,6 @@ #include "TrigHIEFTrackHypo.h" // #include "Particle/TrackParticleContainer.h" -#include "CLHEP/Units/SystemOfUnits.h" #include "GaudiKernel/ITHistSvc.h" class ISvcLocator; diff --git a/Trigger/TrigMonitoring/TrigJetMonitoring/python/TrigJetMonitorAlgorithm.py b/Trigger/TrigMonitoring/TrigJetMonitoring/python/TrigJetMonitorAlgorithm.py index 03b0c440600c75f3c5d70e5bee4e0327104a3932..d5abafd7da39a67824a1b1584093318eefffc5eb 100644 --- a/Trigger/TrigMonitoring/TrigJetMonitoring/python/TrigJetMonitorAlgorithm.py +++ b/Trigger/TrigMonitoring/TrigJetMonitoring/python/TrigJetMonitorAlgorithm.py @@ -287,6 +287,7 @@ def jetChainMonitoringConfig(inputFlags,jetcoll,chain,athenaMT): "m", "eta", "et", + "phi", # we pass directly the ToolSpec ToolSpec('JetHistoTriggEfficiency', chain, # below we pass the Properties of this JetHistoTriggEfficiency tool : diff --git a/Trigger/TrigSteer/DecisionHandling/CMakeLists.txt b/Trigger/TrigSteer/DecisionHandling/CMakeLists.txt index ec17358fc47fa5084b1804285ec9ecad2f4d0bc8..d746ccc55ce4bbbe92cc756065064fcae0c67904 100644 --- a/Trigger/TrigSteer/DecisionHandling/CMakeLists.txt +++ b/Trigger/TrigSteer/DecisionHandling/CMakeLists.txt @@ -1,46 +1,17 @@ -################################################################################ -# Package: DecisionHandling -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( DecisionHandling ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Event/xAOD/xAODTrigger - GaudiKernel - Control/AthContainers - Control/AthLinks - Trigger/TrigSteer/TrigCompositeUtils - PRIVATE - Control/AthViews - Control/StoreGate - Control/AthenaBaseComps - Control/CxxUtils - Event/xAOD/xAODEgamma - Event/xAOD/xAODMuon - Event/xAOD/xAODBase - AtlasTest/TestTools - Control/StoreGate - Trigger/TrigEvent/TrigSteeringEvent - Trigger/TrigTools/TrigTimeAlgs - Trigger/TrigMonitoring/TrigCostMonitorMT - Trigger/TrigSteer/TrigCompositeUtils - Control/AthenaMonitoringKernel ) - atlas_add_library( DecisionHandlingLib src/*.cxx PUBLIC_HEADERS DecisionHandling - LINK_LIBRARIES xAODTrigger GaudiKernel TrigSteeringEvent TrigCompositeUtilsLib - PRIVATE_LINK_LIBRARIES AthenaBaseComps CxxUtils TrigTimeAlgsLib AthenaMonitoringKernelLib TrigCostMonitorMTLib AthViews ) + LINK_LIBRARIES AthenaBaseComps AthenaMonitoringKernelLib GaudiKernel StoreGateLib TrigCompositeUtilsLib TrigCostMonitorMTLib TrigSteeringEvent TrigTimeAlgsLib + PRIVATE_LINK_LIBRARIES AthContainers AthViews xAODTrigger ) # Component(s) in the package: atlas_add_component( DecisionHandling src/components/*.cxx - LINK_LIBRARIES DecisionHandlingLib TrigCompositeUtilsLib TrigTimeAlgsLib AthenaMonitoringKernelLib TrigCostMonitorMTLib ) - -atlas_install_python_modules( python/*.py ) + LINK_LIBRARIES DecisionHandlingLib ) -atlas_add_test( flake8 - SCRIPT flake8 --select=ATL,F,E7,E9,W6 ${CMAKE_CURRENT_SOURCE_DIR}/python/*.py - POST_EXEC_SCRIPT nopost.sh ) +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) diff --git a/Trigger/TrigSteer/DecisionHandling/python/TrigCompositeUtils.py b/Trigger/TrigSteer/DecisionHandling/python/TrigCompositeUtils.py index c0890e8494831329b2cee28d0106562717e93828..1a0509db3a3dcb70823a59d4ebfe751a2a7502bb 100644 --- a/Trigger/TrigSteer/DecisionHandling/python/TrigCompositeUtils.py +++ b/Trigger/TrigSteer/DecisionHandling/python/TrigCompositeUtils.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Note: These definitions shadow those in TrigComposite_v1.cxx @@ -13,9 +13,7 @@ def legName(chainName, legCounter): return ("leg{:03d}_{}".format(legCounter, chainName)) def chainNameFromLegName(legName): - if (isLegId(legName)): - return legName[7:] - return legName + return legName[7:] if isLegId(legName) else legName def isLegId(chainName): return chainName.startswith("leg") diff --git a/Trigger/TrigSteer/L1Decoder/CMakeLists.txt b/Trigger/TrigSteer/L1Decoder/CMakeLists.txt index 80d59650ec72475baf1f491c1e8063d94e1428f4..0442f30f7cb7d8d3263f7fe75ad0e0ba1c411b8a 100644 --- a/Trigger/TrigSteer/L1Decoder/CMakeLists.txt +++ b/Trigger/TrigSteer/L1Decoder/CMakeLists.txt @@ -1,67 +1,32 @@ -################################################################################ -# Package: L1Decoder -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( L1Decoder ) - -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - AtlasPolicy - GaudiKernel - PRIVATE - Control/AthViews - Control/AthenaBaseComps - Control/AthenaMonitoringKernel - Event/xAOD/xAODTrigger - Trigger/TrigConfiguration/TrigConfHLTData - Trigger/TrigConfiguration/TrigConfData - Trigger/TrigConfiguration/TrigConfInterfaces - Trigger/TrigConfiguration/TrigConfL1Data - Trigger/TrigEvent/TrigSteeringEvent - Trigger/TrigT1/TrigT1Interfaces - Trigger/TrigT1/TrigT1Result - Trigger/TrigSteer/DecisionHandling - Trigger/TrigSteer/TrigCompositeUtils - Trigger/TrigTools/TrigTimeAlgs - Trigger/TrigMonitoring/TrigCostMonitorMT ) - +# External dependencies: +find_package( Boost ) find_package( CLHEP ) -find_package( nlohmann_json ) - # Component(s) in the package: atlas_add_library( L1DecoderLib - src/*.cxx - INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} PUBLIC_HEADERS L1Decoder - LINK_LIBRARIES GaudiKernel AthViews AthenaBaseComps AthenaMonitoringKernelLib - xAODTrigger TrigConfHLTData TrigConfData TrigConfL1Data - TrigSteeringEvent TrigT1Interfaces TrigT1Result DecisionHandlingLib TrigCompositeUtilsLib - LINK_LIBRARIES ${CLHEP_LIBRARIES} - PRIVATE_LINK_LIBRARIES TrigConfInterfaces TrigTimeAlgsLib TrigCostMonitorMTLib - ) + INTERFACE ) atlas_add_component( L1Decoder - src/components/*.cxx - INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES L1DecoderLib TrigTimeAlgsLib TrigConfInterfaces TrigCostMonitorMTLib ${CLHEP_LIBRARIES} - ) + src/*.cxx src/components/*.cxx + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} + LINK_LIBRARIES ${CLHEP_LIBRARIES} AthViews AthenaBaseComps AthenaKernel AthenaMonitoringKernelLib GaudiKernel L1DecoderLib StoreGateLib TrigCompositeUtilsLib TrigConfData TrigConfHLTData TrigConfInterfaces TrigConfL1Data TrigCostMonitorMTLib TrigSteeringEvent TrigT1Interfaces TrigT1Result TrigTimeAlgsLib xAODEventInfo xAODTrigger ) -atlas_install_python_modules( python/*.py - POST_BUILD_CMD ${ATLAS_FLAKE8} ) +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) # Install files from the package: -atlas_install_headers( L1Decoder ) atlas_install_joboptions( share/*.py ) atlas_install_scripts( test/test* ) +# Tests: atlas_add_test( L1DecoderNJOTest SCRIPT python -m L1Decoder.L1DecoderConfig PROPERTIES TIMEOUT 300 ) atlas_add_test( L1DecoderTest SCRIPT test/test_l1decoder.sh - PROPERTIES TIMEOUT 1000 - ) - + PROPERTIES TIMEOUT 1000 ) diff --git a/Trigger/TrigSteer/TrigCompositeUtils/CMakeLists.txt b/Trigger/TrigSteer/TrigCompositeUtils/CMakeLists.txt index 16c74887fa5fc0e5a6cc182d13ceee955dc9eca0..ed8686b870b07665134fe678537c69fa647b1fe8 100644 --- a/Trigger/TrigSteer/TrigCompositeUtils/CMakeLists.txt +++ b/Trigger/TrigSteer/TrigCompositeUtils/CMakeLists.txt @@ -3,11 +3,6 @@ # Declare the package name. atlas_subdir( TrigCompositeUtils ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Trigger/TrigEvent/TrigDecisionInterface - ) - # Set up the (non-)standalone compilation. set( extra_srcs ) set( extra_libs ) @@ -24,7 +19,7 @@ atlas_add_library( TrigCompositeUtilsLib LINK_LIBRARIES TrigConfHLTUtilsLib CxxUtils AsgMessagingLib TrigDecisionInterface ${extra_libs} ) # Install files from the package. -atlas_install_python_modules( python/*.py ) +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) # Unit test(s). if( NOT XAOD_STANDALONE ) @@ -42,9 +37,3 @@ endif() atlas_add_test( Combinators_test SOURCES test/Combinators_test.cxx LINK_LIBRARIES TestTools TrigCompositeUtilsLib ) - -if( NOT XAOD_STANDALONE ) - atlas_add_test( flake8 - SCRIPT flake8 --select=ATL,F,E7,E9,W6 ${CMAKE_CURRENT_SOURCE_DIR}/python/*.py - POST_EXEC_SCRIPT nopost.sh ) -endif() diff --git a/Trigger/TrigSteer/TrigHLTResultByteStream/CMakeLists.txt b/Trigger/TrigSteer/TrigHLTResultByteStream/CMakeLists.txt index 9a10dd6ca07972859b89fdf5e304b64581dbcc3e..fefa10f57183044032e6cafd1ee0b52a90b5de8c 100644 --- a/Trigger/TrigSteer/TrigHLTResultByteStream/CMakeLists.txt +++ b/Trigger/TrigSteer/TrigHLTResultByteStream/CMakeLists.txt @@ -1,20 +1,8 @@ -################################################################################ -# Package: TrigHLTResultByteStream -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( TrigHLTResultByteStream ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Control/AthenaBaseComps - Control/AthenaKernel - Control/StoreGate - Event/ByteStreamCnvSvcBase - Event/ByteStreamData - GaudiKernel - Trigger/TrigEvent/TrigSteeringEvent ) - # External dependencies: find_package( tdaq-common COMPONENTS eformat_write ) @@ -23,10 +11,9 @@ atlas_add_library( TrigHLTResultByteStreamLib src/*.cxx PUBLIC_HEADERS TrigHLTResultByteStream INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS} - LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} AthenaBaseComps AthenaKernel ByteStreamData GaudiKernel TrigSteeringEvent StoreGateLib SGtests ByteStreamCnvSvcBaseLib ByteStreamData_test ) + LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} AthenaBaseComps ByteStreamCnvSvcBaseLib ByteStreamData GaudiKernel TrigSteeringEvent + PRIVATE_LINK_LIBRARIES AthenaKernel StoreGateLib ) atlas_add_component( TrigHLTResultByteStream src/components/*.cxx - INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS} - LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests ByteStreamCnvSvcBaseLib ByteStreamData ByteStreamData_test GaudiKernel TrigSteeringEvent TrigHLTResultByteStreamLib ) - + LINK_LIBRARIES TrigHLTResultByteStreamLib ) diff --git a/Trigger/TrigSteer/ViewAlgs/CMakeLists.txt b/Trigger/TrigSteer/ViewAlgs/CMakeLists.txt index f7d4b1273235167de6b71ea54f13b1fbe736aa12..811d9b89b0be46c42079ae5c078c6a06cace026c 100644 --- a/Trigger/TrigSteer/ViewAlgs/CMakeLists.txt +++ b/Trigger/TrigSteer/ViewAlgs/CMakeLists.txt @@ -1,39 +1,14 @@ -################################################################################ -# Package: ViewAlgs -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( ViewAlgs ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Event/xAOD/xAODTrigger - Event/xAOD/xAODTracking - GaudiKernel - Control/AthContainers - Control/AthLinks - Event/xAOD/xAODTrigCalo - Event/xAOD/xAODTrigEgamma - Event/xAOD/xAODJet - Event/xAOD/xAODMuon - PRIVATE - Control/AthViews - Control/StoreGate - Control/AthenaBaseComps - Control/CxxUtils - Reconstruction/MuonIdentification/MuonCombinedEvent - Trigger/TrigConfiguration/TrigConfHLTData - Trigger/TrigEvent/TrigSteeringEvent - Trigger/TrigSteer/DecisionHandling - Trigger/TrigSteer/TrigCompositeUtils ) - # Component(s) in the package: atlas_add_library( ViewAlgsLib - src/*.cxx PUBLIC_HEADERS ViewAlgs - LINK_LIBRARIES xAODTrigger xAODTracking GaudiKernel AthViews xAODTrigCalo xAODTrigEgamma xAODJet xAODMuon - PRIVATE_LINK_LIBRARIES AthenaBaseComps CxxUtils MuonCombinedEvent TrigConfHLTData TrigSteeringEvent DecisionHandlingLib TrigCompositeUtilsLib ) + INTERFACE + LINK_LIBRARIES AthContainers AthLinks GaudiKernel TrigCompositeUtilsLib xAODTrigger ) atlas_add_component( ViewAlgs - src/components/*.cxx - LINK_LIBRARIES xAODTrigger GaudiKernel AthViews AthenaBaseComps CxxUtils TrigConfHLTData TrigSteeringEvent ViewAlgsLib DecisionHandlingLib TrigCompositeUtilsLib ) + src/*.cxx src/components/*.cxx + LINK_LIBRARIES AthViews AthenaBaseComps CxxUtils DecisionHandlingLib MuonCombinedEvent StoreGateLib TrigSteeringEvent ViewAlgsLib xAODJet xAODMuon xAODTracking xAODTrigCalo ) diff --git a/Trigger/TrigSteer/ViewAlgs/share/menuRun.py b/Trigger/TrigSteer/ViewAlgs/share/menuRun.py deleted file mode 100755 index 96e7e482fbcd289d2fb4c1d6e4f168747d3fbd92..0000000000000000000000000000000000000000 --- a/Trigger/TrigSteer/ViewAlgs/share/menuRun.py +++ /dev/null @@ -1,161 +0,0 @@ -# -# get_files -xmls LVL1config_Physics_pp_v5.xml - -# also needed are "data" files: menuData.dat and testData.dat located in L1Bdecoder/share -# -# - -## @file L1Topo_ReadBS_test.py -## @brief Example job options file to read BS file to test a converter -## $Id: $ -############################################################### -# -# This Job option: -# ---------------- -# 1. Read ByteStream test data file and decode the L1Topo part -# -#============================================================== - -## basic job configuration -import AthenaCommon.AtlasUnixStandardJob - - - -## get a handle on the ServiceManager -from AthenaCommon.AppMgr import ServiceMgr as svcMgr - -## get a handle on the default top-level algorithm sequence -from AthenaCommon.AlgSequence import AlgSequence -topSequence = AlgSequence() - - - - -from TrigConfigSvc.TrigConfigSvcConf import TrigConf__LVL1ConfigSvc -l1svc = TrigConf__LVL1ConfigSvc("LVL1ConfigSvc") -l1svc.XMLMenuFile = "LVL1config_Physics_pp_v5.xml" -svcMgr += l1svc - - - - -#-------------------------------------------------------------- -# Private Application Configuration options -#-------------------------------------------------------------- -# Load "user algorithm" top algorithms to be run, and the libraries that house them - -def setOutput(obj, prop, name): - setattr(obj, prop, name) - setattr(obj, prop+"Aux", name+"Aux.") - -def getOutput(obj, prop): - print "getOutput" - try: - print "getOutput getattr" - return getattr(obj, prop) - except: - print "getOutput getDefaultProperty ", obj.getDefaultProperty(prop) - return obj.getDefaultProperty(prop) - print "Can not read pro" - raise "Error in reading property " + prop + " from " + obj - -#Run Fake RoI -from L1Decoder.L1DecoderConf import FakeRoI -fakeRoI = FakeRoI("fakeRoI") -fakeRoI.InputFilename="testData.dat" -setOutput(fakeRoI, "OutputDecisions", "CaloRoIs") -fakeRoI.OutputLevel=DEBUG -topSequence += fakeRoI - -from L1Decoder.L1DecoderConf import FakeCTP -fakeCTP = FakeCTP() -fakeCTP.OutputLevel=VERBOSE -fakeCTP.InputFilename="menuData.dat" -fakeCTP.OutputLevel=VERBOSE -topSequence += fakeCTP - -from ViewAlgs.ViewAlgsConf import PrescaleDecision -ps = PrescaleDecision("HLTChainsPrescaling") -ps.Prescales=["HLT_e3 20.99", "HLT_e7 2.5"] -ps.InputChainDecisions = getOutput(fakeCTP, "OutputDecisions") -setOutput(ps, "OutputChainDecisions", "ChainsPassingAfterPS") -ps.OutputLevel=DEBUG -topSequence += ps - -from ViewAlgs.ViewAlgsConf import DecisionAlg -dropPrescaled = DecisionAlg("DropPrescaled") -dropPrescaled.HypoDecisions = getOutput(fakeRoI, "OutputDecisions") -dropPrescaled.InputChainDecisions = getOutput(ps,"OutputChainDecisions") -setOutput(dropPrescaled, "OutputDecisions", "RelevantEMRoIs") -setOutput(dropPrescaled, "OutputChainDecisions", "ChainsPassingAfterEM") -dropPrescaled.Required=["HLT_e7 = EM7 x 1", - "HLT_2e7 = EM7 x 2", - "HLT_e3 = EM3 x 1"] -topSequence += dropPrescaled - -from ViewAlgs.ViewAlgsConf import TestFEXAlg -l2CaloReco = TestFEXAlg("L2CaloReco") -l2CaloReco.RoIsContainer = getOutput(dropPrescaled, "OutputDecisions") -setOutput(l2CaloReco, "Output", "L2CaloFex") -l2CaloReco.OutputLevel=DEBUG -topSequence += l2CaloReco - -from ViewAlgs.ViewAlgsConf import TestHypoAlg, TestHypoTool -l2CaloHypo = TestHypoAlg("L1CaloHypo") -l2CaloHypo.OutputLevel=DEBUG -l2CaloHypo.ClusterContainer = getOutput(l2CaloReco,"Output") -setOutput(l2CaloHypo, "Output","L2CaloHypoDecisions") - -# cuts -cut3 = TestHypoTool("3GeVCaloEtCut", EtThreshold=0.3) -cut7 = TestHypoTool("7GeVCaloEtCut", EtThreshold=0.7) -cut10 = TestHypoTool("10GeVCaloEtCut", EtThreshold=0.10) -cut12 = TestHypoTool("12GeVCaloEtCut", EtThreshold=0.12) -l2CaloHypo += cut3 -l2CaloHypo += cut7 -l2CaloHypo += cut10 -l2CaloHypo += cut12 -l2CaloHypo.Hypotheses = [cut3, cut7, cut10, cut12] -topSequence += l2CaloHypo - - -from ViewAlgs.ViewAlgsConf import DecisionAlg -caloStep = DecisionAlg("CaloStep") -caloStep.HypoDecisions = l2CaloHypo.Output -caloStep.InputChainDecisions = getOutput(dropPrescaled, "OutputChainDecisions") -setOutput(caloStep, "OutputDecisions", "RelevantEMCaloRoIs") - -setOutput(caloStep, "OutputChainDecisions", "ChainsPassingEMCaloStep") -caloStep.Required=["HLT_e7 = 7GeVCaloEtCut x 1", - "HLT_2e7 = 7GeVCaloEtCut x 2", - "HLT_e3 = 3GeVCaloEtCut x 1"] -caloStep.OutputLevel=VERBOSE -topSequence += caloStep - -#Dumper -from ViewAlgs.ViewAlgsConf import DumpDecisions -dumper = DumpDecisions("CaloRoIsDumper") -dumper.OutputLevel=VERBOSE -dumper.OutputDecisions=getOutput(l2CaloHypo, "Output") -topSequence += dumper - - -#-------------------------------------------------------------- -# Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL) -#-------------------------------------------------------------- -svcMgr.MessageSvc.OutputLevel = INFO -svcMgr.MessageSvc.Format = "% F%42W%S%7W%R%T %0W%M" -svcMgr.MessageSvc.verboseLimit = 0 -svcMgr.StoreGateSvc.OutputLevel = INFO -svcMgr.StoreGateSvc.Dump=True -print svcMgr -MessageSvc.debugLimit=1000000 - -theApp.EvtMax = 10 - - -print "topSequence dump:", topSequence -# -# End of job options file -# -############################################################### diff --git a/Trigger/TrigSteer/ViewAlgs/src/ViewCreatorFetchFromViewROITool.cxx b/Trigger/TrigSteer/ViewAlgs/src/ViewCreatorFetchFromViewROITool.cxx index cc9db3be85990afc395425a455a7d07eebf4be28..aa7d2560da7cbaa34a4e86d6dda1ca4d660696fd 100644 --- a/Trigger/TrigSteer/ViewAlgs/src/ViewCreatorFetchFromViewROITool.cxx +++ b/Trigger/TrigSteer/ViewAlgs/src/ViewCreatorFetchFromViewROITool.cxx @@ -26,20 +26,42 @@ StatusCode ViewCreatorFetchFromViewROITool::attachROILinks(TrigCompositeUtils::D SG::WriteHandle<TrigRoiDescriptorCollection> roisWriteHandle = createAndStoreNoAux(m_roisWriteHandleKey, ctx); for ( Decision* outputDecision : decisions ) { - const std::vector<LinkInfo<ViewContainer>> myView = findLinks<ViewContainer>(outputDecision, viewString(), TrigDefs::lastFeatureOfType); - - if (myView.size() != 1) { - ATH_MSG_ERROR("Did not find exactly one most-recent '" << viewString() << "' for Decision object index " << outputDecision->index() - << ", found " << myView.size()); - if (myView.size() > 1) { - ATH_MSG_ERROR("Was this Decision Object was merged after having followed different reconstruction paths in previous Steps?"); - ATH_MSG_ERROR("Need more information about which of these Views to look in to find the desired '" << m_inViewRoIKey.key() << "' TrigRoiDescriptorCollection"); + LinkInfo<ViewContainer> viewToFetchFrom; + if(!m_viewToFetchFrom.empty()){ + // Look for a specific View, keyed by the View's SG key + const std::vector<LinkInfo<ViewContainer>> myViews = findLinks<ViewContainer>(outputDecision, viewString(), TrigDefs::allFeaturesOfType); + bool found = false; + for(LinkInfo<ViewContainer> v : myViews){ + if(v.link.dataID() == m_viewToFetchFrom){ + found = true; + viewToFetchFrom = v; + break; + } } - return StatusCode::FAILURE; + if(!found){ + ATH_MSG_ERROR("Of the " << myViews.size() << " Views in the history of Decision object with index " << outputDecision->index() + << ", none came from a View called " << m_viewToFetchFrom); + return StatusCode::FAILURE; + } + } + else{ + + // Assume the most recent View is the one we fetch from, and that there is exactly one most recent View after any merging + const std::vector<LinkInfo<ViewContainer>> myView = findLinks<ViewContainer>(outputDecision, viewString(), TrigDefs::lastFeatureOfType); + if (myView.size() != 1) { + ATH_MSG_ERROR("Did not find exactly one most-recent '" << viewString() << "' for Decision object index " << outputDecision->index() + << ", found " << myView.size()); + if (myView.size() > 1) { + ATH_MSG_ERROR("Was this Decision Object was merged after having followed different reconstruction paths in previous Steps?"); + ATH_MSG_ERROR("Need more information about which of these Views to look in to find the desired '" << m_inViewRoIKey.key() << "' TrigRoiDescriptorCollection"); + } + return StatusCode::FAILURE; + } + viewToFetchFrom = myView.at(0); } - ATH_CHECK(myView.at(0).isValid()); + ATH_CHECK(viewToFetchFrom.isValid()); - SG::ReadHandle<TrigRoiDescriptorCollection> roiReadHandle = ViewHelper::makeHandle(*myView.at(0).link, m_inViewRoIKey, ctx); + SG::ReadHandle<TrigRoiDescriptorCollection> roiReadHandle = ViewHelper::makeHandle(*viewToFetchFrom.link, m_inViewRoIKey, ctx); ATH_CHECK(roiReadHandle.isValid()); if (roiReadHandle->size() != 1) { diff --git a/Trigger/TrigSteer/ViewAlgs/src/ViewCreatorFetchFromViewROITool.h b/Trigger/TrigSteer/ViewAlgs/src/ViewCreatorFetchFromViewROITool.h index 022601648a900d59f0c3fd98558fe482ea538958..cf62f0d8aeca80ad5fdfa665a812c9755bb039e0 100644 --- a/Trigger/TrigSteer/ViewAlgs/src/ViewCreatorFetchFromViewROITool.h +++ b/Trigger/TrigSteer/ViewAlgs/src/ViewCreatorFetchFromViewROITool.h @@ -42,6 +42,9 @@ public: SG::ReadHandleKey<TrigRoiDescriptorCollection> m_inViewRoIKey{this,"InViewRoIs","", "Name of the ROI collection within the most recent EventView of the input Decision objects"}; + Gaudi::Property< std::string > m_viewToFetchFrom {this,"ViewToFetchFrom","", + "Optional name of EventView to fetch ROI from. Must be in the history of the DecisionObject. If not supplied, the most recent EventView will be used."}; + }; #endif //> !VIEWALGS_VIEWCREATORFETCHFROMVIEWROITOOL_H diff --git a/Trigger/TrigT1/TrigT1CaloCalibTools/src/L1CaloPprEtCorrelationPlotManager.cxx b/Trigger/TrigT1/TrigT1CaloCalibTools/src/L1CaloPprEtCorrelationPlotManager.cxx index 5e7fafd37237bf2ad68cdcdb6e3fb1198125b868..1c3db5484df2df50e9ea4a16e61122dd9c512e83 100644 --- a/Trigger/TrigT1/TrigT1CaloCalibTools/src/L1CaloPprEtCorrelationPlotManager.cxx +++ b/Trigger/TrigT1/TrigT1CaloCalibTools/src/L1CaloPprEtCorrelationPlotManager.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "TrigT1CaloCalibTools/L1CaloPprEtCorrelationPlotManager.h" @@ -101,7 +101,6 @@ StatusCode L1CaloPprEtCorrelationPlotManager::getCaloCells() double L1CaloPprEtCorrelationPlotManager::getMonitoringValue(const xAOD::TriggerTower* trigTower, CalLayerEnum /*theLayer*/) { - Identifier id; std::vector<float> CaloEnergyLayers; std::vector<float> CaloETLayers; float caloEnergy = 0.; diff --git a/Trigger/TrigT1/TrigT1Monitoring/src/L1CaloL1TopoMon.cxx b/Trigger/TrigT1/TrigT1Monitoring/src/L1CaloL1TopoMon.cxx index 8f0e33e0f6f085bb5852084e026b15d7f074a06a..b22d1b883e05c8e92c54961e80de7a256eb20439 100755 --- a/Trigger/TrigT1/TrigT1Monitoring/src/L1CaloL1TopoMon.cxx +++ b/Trigger/TrigT1/TrigT1Monitoring/src/L1CaloL1TopoMon.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include <map> @@ -431,7 +431,7 @@ StatusCode L1CaloL1TopoMon::fillHistograms() topo_error|=(1<<CALO_CONV); } - const DataHandle<CTP_RDO> ctpRDO = 0; + const CTP_RDO* ctpRDO = 0; sc = evtStore()->retrieve(ctpRDO,"CTP_RDO"); if (sc.isFailure()) { ATH_MSG_WARNING("Could not find CTP_RDO in StoreGate"); @@ -467,7 +467,7 @@ StatusCode L1CaloL1TopoMon::fillHistograms() } // Retrieve CMX CP tobs - const DataHandle<xAOD::CMXCPTobContainer> cmxcptob = 0; + const xAOD::CMXCPTobContainer* cmxcptob = 0; sc = evtStore()->retrieve(cmxcptob); if (sc.isFailure() || !cmxcptob) { ATH_MSG_DEBUG ("No CMX CP tobs found in TES"); @@ -494,7 +494,7 @@ StatusCode L1CaloL1TopoMon::fillHistograms() std::vector<const xAOD::CMXJetTob*> cmxtobs; // Retrieve CMX jet tobs - const DataHandle<xAOD::CMXJetTobContainer> cmxtob = 0; + const xAOD::CMXJetTobContainer* cmxtob = 0; sc = evtStore()->retrieve(cmxtob); if (sc.isFailure() || !cmxtob) { ATH_MSG_DEBUG ("No CMX tobs found in TES"); @@ -525,7 +525,7 @@ StatusCode L1CaloL1TopoMon::fillHistograms() << m_topoCTPLoc.value()); } else { - const DataHandle< LVL1::FrontPanelCTP > topoCTP; + const LVL1::FrontPanelCTP* topoCTP = nullptr; CHECK_RECOVERABLE(evtStore()->retrieve(topoCTP,m_topoCTPLoc.value())); if (!topoCTP){ ATH_MSG_INFO( "Retrieve of LVL1::FrontPanelCTP failed." ); @@ -566,7 +566,7 @@ StatusCode L1CaloL1TopoMon::fillHistograms() // Retrieve the L1Topo RDOs from the DAQ RODs const int NFPGA=4; - const DataHandle<L1TopoRDOCollection> rdos = 0; + const L1TopoRDOCollection* rdos = 0; sc = evtStore()->retrieve(rdos); if (sc.isFailure() or 0 == rdos) { m_h_l1topo_1d_Errors->Fill(NO_DAQ); diff --git a/Trigger/TrigValidation/TrigInDetValidation/CMakeLists.txt b/Trigger/TrigValidation/TrigInDetValidation/CMakeLists.txt index 6032f1506bd86b840ea50134eb3c26d2bcc47515..7905b91e9b90b33d783f8d3a4d3517988eae1e19 100644 --- a/Trigger/TrigValidation/TrigInDetValidation/CMakeLists.txt +++ b/Trigger/TrigValidation/TrigInDetValidation/CMakeLists.txt @@ -13,4 +13,10 @@ atlas_install_python_modules( python/*.py ) atlas_install_joboptions( share/TrigInDetValidation_RTT_*.py ) atlas_install_runtime( test/TrigInDetValidation_TestConfiguration.xml share/TrigInDetValidation_RTT_*.py TIDAbuild ) -atlas_install_scripts( scripts/TIDA*.py ) +atlas_install_scripts( scripts/TIDA*.py test/test*.py POST_BUILD_CMD ${ATLAS_FLAKE8} --extend-ignore=ATL902 ) + +# Unit test for python test scripts: +atlas_add_test( TrigValSteeringUT + SCRIPT trigvalsteering-unit-tester.py ${CMAKE_CURRENT_SOURCE_DIR}/test + PROPERTIES TIMEOUT 300 + POST_EXEC_SCRIPT nopost.sh ) diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_ibl_pu40.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_ibl_pu40.py new file mode 100755 index 0000000000000000000000000000000000000000..8ea0f6fbf893dbc645b15ccdbd8eb75c5360ea59 --- /dev/null +++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_ibl_pu40.py @@ -0,0 +1,65 @@ +#!/usr/bin/env python + +# art-description: art job for mu_Zmumu_IBL_pu40 +# art-type: grid +# art-include: master/Athena +# art-input: mc15_13TeV.361107.PowhegPythia8EvtGen_AZNLOCTEQ6L1_Zmumu.recon.RDO.e3601_s2576_s2132_r7143 +# art-input-nfiles: 4 +# art-athena-mt: 4 +# art-output: *.txt +# art-output: *.log +# art-output: log.* +# art-output: *.out +# art-output: *.err +# art-output: *.log.tar.gz +# art-output: *.new +# art-output: *.json +# art-output: *.root +# art-output: *.check* + +from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps + +chains = [ + 'HLT_mu6_idperf_L1MU6', + 'HLT_mu24_idperf_L1MU20' +] + +preexec_trig = ';'.join([ + 'doEmptyMenu=True', + 'doMuonSlice=True', + 'selectChains='+str(chains) +]) + +preexec_reco = ';'.join([ + 'pass' # TODO: figure out a working set of options to disable parts of reco + # 'from RecExConfig.RecFlags import rec', + # 'rec.doForwardDet=False', + # 'rec.doEgamma=False', + # 'rec.doMuonCombined=False', + # 'rec.doJetMissingETTag=False', + # 'rec.doTau=False' +]) + +preexec_all = ';'.join([ + 'from TriggerJobOpts.TriggerFlags import TriggerFlags', + 'TriggerFlags.AODEDMSet.set_Value_and_Lock(\\\"AODFULL\\\")', +]) + +rdo2aod = ExecStep.ExecStep() +rdo2aod.type = 'Reco_tf' +rdo2aod.input = '' # specified in inputRDOFile below +rdo2aod.max_events = 100 # TODO: 2000 events +rdo2aod.threads = 1 # TODO: change to 4 +rdo2aod.concurrent_events = 1 # TODO: change to 4 +rdo2aod.perfmon = False +rdo2aod.args = '--inputRDOFile=$ArtInFile --outputAODFile=AOD.pool.root --steering="doRDO_TRIG"' +rdo2aod.args += ' --preExec "RDOtoRDOTrigger:{:s};" "all:{:s};" "RAWtoESD:{:s};" "ESDtoAOD:{:s};"'.format( + preexec_trig, preexec_all, preexec_reco, preexec_reco) + +test = Test.Test() +test.art_type = 'grid' +test.exec_steps = [rdo2aod] +test.check_steps = CheckSteps.default_check_steps(test) + +import sys +sys.exit(test.run()) diff --git a/Trigger/TrigValidation/TrigValAlgs/TrigValAlgs/TrigSlimValAlg.h b/Trigger/TrigValidation/TrigValAlgs/TrigValAlgs/TrigSlimValAlg.h index 5bb42c02b8f8d99b0ef84dab172b36ef3c93bda6..32504f99fe77adbe3fb3564f5b93e790bcb61f22 100644 --- a/Trigger/TrigValidation/TrigValAlgs/TrigValAlgs/TrigSlimValAlg.h +++ b/Trigger/TrigValidation/TrigValAlgs/TrigValAlgs/TrigSlimValAlg.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef CLASS_TRIG_SLIM_VALIDATION_H @@ -10,7 +10,6 @@ #include "TrigDecisionTool/TrigDecisionTool.h" #include "TrigNavigation/TriggerElement.h" -#include "TrigNavTools/TrigNavigationSlimmingTool.h" #include "AthenaBaseComps/AthAlgorithm.h" #include <iostream> @@ -250,7 +249,6 @@ class TrigSlimValAlg : public AthAlgorithm { // tools ToolHandle<Trig::TrigDecisionTool> m_trigDecisionTool; //<! TrigDecisionTool - ToolHandle<HLT::TrigNavigationSlimmingTool> m_slimmingTool; //<! Navigation Slimming Tool // internal data std::vector<std::string> m_configuredGroups; //<! cache group->chain map diff --git a/Trigger/TrigValidation/TrigValAlgs/src/TrigSlimValAlg.cxx b/Trigger/TrigValidation/TrigValAlgs/src/TrigSlimValAlg.cxx index b796edf2defc6961a07936c657fb775f15397205..cbe8ad4dedee8b0b7cd142e3fddd7270b6d400c7 100644 --- a/Trigger/TrigValidation/TrigValAlgs/src/TrigSlimValAlg.cxx +++ b/Trigger/TrigValidation/TrigValAlgs/src/TrigSlimValAlg.cxx @@ -1,20 +1,19 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "TrigNavigation/Navigation.h" #include "TrigValAlgs/TrigSlimValAlg.h" +#include "TrigNavTools/getFeatureOccurrences.h" TrigSlimValAlg::TrigSlimValAlg(const std::string& name, ISvcLocator *pSvcLocator) : AthAlgorithm(name, pSvcLocator), m_trigDecisionTool("Trig::TrigDecisionTool/TrigDecisionTool"), - m_slimmingTool("HLT::TrigNavigationSlimmingTool/TrigNavigationSlimmingTool"), m_eventSeen(0) { declareProperty("TrigDecisionTool", m_trigDecisionTool); - declareProperty("SlimmingTool", m_slimmingTool); } @@ -29,15 +28,6 @@ StatusCode TrigSlimValAlg::initialize() { return StatusCode::FAILURE; } - // load the slimming tool - if( !m_slimmingTool.empty() ) { - ATH_CHECK( m_slimmingTool.retrieve() ); - } - else { - ATH_MSG_ERROR ("Could not retrive the TrigNavigationSlimmingTool as it was not specified!" ); - return StatusCode::FAILURE; - } - return StatusCode::SUCCESS; } @@ -73,7 +63,7 @@ StatusCode TrigSlimValAlg::execute() { ATH_MSG_INFO ("REGTEST " << "======== START of TrigSlimValidation DUMP ========" ); // store some needed information from the navigation structure - std::map<std::string, int> *featureOccurrences = m_slimmingTool->getFeatureOccurrences(navigation); + std::map<std::string, int> featureOccurrences = HLT::TrigNavTools::getFeatureOccurrences(navigation); TrigSlimValAlg::elementSet *allTriggerElements = this->getAllTriggerElements(navigation); // Print the aggregate navigation structure information @@ -97,7 +87,7 @@ StatusCode TrigSlimValAlg::execute() { ATH_MSG_INFO ("REGTEST " << "Number of trigger elements: " << recursiveCount( navigation, numberCounter, sumUpdate ) ); ATH_MSG_INFO ("REGTEST " << "Number of distinct features: " - << featureOccurrences->size() ); + << featureOccurrences.size() ); ATH_MSG_INFO ("REGTEST " << "Number of intermediate trigger elements: " << recursiveCount( navigation, intermediateCounter, sumUpdate ) ); ATH_MSG_INFO ("REGTEST " << "Number of featureless trigger elements: " @@ -136,8 +126,8 @@ StatusCode TrigSlimValAlg::execute() { // print the feature information - for(std::map<std::string, int>::const_iterator iter = featureOccurrences->begin(); - iter != featureOccurrences->end(); ++iter) + for(std::map<std::string, int>::const_iterator iter = featureOccurrences.begin(); + iter != featureOccurrences.end(); ++iter) ATH_MSG_INFO ("REGTEST " << "Occurrences of feature " << (*iter).first << ": " << (*iter).second ); @@ -188,7 +178,6 @@ StatusCode TrigSlimValAlg::execute() { // clean up and finish delete allTriggerElements; allTriggerElements = 0; - delete featureOccurrences; featureOccurrences = 0; // print the TrigSlimValidation footer ATH_MSG_INFO ("REGTEST " << "======== END of TrigSlimValidation DUMP ========" ); diff --git a/Trigger/TrigValidation/TrigValTools/python/TrigValSteering/Common.py b/Trigger/TrigValidation/TrigValTools/python/TrigValSteering/Common.py index 1c1d8c2cb5b11bef7ff33be6883a58aa2b567b9c..88351701d8ad734a763a7d2d4f1c51cc826e9e25 100644 --- a/Trigger/TrigValidation/TrigValTools/python/TrigValSteering/Common.py +++ b/Trigger/TrigValidation/TrigValTools/python/TrigValSteering/Common.py @@ -17,10 +17,11 @@ from AthenaCommon.Utils.unixtools import FindFile trigvalsteering_logging_level = logging.INFO # Dictionary of required prefixes identifying a package, see ATR-19735 -package_prefix_dict = {'TriggerTest': 'trig_', - 'TrigP1Test': 'trigP1_', - 'TrigAnalysisTest': 'trigAna_', - 'TrigUpgradeTest': 'trigUpgr_'} +package_prefix_dict = {'TriggerTest': 'trig_', + 'TrigP1Test': 'trigP1_', + 'TrigAnalysisTest': 'trigAna_', + 'TrigUpgradeTest': 'trigUpgr_', + 'TrigInDetValidation': 'trigID_'} # Log file with all art-result statements art_result_summary = 'art-result-summary.log' diff --git a/Trigger/TrigValidation/TrigValTools/share/TrigValInputs.json b/Trigger/TrigValidation/TrigValTools/share/TrigValInputs.json index 8ce27fea098f1d93c6ad32f102b3f7328bc05070..19dcdb359039abaa0e876d89e06c34092cdb163f 100644 --- a/Trigger/TrigValidation/TrigValTools/share/TrigValInputs.json +++ b/Trigger/TrigValidation/TrigValTools/share/TrigValInputs.json @@ -49,6 +49,13 @@ "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TriggerTest/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.merge.RDO.e4993_s3214_r11315/RDO.17533168._000002.pool.root.1" ] }, + "ttbar_pu80": { + "source": "mc", + "format": "RDO", + "paths": [ + "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TriggerTest/mc16_13TeV.410470.PhPy8EG_A14_ttbar_hdamp258p75_nonallhad.recon.RDO.e6337_e5984_s3126_r10201/RDO.13232200._000020.pool.root.1" + ] + }, "ttbar_rel21": { "source": "mc", "format": "RDO", @@ -105,5 +112,12 @@ "paths": [ "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigAnalysisTest/mc16_13TeV.361239.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_high.simul.HITS.e4981_s3087_s3111_tid10701335_00/HITS.10701335._000011.pool.root.1" ] + }, + "mc_cosmics": { + "source": "mc", + "format": "RDO", + "paths": [ + "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TriggerTest/mc16_13TeV.310772.CosmicRays_CollisionSetup.recon.RDO.s3513_s3519_r11737_tid20237005_00/RDO.20237005._004484.pool.root.1" + ] } } diff --git a/Trigger/TrigValidation/TriggerTest/share/testCommonSliceAthenaTrigRDOtoAOD.py b/Trigger/TrigValidation/TriggerTest/share/testCommonSliceAthenaTrigRDOtoAOD.py index 37245eb29d762fa8f57605711601c804f763fce5..ee15054237ea320d5a6ab242a5ae19d438a21bed 100644 --- a/Trigger/TrigValidation/TriggerTest/share/testCommonSliceAthenaTrigRDOtoAOD.py +++ b/Trigger/TrigValidation/TriggerTest/share/testCommonSliceAthenaTrigRDOtoAOD.py @@ -200,6 +200,9 @@ if 'enableCostMonitoring' in dir() and bool(enableCostMonitoring) == True: #----------------------------------------------------------- include("RecExCommon/RecExCommon_topOptions.py") #----------------------------------------------------------- +from LumiBlockComps.LumiBlockMuWriterDefault import LumiBlockMuWriterDefault +LumiBlockMuWriterDefault() + # post set up trigger monitoring if 'enableCostMonitoring' in dir() and bool(enableCostMonitoring) == True: import TriggerJobOpts.Modifiers diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Cosmic_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Cosmic_build.py new file mode 100755 index 0000000000000000000000000000000000000000..1559309e94b36ba385a81e433821b63c289260eb --- /dev/null +++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Cosmic_build.py @@ -0,0 +1,30 @@ +#!/usr/bin/env python + +# art-description: Trigger RDO->RDO_TRIG athena test of the Cosmic_run3_v1 menu +# art-type: build +# art-include: master/Athena +# Skipping art-output which has no effect for build tests. +# If you create a grid version, check art-output in existing grid tests. + +from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps + +ex = ExecStep.ExecStep() +ex.type = 'athena' +ex.job_options = 'TriggerJobOpts/runHLT_standalone.py' +ex.input = 'mc_cosmics' +ex.threads = 1 +precommand = ''.join([ + "setMenu='Cosmic_run3_v1';", + "doWriteBS=False;", + "doWriteRDOTrigger=True;", + "fpeAuditor=True;" +]) +ex.args = '-c "{:s}"'.format(precommand) + +test = Test.Test() +test.art_type = 'build' +test.exec_steps = [ex] +test.check_steps = CheckSteps.default_check_steps(test) + +import sys +sys.exit(test.run()) diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Cosmic_grid.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Cosmic_grid.py new file mode 100755 index 0000000000000000000000000000000000000000..21bc55c94bdb91567c75f066874eb54159716244 --- /dev/null +++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Cosmic_grid.py @@ -0,0 +1,35 @@ +#!/usr/bin/env python + +# art-description: Trigger RDO->RDO_TRIG athena test of the Cosmic_run3_v1 menu +# art-type: grid +# art-include: master/Athena +# art-output: *.txt +# art-output: *.log +# art-output: log.* +# art-output: *.out +# art-output: *.err +# art-output: *.log.tar.gz +# art-output: *.new +# art-output: *.json +# art-output: *.root +# art-output: *.pmon.gz +# art-output: *perfmon* +# art-output: prmon* +# art-output: *.check* + +from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps + +ex = ExecStep.ExecStep() +ex.type = 'athena' +ex.job_options = 'TriggerJobOpts/runHLT_standalone.py' +ex.input = 'mc_cosmics' +ex.threads = 1 +ex.args = '-c "setMenu=\'Cosmic_run3_v1\';doWriteBS=False;doWriteRDOTrigger=True;"' + +test = Test.Test() +test.art_type = 'grid' +test.exec_steps = [ex] +test.check_steps = CheckSteps.default_check_steps(test) + +import sys +sys.exit(test.run()) diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_pu80_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_pu80_build.py new file mode 100755 index 0000000000000000000000000000000000000000..a37a863fde448db3e9cfa82c70313879f49105ce --- /dev/null +++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_pu80_build.py @@ -0,0 +1,30 @@ +#!/usr/bin/env python + +# art-description: Trigger RDO->RDO_TRIG athena test of the Dev_pp_run3_v1 menu with pileup80 ttbar sample +# art-type: build +# art-include: master/Athena +# Skipping art-output which has no effect for build tests. +# If you create a grid version, check art-output in existing grid tests. + +from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps + +ex = ExecStep.ExecStep() +ex.type = 'athena' +ex.job_options = 'TriggerJobOpts/runHLT_standalone.py' +ex.input = 'ttbar_pu80' +ex.threads = 1 +precommand = ''.join([ + "setMenu='LS2_v1';", # LS2_v1 soon to be renamed to Dev_pp_run3_v1 + "doWriteBS=False;", + "doWriteRDOTrigger=True;", + "fpeAuditor=True;" +]) +ex.args = '-c "{:s}"'.format(precommand) + +test = Test.Test() +test.art_type = 'build' +test.exec_steps = [ex] +test.check_steps = CheckSteps.default_check_steps(test) + +import sys +sys.exit(test.run()) diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_pu80_grid.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_pu80_grid.py new file mode 100755 index 0000000000000000000000000000000000000000..d303cf558c6b7c25fe5fefe4eb4a99f9cefee60a --- /dev/null +++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_pu80_grid.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python + +# art-description: Trigger RDO->RDO_TRIG athena test of the Dev_pp_run3_v1 menu with pileup80 ttbar sample +# art-type: grid +# art-include: master/Athena +# art-output: *.txt +# art-output: *.log +# art-output: log.* +# art-output: *.out +# art-output: *.err +# art-output: *.log.tar.gz +# art-output: *.new +# art-output: *.json +# art-output: *.root +# art-output: *.pmon.gz +# art-output: *perfmon* +# art-output: prmon* +# art-output: *.check* + +from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps + +ex = ExecStep.ExecStep() +ex.type = 'athena' +ex.job_options = 'TriggerJobOpts/runHLT_standalone.py' +ex.input = 'ttbar_pu80' +ex.threads = 1 +# LS2_v1 soon to be renamed to Dev_pp_run3_v1 +ex.args = '-c "setMenu=\'LS2_v1\';doWriteBS=False;doWriteRDOTrigger=True;"' + +test = Test.Test() +test.art_type = 'grid' +test.exec_steps = [ex] +test.check_steps = CheckSteps.default_check_steps(test) + +import sys +sys.exit(test.run()) diff --git a/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py b/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py index f84f7f7816605d46aac3b0b11160b3137cb5c749..4c6d6d8264b15120f44708ce97cdb6b23bdba059 100644 --- a/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py +++ b/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py @@ -219,6 +219,7 @@ TriggerHLTListRun3 = [ ('xAOD::L2IsoMuonAuxContainer#HLT_MuonL2ISInfoAux.', 'BS ESD AODFULL', 'Muon'), ('TrigRoiDescriptorCollection#HLT_Roi_L2SAMuon', 'BS ESD AODFULL', 'Muon'), + ('TrigRoiDescriptorCollection#HLT_Roi_L2SAMuonForEF', 'BS ESD AODFULL', 'Muon'), # Tau diff --git a/Trigger/TriggerCommon/TrigTier0/CMakeLists.txt b/Trigger/TriggerCommon/TrigTier0/CMakeLists.txt index eda49c731aae22a854d4a2a76f857c63708fb691..b88371aeb5ec8df29af544168692244c209d9716 100644 --- a/Trigger/TriggerCommon/TrigTier0/CMakeLists.txt +++ b/Trigger/TriggerCommon/TrigTier0/CMakeLists.txt @@ -5,11 +5,6 @@ # Declare the package name: atlas_subdir( TrigTier0 ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - GaudiKernel ) - # Install files from the package: -atlas_install_python_modules( python/*.py ) atlas_install_joboptions( share/*.py ) diff --git a/Trigger/TriggerCommon/TrigTier0/python/NtupleProdFlags.py b/Trigger/TriggerCommon/TrigTier0/python/NtupleProdFlags.py deleted file mode 100644 index 8cdcc77bc6f85fbaa6ea26630ad7b1ff54d6622f..0000000000000000000000000000000000000000 --- a/Trigger/TriggerCommon/TrigTier0/python/NtupleProdFlags.py +++ /dev/null @@ -1,183 +0,0 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration - -from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer - -from AthenaCommon.Logging import logging - -__author__ = 'Emily Nurse <Emily.Nurse@cern.ch>, Joerg Stelzer <Joerg.Stelzer@cern.ch>' -__doc__ = "Flags to steer the trigger ntuple production at the various sites and for development" - - -### -### property container class -### -class NtupleProductionFlags(JobPropertyContainer): - """Container for trigger ntuple production setup""" - log = logging.getLogger("TriggerFlags.NtupleProductionFlags") - - def produceNtuples(self): - return self.ProductionLocation() != '' - - -from TriggerJobOpts.TriggerFlags import TriggerFlags -TriggerFlags.add_Container(NtupleProductionFlags) -NPF = TriggerFlags.NtupleProductionFlags - - - - -### -### JobProperty SliceTuples: to group the different ntuples into files -### -class SliceTuples(JobProperty): - '''Slice specification, and Grouping - - * A list of strings can be specified, each string corresponding to one root file. - - * Within a string a comma separated list of slices needs to be given, which specifies the - ntuples that are contained in that file. For example - - * e.g. TriggerFlags.NtupleProduction.SliceTuples = ["EGamma, Tau", "MinBias", "MET, Jet", "BPhys, BJet"] - ''' - statusOn=True - allowedType=['list'] - StoredValue=[] - # list of possible slice ntuples - definedSlices=['EGamma', 'Muon', 'MuonL2', 'MuonEF', 'Tau', 'Jet', 'MET', 'MinBias', 'BPhys', 'BJet','L1Calo','TrigMenu'] - - def _do_action(self): - """Check if only defined slices are requested""" - if self.get_Value()==[]: return - for sl in ','.join(self.get_Value()).split(','): - if not sl.strip() in self.definedSlices: - raise RuntimeError ('Slice "%s" is not a slice that has an ntuple defined! Must be on of %r !' % (sl,self.definedSlices)) - - def doSlice(self,slicename): - """Checks if a slice was requested - - This is for the individual slice to ease the entrance to their - ntuple production. It respects the DisabledSlices Flag - """ - if slicename not in self.definedSlices: - raise RuntimeError ('Slice "%s" is not a slice that has an ntuple defined! Must be on of %r !' % (slicename,self.definedSlices)) - inSliceTuples = slicename in [sl.strip() for sl in ','.join(self.get_Value()).split(',')] - inDisabledSlices = slicename in [sl.strip() for sl in NPF.DisabledSlices()] - return inSliceTuples and not inDisabledSlices - -NPF.add_JobProperty(SliceTuples) - - - -### -### JobProperty FileNames: File names for the different groups -### -class FileNames(JobProperty): - '''File name specification for each group of slices - - * A list of filenames must be specified, each corresponding to the entry in SliceTuples. - - * Must always be set after the SliceTuples are specified, because we are checking that the length is the same - - * e.g. TriggerFlags.NtupleProduction.FileNames = ["EgammaTau.root", "MinBiasValidation.root", "MissingETandJet.root", "B.root"] - ''' - statusOn=True - allowedType=['list'] - StoredValue=[] - - def _do_action(self): - """Check if number of filename agrees with number of slice groups""" - if not NPF.SliceTuples.isDefault() and len(NPF.SliceTuples()) != len(self.get_Value()): - raise RuntimeError ("Expected %i root file names, since that many slice groups were defined" % len(NPF.SliceTuples())) - - def forSlice(self,slicename): - """return the root file name for an individual slice - - This is not to be used in the production, where one algorithm - will write all the files. This function respects the DisabledSlices flag - """ - - if not NPF.SliceTuples.doSlice(slicename): - return "" - - if len(self.get_Value())==0: - NPF.log.error("NPF.FileNames is empty, please provide at least one file name") - - for index, group in enumerate(NPF.SliceTuples()): - inSliceGroup = slicename in [sl.strip() for sl in group.split(',')] - if inSliceGroup: - if index>=len(self.get_Value()): index=0 - return self.get_Value()[index] - - assert RuntimeError, "Should not get here" - - -NPF.add_JobProperty(FileNames) - - -### -### JobProperty DisabledSlices: To quickly disable a certain slice from NTuple Production -### -class DisabledSlices(JobProperty): - '''Names of slices (list) to be excluded from production''' - statusOn=True - allowedType=['list'] - StoredValue=[] - - def _do_action(self): - """Check if only defined slices are listed""" - sl = [x for x in self.get_Value() if x not in NPF.SliceTuples.definedSlices] - if sl: - raise RuntimeError ('Slices %s do not have an ntuple defined! Must be on of %r !' % (','.join(sl),NPF.SliceTuples.definedSlices)) - -NPF.add_JobProperty(DisabledSlices) - - - -### -### JobProperty ProductionLocation: to specify where to run and setting the defaults -### -class ProductionLocation(JobProperty): - '''Production environment''' - statusOn=True - allowedType=['string'] - allowedValues=['','Tier0','Tier1','CAF','User'] - StoredValue='' - - def _do_action(self): - """Define ntuple production at the different places""" - - if NPF.SliceTuples.is_locked(): NPF.SliceTuples.unlock() - #if NPF.FileNames.is_locked(): NPF.FileNames.unlock() - - # - # Here the default values for ntuple production are set - # - if self.get_Value() == '': - NPF.SliceTuples.set_Value([]) - NPF.FileNames.set_Value([]) - NPF.log.info("Disabling Ntuple Production") - - elif self.get_Value() == 'Tier0': - NPF.SliceTuples.set_Value(['MinBias, EGamma, Tau, Muon, TrigMenu']) - #NPF.FileNames.set_Value(['TriggerNT.root']) - - elif self.get_Value() == 'Tier1': - NPF.SliceTuples.set_Value(['L1Calo']) - #NPF.FileNames.set_Value(['TriggerNT.root']) - - elif self.get_Value() == 'CAF': - NPF.SliceTuples.set_Value(['MinBias', 'EGamma', 'Tau', 'Muon', 'L1Calo']) - if NPF.FileNames()==[]: - NPF.FileNames.set_Value(['MinBiasNT.root', 'EGammaNT.root', 'TauNT.root', 'MuonNT.root', 'L1CaloNT.root']) - - elif self.get_Value() == 'User': - pass - - # lock the properties - if self.get_Value()!= 'User': - NPF.SliceTuples.lock() - - if self.get_Value()!= 'User' and self.get_Value()!= 'Tier0': - NPF.FileNames.lock() - -NPF.add_JobProperty(ProductionLocation) diff --git a/Trigger/TriggerCommon/TrigTier0/python/__init__.py b/Trigger/TriggerCommon/TrigTier0/python/__init__.py deleted file mode 100644 index 44eb2f950ae699b90ee6d1e64a52c9e5ac764e2b..0000000000000000000000000000000000000000 --- a/Trigger/TriggerCommon/TrigTier0/python/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -__version__ = '1.0.0' -__author__ = 'Moritz.Backes@cern.ch' -__all__ = [ 'NtupleProdFlags' ] - - diff --git a/Trigger/TriggerCommon/TrigTier0/share/TrigConfigForPrivateRerunHLT.py b/Trigger/TriggerCommon/TrigTier0/share/TrigConfigForPrivateRerunHLT.py deleted file mode 100644 index 5ee24cd523354172d857838b2cb8a7ccad112ead..0000000000000000000000000000000000000000 --- a/Trigger/TriggerCommon/TrigTier0/share/TrigConfigForPrivateRerunHLT.py +++ /dev/null @@ -1,18 +0,0 @@ -# This sets up the trigger config for a BStoESD job -# to use the HLT output XML file generated by a previous BStoBS step -# and a fixed LVL1 file from the release which should be what was used to rerun the trigger over BS -# It is intended for private trigger reprocessing only. -# Contact: Clemencia Mora or trigger configuration experts - -##preInclude for all steps but enable only for RAWtoESD -##don't set this in ESDtoAOD, it works with HLTonline since DS folders are stored in ESD metadata - -from RecExConfig.RecFlags import rec -if rec.readRDO and rec.doESD: - from TriggerJobOpts.TriggerFlags import TriggerFlags as tf - tf.inputHLTconfigFile.set_Value_and_Lock("outputHLTconfig.xml") - tf.inputLVL1configFile.set_Value_and_Lock("TriggerMenuXML/LVL1config_InitialBeam_v3.xml") - tf.configForStartup.set_Value_and_Lock("HLToffline") - tf.configurationSourceList.set_Value_and_Lock(['xml']) - tf.readHLTconfigFromXML.set_Value_and_Lock(True) - tf.readLVL1configFromXML.set_Value_and_Lock(True) diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/TrigEgammaFactories.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/TrigEgammaFactories.py index 0205d246d3fa7a9a1de4dcec29ee72ad3e982159..15cdad5ade04ad614d63fe23305e60ef960027ff 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/TrigEgammaFactories.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/TrigEgammaFactories.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration __doc__ = "ToolFactories to configure common TrigEgamma Tools" @@ -20,7 +20,7 @@ from CaloIdentifier import SUBCALO # Egamma imports from egammaRec.Factories import ToolFactory -from egammaTools.egammaToolsFactories import egammaToolsConf, egammaSwTool, egammaMVASvc, EMFourMomBuilder, PhotonPIDBuilder, ElectronPIDBuilder +from egammaTools.egammaToolsFactories import egammaToolsConf, egammaSwSuperClusterTool, egammaMVASvc, EMFourMomBuilder, PhotonPIDBuilder, ElectronPIDBuilder from egammaTrackTools.egammaTrackToolsFactories import EMExtrapolationTools # Load TrigEgammaKeys where we store the container names and other TrigEgamma configuration values @@ -65,7 +65,7 @@ TrigEMClusterTool = ToolFactory(egammaToolsConf.EMClusterTool, name = 'TrigEMClusterTool', OutputClusterContainerName = TrigEgammaKeys.TrigEMClusterToolOutputContainer, OutputTopoSeededClusterContainerName = TrigEgammaKeys.outputTopoSeededClusterKey, - ClusterCorrectionTool = egammaSwTool, + ClusterCorrectionTool = egammaSwSuperClusterTool, doSuperCluster = True, MVACalibSvc = egammaMVASvc ) diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Electron/TrigElectronFactories.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Electron/TrigElectronFactories.py index 4dbfeb3ae47b69f36925a88384d4aaf2d8110707..1953f4ae2bfe01a30e6af90cc790ebdb7f58cd81 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Electron/TrigElectronFactories.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Electron/TrigElectronFactories.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from AthenaCommon.Logging import logging __doc__ = "ToolFactories to configure egammaAlgs to be used at the HLT" @@ -17,7 +17,7 @@ from TriggerMenuMT.HLTMenuConfig.Egamma.EgammaDefs import TrigEgammaKeys from TriggerMenuMT.HLTMenuConfig.Egamma.TrigEgammaFactories import TrigEMClusterTool, TrigEMTrackMatchBuilder, TrigEMShowerBuilder, TrigEgammaDecorationTools """ Importing all the tool components """ -from egammaTools.egammaToolsFactories import egammaSwTool, egammaMVASvc, EGammaAmbiguityTool +from egammaTools.egammaToolsFactories import egammaSwSuperClusterTool, egammaMVASvc, EGammaAmbiguityTool from egammaAlgs import egammaAlgsConf from egammaRec.Factories import AlgFactory, FcnWrapper @@ -38,7 +38,7 @@ TrigElectronSuperClusterBuilder = AlgFactory( egammaAlgsConf.electronSuperCluste name = 'TrigElectronSuperClusterBuilder', InputEgammaRecContainerName = TrigEgammaKeys.EgammaRecKey, SuperElectronRecCollectionName = TrigEgammaKeys.SuperElectronRecCollectionName, - ClusterCorrectionTool=egammaSwTool, + ClusterCorrectionTool=egammaSwSuperClusterTool, MVACalibSvc=egammaMVASvc, EtThresholdCut=1000, TrackMatchBuilderTool = TrigEMTrackMatchBuilder, diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSequenceSetup.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSequenceSetup.py index c2a7f96ea7272325ed0de37f9362cd7215fb25f4..4cdd3372fd6c5ca685dc3321184c2acbae16c9af 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSequenceSetup.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSequenceSetup.py @@ -31,6 +31,8 @@ from ViewAlgs.ViewAlgsConf import EventViewCreatorAlgorithm, \ #muon container names (for RoI based sequences) from TriggerMenuMT.HLTMenuConfig.Muon.MuonSetup import muonNames muNames = muonNames().getNames('RoI') +from TrigEDMConfig.TriggerEDMRun3 import recordable + #-----------------------------------------------------# ### ************* Step1 ************* ### #-----------------------------------------------------# @@ -102,7 +104,6 @@ def muFastOvlpRmSequence(): ### ************* Step2 ************* ### #-----------------------------------------------------# def muCombAlgSequence(ConfigFlags): - from TrigEDMConfig.TriggerEDMRun3 import recordable ### set the EVCreator ### l2muCombViewsMaker = EventViewCreatorAlgorithm("IMl2muComb") newRoITool = ViewCreatorFetchFromViewROITool() @@ -195,8 +196,13 @@ def muEFSAAlgSequence(ConfigFlags): efsaViewsMaker = EventViewCreatorAlgorithm("IMefsa") # - efsaViewsMaker.RoIsLink = "roi" # Merge based on L2SA muon - efsaViewsMaker.RoITool = ViewCreatorPreviousROITool() # Spawn EventViews on L2SA muon ROI + efsaViewsMaker.RoIsLink = "initialRoI" # Merge based on initial RoI + + newRoITool = ViewCreatorFetchFromViewROITool() + newRoITool.RoisWriteHandleKey = recordable("HLT_Roi_L2SAMuonForEF") #RoI collection recorded to EDM + newRoITool.InViewRoIs = muNames.L2forIDName #input RoIs from L2 SA views + newRoITool.ViewToFetchFrom = "MUViewRoIs" + efsaViewsMaker.RoITool = newRoITool # Create a new ROI centred on the L2 SA muon from Step 1 # efsaViewsMaker.Views = "MUEFSAViewRoIs" efsaViewsMaker.InViewRoIs = "MUEFSARoIs" diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Photon/TrigPhotonFactories.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Photon/TrigPhotonFactories.py index 29bc431bb153c93ffa46391c6c33d4a07d9424a6..233c4f2d69b06e817539d63f2b40a1b4e381b49a 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Photon/TrigPhotonFactories.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Photon/TrigPhotonFactories.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration __doc__ = "ToolFactories to configure egammaAlgs to be used at the HLT" __author__ = "Fernando Monticelli" @@ -13,7 +13,7 @@ Offline configurations are available here: from egammaAlgs import egammaAlgsConf from egammaRec.Factories import AlgFactory, FcnWrapper -from egammaTools.egammaToolsFactories import egammaSwTool, egammaMVASvc, EGammaAmbiguityTool +from egammaTools.egammaToolsFactories import egammaSwSuperClusterTool, egammaMVASvc, EGammaAmbiguityTool # Tools and funtions from TrigEgammaFactories from TriggerMenuMT.HLTMenuConfig.Egamma.TrigEgammaFactories import TrigEMClusterTool, TrigEMShowerBuilder ,TrigEgammaDecorationTools, TrigPhotonDecorationTools, TrigEMTrackMatchBuilder @@ -45,7 +45,7 @@ TrigPhotonSuperClusterBuilder = AlgFactory( egammaAlgsConf.photonSuperClusterBui name = 'TrigPhotonSuperClusterBuilder', InputEgammaRecContainerName=TrigEgammaKeys.EgammaRecKey, SuperPhotonRecCollectionName=TrigEgammaKeys.SuperPhotonRecCollectionName, - ClusterCorrectionTool=egammaSwTool, + ClusterCorrectionTool=egammaSwSuperClusterTool, MVACalibSvc= egammaMVASvc, doConversions = False, AddClustrsMatchingVtxTracks = False,